Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(284)

Side by Side Diff: test/cctest/test-threads.cc

Issue 7945009: Merge experimental/gc branch to the bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-spaces.cc ('k') | test/mjsunit/array-constructor.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 ThreadB() : Thread("ThreadB") { } 104 ThreadB() : Thread("ThreadB") { }
105 void Run() { 105 void Run() {
106 do { 106 do {
107 { 107 {
108 v8::Locker locker; 108 v8::Locker locker;
109 if (turn == CLEAN_CACHE) { 109 if (turn == CLEAN_CACHE) {
110 v8::HandleScope scope; 110 v8::HandleScope scope;
111 v8::Context::Scope context_scope(v8::Context::New()); 111 v8::Context::Scope context_scope(v8::Context::New());
112 112
113 // Clear the caches by forcing major GC. 113 // Clear the caches by forcing major GC.
114 HEAP->CollectAllGarbage(false); 114 HEAP->CollectAllGarbage(v8::internal::Heap::kNoGCFlags);
115 turn = SECOND_TIME_FILL_CACHE; 115 turn = SECOND_TIME_FILL_CACHE;
116 break; 116 break;
117 } 117 }
118 } 118 }
119 119
120 Thread::YieldCPU(); 120 Thread::YieldCPU();
121 } while (true); 121 } while (true);
122 } 122 }
123 }; 123 };
124 124
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 refs.Add(i::ThreadId::Invalid()); 183 refs.Add(i::ThreadId::Invalid());
184 } 184 }
185 prev->Start(); 185 prev->Start();
186 for (int i = 0; i < kNThreads; i++) { 186 for (int i = 0; i < kNThreads; i++) {
187 semaphore->Wait(); 187 semaphore->Wait();
188 } 188 }
189 for (int i = 0; i < kNThreads; i++) { 189 for (int i = 0; i < kNThreads; i++) {
190 delete threads[i]; 190 delete threads[i];
191 } 191 }
192 } 192 }
OLDNEW
« no previous file with comments | « test/cctest/test-spaces.cc ('k') | test/mjsunit/array-constructor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698