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

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

Issue 2686533003: Move postGC out of CrossThreadPersistentRegion::LockScope (Closed)
Patch Set: fix 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 return gcState() == Sweeping || 220 return gcState() == Sweeping ||
221 gcState() == SweepingAndPreciseGCScheduled || 221 gcState() == SweepingAndPreciseGCScheduled ||
222 gcState() == SweepingAndIdleGCScheduled; 222 gcState() == SweepingAndIdleGCScheduled;
223 } 223 }
224 224
225 // A GC runs in the following sequence. 225 // A GC runs in the following sequence.
226 // 226 //
227 // 1) preGC() is called. 227 // 1) preGC() is called.
228 // 2) ThreadHeap::collectGarbage() is called. This marks live objects. 228 // 2) ThreadHeap::collectGarbage() is called. This marks live objects.
229 // 3) postGC() is called. This does thread-local weak processing, 229 // 3) postGC() is called. This does thread-local weak processing,
230 // pre-finalization, eager sweeping and heap compaction. 230 // pre-finalization, eager sweeping and heap compaction.
haraken 2017/02/13 16:56:24 Update this comment.
keishi 2017/02/14 01:18:20 Done.
231 // 4) Lazy sweeping sweeps heaps incrementally. completeSweep() may be called 231 // 4) Lazy sweeping sweeps heaps incrementally. completeSweep() may be called
232 // to complete the sweeping. 232 // to complete the sweeping.
233 // 5) postSweep() is called. 233 // 5) postSweep() is called.
234 // 234 //
235 // Notes: 235 // Notes:
236 // - The world is stopped between 1) and 3). 236 // - The world is stopped between 1) and 3).
237 // - isInGC() returns true between 1) and 3). 237 // - isInGC() returns true between 1) and 3).
238 // - isSweepingInProgress() returns true while any sweeping operation is 238 // - isSweepingInProgress() returns true while any sweeping operation is
239 // running. 239 // running.
240 void makeConsistentForGC(); 240 void makeConsistentForGC();
241 void preGC(); 241 void preGC();
242 void postGC(BlinkGC::GCType); 242 void postGC(BlinkGC::GCType);
243 void completeSweep(); 243 void completeSweep();
244 void preSweep(BlinkGC::GCType);
244 void postSweep(); 245 void postSweep();
245 // makeConsistentForMutator() drops marks from marked objects and rebuild 246 // makeConsistentForMutator() drops marks from marked objects and rebuild
246 // free lists. This is called after taking a snapshot and before resuming 247 // free lists. This is called after taking a snapshot and before resuming
247 // the executions of mutators. 248 // the executions of mutators.
248 void makeConsistentForMutator(); 249 void makeConsistentForMutator();
249 250
250 void compact(); 251 void compact();
251 252
252 // Support for disallowing allocation. Mainly used for sanity 253 // Support for disallowing allocation. Mainly used for sanity
253 // checks asserts. 254 // checks asserts.
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 class ThreadStateFor<AnyThread> { 729 class ThreadStateFor<AnyThread> {
729 STATIC_ONLY(ThreadStateFor); 730 STATIC_ONLY(ThreadStateFor);
730 731
731 public: 732 public:
732 static ThreadState* state() { return ThreadState::current(); } 733 static ThreadState* state() { return ThreadState::current(); }
733 }; 734 };
734 735
735 } // namespace blink 736 } // namespace blink
736 737
737 #endif // ThreadState_h 738 #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