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

Side by Side Diff: third_party/WebKit/Source/platform/heap/ThreadState.h

Issue 2701513003: Revert of Move postGC out of CrossThreadPersistentRegion::LockScope (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 bool isSweepingInProgress() const { 223 bool isSweepingInProgress() const {
224 return gcState() == Sweeping || 224 return gcState() == Sweeping ||
225 gcState() == SweepingAndPreciseGCScheduled || 225 gcState() == SweepingAndPreciseGCScheduled ||
226 gcState() == SweepingAndIdleGCScheduled; 226 gcState() == SweepingAndIdleGCScheduled;
227 } 227 }
228 228
229 // A GC runs in the following sequence. 229 // A GC runs in the following sequence.
230 // 230 //
231 // 1) preGC() is called. 231 // 1) preGC() is called.
232 // 2) ThreadHeap::collectGarbage() is called. This marks live objects. 232 // 2) ThreadHeap::collectGarbage() is called. This marks live objects.
233 // 3) postGC() is called. This does thread-local weak processing. 233 // 3) postGC() is called. This does thread-local weak processing,
234 // 4) preSweep() is called. This does pre-finalization, eager sweeping and 234 // pre-finalization, eager sweeping and heap compaction.
235 // heap compaction.
236 // 4) Lazy sweeping sweeps heaps incrementally. completeSweep() may be called 235 // 4) Lazy sweeping sweeps heaps incrementally. completeSweep() may be called
237 // to complete the sweeping. 236 // to complete the sweeping.
238 // 5) postSweep() is called. 237 // 5) postSweep() is called.
239 // 238 //
240 // Notes: 239 // Notes:
241 // - The world is stopped between 1) and 3). 240 // - The world is stopped between 1) and 3).
242 // - isInGC() returns true between 1) and 3). 241 // - isInGC() returns true between 1) and 3).
243 // - isSweepingInProgress() returns true while any sweeping operation is 242 // - isSweepingInProgress() returns true while any sweeping operation is
244 // running. 243 // running.
245 void makeConsistentForGC(); 244 void makeConsistentForGC();
246 void preGC(); 245 void preGC();
247 void postGC(BlinkGC::GCType); 246 void postGC(BlinkGC::GCType);
248 void completeSweep(); 247 void completeSweep();
249 void preSweep(BlinkGC::GCType);
250 void postSweep(); 248 void postSweep();
251 // makeConsistentForMutator() drops marks from marked objects and rebuild 249 // makeConsistentForMutator() drops marks from marked objects and rebuild
252 // free lists. This is called after taking a snapshot and before resuming 250 // free lists. This is called after taking a snapshot and before resuming
253 // the executions of mutators. 251 // the executions of mutators.
254 void makeConsistentForMutator(); 252 void makeConsistentForMutator();
255 253
256 void compact(); 254 void compact();
257 255
258 // Support for disallowing allocation. Mainly used for sanity 256 // Support for disallowing allocation. Mainly used for sanity
259 // checks asserts. 257 // checks asserts.
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 class ThreadStateFor<AnyThread> { 736 class ThreadStateFor<AnyThread> {
739 STATIC_ONLY(ThreadStateFor); 737 STATIC_ONLY(ThreadStateFor);
740 738
741 public: 739 public:
742 static ThreadState* state() { return ThreadState::current(); } 740 static ThreadState* state() { return ThreadState::current(); }
743 }; 741 };
744 742
745 } // namespace blink 743 } // namespace blink
746 744
747 #endif // ThreadState_h 745 #endif // ThreadState_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapTest.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698