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

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

Issue 1088083002: Revert of Force full GCwhenever CollectAllGarbage is meant to trigger a full GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « test/cctest/test-symbols.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 { 90 {
91 v8::Isolate* isolate = CcTest::isolate(); 91 v8::Isolate* isolate = CcTest::isolate();
92 v8::Locker locker(isolate); 92 v8::Locker locker(isolate);
93 v8::Isolate::Scope isolate_scope(isolate); 93 v8::Isolate::Scope isolate_scope(isolate);
94 if (turn == CLEAN_CACHE) { 94 if (turn == CLEAN_CACHE) {
95 v8::HandleScope scope(isolate); 95 v8::HandleScope scope(isolate);
96 v8::Handle<v8::Context> context = v8::Context::New(isolate); 96 v8::Handle<v8::Context> context = v8::Context::New(isolate);
97 v8::Context::Scope context_scope(context); 97 v8::Context::Scope context_scope(context);
98 98
99 // Clear the caches by forcing major GC. 99 // Clear the caches by forcing major GC.
100 CcTest::heap()->CollectAllGarbage(); 100 CcTest::heap()->CollectAllGarbage(v8::internal::Heap::kNoGCFlags);
101 turn = SECOND_TIME_FILL_CACHE; 101 turn = SECOND_TIME_FILL_CACHE;
102 break; 102 break;
103 } 103 }
104 } 104 }
105 105
106 Thread::YieldCPU(); 106 Thread::YieldCPU();
107 } while (true); 107 } while (true);
108 } 108 }
109 }; 109 };
110 110
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 refs.Add(i::ThreadId::Invalid()); 168 refs.Add(i::ThreadId::Invalid());
169 } 169 }
170 prev->Start(); 170 prev->Start();
171 for (int i = 0; i < kNThreads; i++) { 171 for (int i = 0; i < kNThreads; i++) {
172 semaphore.Wait(); 172 semaphore.Wait();
173 } 173 }
174 for (int i = 0; i < kNThreads; i++) { 174 for (int i = 0; i < kNThreads; i++) {
175 delete threads[i]; 175 delete threads[i];
176 } 176 }
177 } 177 }
OLDNEW
« no previous file with comments | « test/cctest/test-symbols.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698