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

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: need more depth to cause non-eager trace for arm32 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 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 double timeStamp = WTF::currentTimeMS(); 2301 double timeStamp = WTF::currentTimeMS();
2302 #if ENABLE(GC_PROFILE_MARKING) 2302 #if ENABLE(GC_PROFILE_MARKING)
2303 static_cast<MarkingVisitor<GlobalMarking>*>(s_markingVisitor)->objectGraph() .clear(); 2303 static_cast<MarkingVisitor<GlobalMarking>*>(s_markingVisitor)->objectGraph() .clear();
2304 #endif 2304 #endif
2305 2305
2306 // Disallow allocation during garbage collection (but not during the 2306 // Disallow allocation during garbage collection (but not during the
2307 // finalization that happens when the gcScope is torn down). 2307 // finalization that happens when the gcScope is torn down).
2308 ThreadState::NoAllocationScope noAllocationScope(state); 2308 ThreadState::NoAllocationScope noAllocationScope(state);
2309 2309
2310 preGC(); 2310 preGC();
2311 s_markingVisitor->configureEagerTraceLimit();
sof 2015/01/14 07:03:43 Move this to preGC() ?
2312 ASSERT(s_markingVisitor->canTraceEagerly());
2311 2313
2312 Heap::resetMarkedObjectSize(); 2314 Heap::resetMarkedObjectSize();
2313 Heap::resetAllocatedObjectSize(); 2315 Heap::resetAllocatedObjectSize();
2314 2316
2315 // 1. Trace persistent roots. 2317 // 1. Trace persistent roots.
2316 ThreadState::visitPersistentRoots(s_markingVisitor); 2318 ThreadState::visitPersistentRoots(s_markingVisitor);
2317 2319
2318 // 2. Trace objects reachable from the persistent roots including 2320 // 2. Trace objects reachable from the persistent roots including
2319 // ephemerons. 2321 // ephemerons.
2320 processMarkingStack(s_markingVisitor); 2322 processMarkingStack(s_markingVisitor);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 void Heap::collectGarbageForTerminatingThread(ThreadState* state) 2358 void Heap::collectGarbageForTerminatingThread(ThreadState* state)
2357 { 2359 {
2358 // We explicitly do not enter a safepoint while doing thread specific 2360 // We explicitly do not enter a safepoint while doing thread specific
2359 // garbage collection since we don't want to allow a global GC at the 2361 // garbage collection since we don't want to allow a global GC at the
2360 // same time as a thread local GC. 2362 // same time as a thread local GC.
2361 { 2363 {
2362 MarkingVisitor<ThreadLocalMarking> markingVisitor; 2364 MarkingVisitor<ThreadLocalMarking> markingVisitor;
2363 ThreadState::NoAllocationScope noAllocationScope(state); 2365 ThreadState::NoAllocationScope noAllocationScope(state);
2364 2366
2365 state->preGC(); 2367 state->preGC();
2368 s_markingVisitor->configureEagerTraceLimit();
2366 2369
2367 // 1. Trace the thread local persistent roots. For thread local GCs we 2370 // 1. Trace the thread local persistent roots. For thread local GCs we
2368 // don't trace the stack (ie. no conservative scanning) since this is 2371 // don't trace the stack (ie. no conservative scanning) since this is
2369 // only called during thread shutdown where there should be no objects 2372 // only called during thread shutdown where there should be no objects
2370 // on the stack. 2373 // on the stack.
2371 // We also assume that orphaned pages have no objects reachable from 2374 // We also assume that orphaned pages have no objects reachable from
2372 // persistent handles on other threads or CrossThreadPersistents. The 2375 // persistent handles on other threads or CrossThreadPersistents. The
2373 // only cases where this could happen is if a subsequent conservative 2376 // only cases where this could happen is if a subsequent conservative
2374 // global GC finds a "pointer" on the stack or due to a programming 2377 // global GC finds a "pointer" on the stack or due to a programming
2375 // error where an object has a dangling cross-thread pointer to an 2378 // error where an object has a dangling cross-thread pointer to an
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 bool Heap::s_shutdownCalled = false; 2689 bool Heap::s_shutdownCalled = false;
2687 bool Heap::s_lastGCWasConservative = false; 2690 bool Heap::s_lastGCWasConservative = false;
2688 FreePagePool* Heap::s_freePagePool; 2691 FreePagePool* Heap::s_freePagePool;
2689 OrphanedPagePool* Heap::s_orphanedPagePool; 2692 OrphanedPagePool* Heap::s_orphanedPagePool;
2690 Heap::RegionTree* Heap::s_regionTree = nullptr; 2693 Heap::RegionTree* Heap::s_regionTree = nullptr;
2691 size_t Heap::s_allocatedObjectSize = 0; 2694 size_t Heap::s_allocatedObjectSize = 0;
2692 size_t Heap::s_allocatedSpace = 0; 2695 size_t Heap::s_allocatedSpace = 0;
2693 size_t Heap::s_markedObjectSize = 0; 2696 size_t Heap::s_markedObjectSize = 0;
2694 2697
2695 } // namespace blink 2698 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698