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

Side by Side Diff: Source/platform/heap/Heap.cpp

Issue 818253005: Oilpan: Query stack frame register instead of manual bookkeeping (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: haraken review Created 5 years, 11 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 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 double timeStamp = WTF::currentTimeMS(); 2265 double timeStamp = WTF::currentTimeMS();
2266 #if ENABLE(GC_PROFILE_MARKING) 2266 #if ENABLE(GC_PROFILE_MARKING)
2267 static_cast<MarkingVisitor<GlobalMarking>*>(s_markingVisitor)->objectGraph() .clear(); 2267 static_cast<MarkingVisitor<GlobalMarking>*>(s_markingVisitor)->objectGraph() .clear();
2268 #endif 2268 #endif
2269 2269
2270 // Disallow allocation during garbage collection (but not during the 2270 // Disallow allocation during garbage collection (but not during the
2271 // finalization that happens when the gcScope is torn down). 2271 // finalization that happens when the gcScope is torn down).
2272 ThreadState::NoAllocationScope noAllocationScope(state); 2272 ThreadState::NoAllocationScope noAllocationScope(state);
2273 2273
2274 preGC(); 2274 preGC();
2275 s_markingVisitor->configureEagerTraceLimit();
2276 ASSERT(s_markingVisitor->canTraceEagerly());
2275 2277
2276 Heap::resetMarkedObjectSize(); 2278 Heap::resetMarkedObjectSize();
2277 Heap::resetAllocatedObjectSize(); 2279 Heap::resetAllocatedObjectSize();
2278 2280
2279 // 1. Trace persistent roots. 2281 // 1. Trace persistent roots.
2280 ThreadState::visitPersistentRoots(s_markingVisitor); 2282 ThreadState::visitPersistentRoots(s_markingVisitor);
2281 2283
2282 // 2. Trace objects reachable from the persistent roots including 2284 // 2. Trace objects reachable from the persistent roots including
2283 // ephemerons. 2285 // ephemerons.
2284 processMarkingStack(s_markingVisitor); 2286 processMarkingStack(s_markingVisitor);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 { 2323 {
2322 // We explicitly do not enter a safepoint while doing thread specific 2324 // We explicitly do not enter a safepoint while doing thread specific
2323 // garbage collection since we don't want to allow a global GC at the 2325 // garbage collection since we don't want to allow a global GC at the
2324 // same time as a thread local GC. 2326 // same time as a thread local GC.
2325 2327
2326 { 2328 {
2327 MarkingVisitor<ThreadLocalMarking> markingVisitor; 2329 MarkingVisitor<ThreadLocalMarking> markingVisitor;
2328 ThreadState::NoAllocationScope noAllocationScope(state); 2330 ThreadState::NoAllocationScope noAllocationScope(state);
2329 2331
2330 state->preGC(); 2332 state->preGC();
2333 s_markingVisitor->configureEagerTraceLimit();
2331 2334
2332 // 1. Trace the thread local persistent roots. For thread local GCs we 2335 // 1. Trace the thread local persistent roots. For thread local GCs we
2333 // don't trace the stack (ie. no conservative scanning) since this is 2336 // don't trace the stack (ie. no conservative scanning) since this is
2334 // only called during thread shutdown where there should be no objects 2337 // only called during thread shutdown where there should be no objects
2335 // on the stack. 2338 // on the stack.
2336 // We also assume that orphaned pages have no objects reachable from 2339 // We also assume that orphaned pages have no objects reachable from
2337 // persistent handles on other threads or CrossThreadPersistents. The 2340 // persistent handles on other threads or CrossThreadPersistents. The
2338 // only cases where this could happen is if a subsequent conservative 2341 // only cases where this could happen is if a subsequent conservative
2339 // global GC finds a "pointer" on the stack or due to a programming 2342 // global GC finds a "pointer" on the stack or due to a programming
2340 // error where an object has a dangling cross-thread pointer to an 2343 // error where an object has a dangling cross-thread pointer to an
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 bool Heap::s_shutdownCalled = false; 2652 bool Heap::s_shutdownCalled = false;
2650 bool Heap::s_lastGCWasConservative = false; 2653 bool Heap::s_lastGCWasConservative = false;
2651 FreePagePool* Heap::s_freePagePool; 2654 FreePagePool* Heap::s_freePagePool;
2652 OrphanedPagePool* Heap::s_orphanedPagePool; 2655 OrphanedPagePool* Heap::s_orphanedPagePool;
2653 Heap::RegionTree* Heap::s_regionTree = nullptr; 2656 Heap::RegionTree* Heap::s_regionTree = nullptr;
2654 size_t Heap::s_allocatedObjectSize = 0; 2657 size_t Heap::s_allocatedObjectSize = 0;
2655 size_t Heap::s_allocatedSpace = 0; 2658 size_t Heap::s_allocatedSpace = 0;
2656 size_t Heap::s_markedObjectSize = 0; 2659 size_t Heap::s_markedObjectSize = 0;
2657 2660
2658 } // namespace blink 2661 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698