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

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

Issue 1163843010: Oilpan: Remove Heap::s_markingVisitor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 } 1665 }
1666 1666
1667 void Heap::init() 1667 void Heap::init()
1668 { 1668 {
1669 ThreadState::init(); 1669 ThreadState::init();
1670 s_markingStack = new CallbackStack(); 1670 s_markingStack = new CallbackStack();
1671 s_postMarkingCallbackStack = new CallbackStack(); 1671 s_postMarkingCallbackStack = new CallbackStack();
1672 s_globalWeakCallbackStack = new CallbackStack(); 1672 s_globalWeakCallbackStack = new CallbackStack();
1673 s_ephemeronStack = new CallbackStack(); 1673 s_ephemeronStack = new CallbackStack();
1674 s_heapDoesNotContainCache = new HeapDoesNotContainCache(); 1674 s_heapDoesNotContainCache = new HeapDoesNotContainCache();
1675 s_markingVisitor = new MarkingVisitor<Visitor::GlobalMarking>();
1676 s_freePagePool = new FreePagePool(); 1675 s_freePagePool = new FreePagePool();
1677 s_orphanedPagePool = new OrphanedPagePool(); 1676 s_orphanedPagePool = new OrphanedPagePool();
1678 s_allocatedObjectSize = 0; 1677 s_allocatedObjectSize = 0;
1679 s_allocatedSpace = 0; 1678 s_allocatedSpace = 0;
1680 s_markedObjectSize = 0; 1679 s_markedObjectSize = 0;
1681 s_estimatedMarkingTimePerByte = 0.0; 1680 s_estimatedMarkingTimePerByte = 0.0;
1682 1681
1683 GCInfoTable::init(); 1682 GCInfoTable::init();
1684 } 1683 }
1685 1684
1686 void Heap::shutdown() 1685 void Heap::shutdown()
1687 { 1686 {
1688 s_shutdownCalled = true; 1687 s_shutdownCalled = true;
1689 ThreadState::shutdownHeapIfNecessary(); 1688 ThreadState::shutdownHeapIfNecessary();
1690 } 1689 }
1691 1690
1692 void Heap::doShutdown() 1691 void Heap::doShutdown()
1693 { 1692 {
1694 // We don't want to call doShutdown() twice. 1693 // We don't want to call doShutdown() twice.
1695 if (!s_markingVisitor) 1694 if (!s_markingStack)
1696 return; 1695 return;
1697 1696
1698 ASSERT(!ThreadState::attachedThreads().size()); 1697 ASSERT(!ThreadState::attachedThreads().size());
1699 delete s_markingVisitor;
1700 s_markingVisitor = nullptr;
1701 delete s_heapDoesNotContainCache; 1698 delete s_heapDoesNotContainCache;
1702 s_heapDoesNotContainCache = nullptr; 1699 s_heapDoesNotContainCache = nullptr;
1703 delete s_freePagePool; 1700 delete s_freePagePool;
1704 s_freePagePool = nullptr; 1701 s_freePagePool = nullptr;
1705 delete s_orphanedPagePool; 1702 delete s_orphanedPagePool;
1706 s_orphanedPagePool = nullptr; 1703 s_orphanedPagePool = nullptr;
1707 delete s_globalWeakCallbackStack; 1704 delete s_globalWeakCallbackStack;
1708 s_globalWeakCallbackStack = nullptr; 1705 s_globalWeakCallbackStack = nullptr;
1709 delete s_postMarkingCallbackStack; 1706 delete s_postMarkingCallbackStack;
1710 s_postMarkingCallbackStack = nullptr; 1707 s_postMarkingCallbackStack = nullptr;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1763 #if ENABLE(GC_PROFILING) 1760 #if ENABLE(GC_PROFILING)
1764 const GCInfo* Heap::findGCInfo(Address address) 1761 const GCInfo* Heap::findGCInfo(Address address)
1765 { 1762 {
1766 return ThreadState::findGCInfoFromAllThreads(address); 1763 return ThreadState::findGCInfoFromAllThreads(address);
1767 } 1764 }
1768 #endif 1765 #endif
1769 1766
1770 #if ENABLE(GC_PROFILING) 1767 #if ENABLE(GC_PROFILING)
1771 void Heap::dumpPathToObjectOnNextGC(void* p) 1768 void Heap::dumpPathToObjectOnNextGC(void* p)
1772 { 1769 {
1773 static_cast<MarkingVisitor<Visitor::GlobalMarking>*>(s_markingVisitor)->dump PathToObjectOnNextGC(p); 1770 MarkingVisitor<Visitor::GlobalMarking> visitor;
1771 visitor->dumpPathToObjectOnNextGC(p);
1774 } 1772 }
1775 1773
1776 String Heap::createBacktraceString() 1774 String Heap::createBacktraceString()
1777 { 1775 {
1778 int framesToShow = 3; 1776 int framesToShow = 3;
1779 int stackFrameSize = 16; 1777 int stackFrameSize = 16;
1780 ASSERT(stackFrameSize >= framesToShow); 1778 ASSERT(stackFrameSize >= framesToShow);
1781 using FramePointer = void*; 1779 using FramePointer = void*;
1782 FramePointer* stackFrame = static_cast<FramePointer*>(alloca(sizeof(FramePoi nter) * stackFrameSize)); 1780 FramePointer* stackFrame = static_cast<FramePointer*>(alloca(sizeof(FramePoi nter) * stackFrameSize));
1783 WTFGetBacktrace(stackFrame, &stackFrameSize); 1781 WTFGetBacktrace(stackFrame, &stackFrameSize);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1935 ThreadState* state = ThreadState::current(); 1933 ThreadState* state = ThreadState::current();
1936 // Nested collectGarbage() invocations aren't supported. 1934 // Nested collectGarbage() invocations aren't supported.
1937 RELEASE_ASSERT(!state->isGCForbidden()); 1935 RELEASE_ASSERT(!state->isGCForbidden());
1938 state->completeSweep(); 1936 state->completeSweep();
1939 1937
1940 GCScope gcScope(state, stackState, gcType); 1938 GCScope gcScope(state, stackState, gcType);
1941 // Check if we successfully parked the other threads. If not we bail out of 1939 // Check if we successfully parked the other threads. If not we bail out of
1942 // the GC. 1940 // the GC.
1943 if (!gcScope.allThreadsParked()) 1941 if (!gcScope.allThreadsParked())
1944 return; 1942 return;
1943 MarkingVisitor<Visitor::GlobalMarking> visitor;
1945 1944
1946 if (state->isMainThread()) 1945 if (state->isMainThread())
1947 ScriptForbiddenScope::enter(); 1946 ScriptForbiddenScope::enter();
1948 1947
1949 s_lastGCWasConservative = false; 1948 s_lastGCWasConservative = false;
1950 1949
1951 TRACE_EVENT2("blink_gc", "Heap::collectGarbage", 1950 TRACE_EVENT2("blink_gc", "Heap::collectGarbage",
1952 "lazySweeping", gcType == ThreadState::GCWithoutSweep, 1951 "lazySweeping", gcType == ThreadState::GCWithoutSweep,
1953 "gcReason", gcReasonString(reason)); 1952 "gcReason", gcReasonString(reason));
1954 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink_gc", "BlinkGC"); 1953 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink_gc", "BlinkGC");
1955 double timeStamp = WTF::currentTimeMS(); 1954 double timeStamp = WTF::currentTimeMS();
1956 #if ENABLE(GC_PROFILING) 1955 #if ENABLE(GC_PROFILING)
1957 static_cast<MarkingVisitor<Visitor::GlobalMarking>*>(s_markingVisitor)->obje ctGraph().clear(); 1956 visitor.objectGraph().clear();
1958 #endif 1957 #endif
1959 1958
1960 // Disallow allocation during garbage collection (but not during the 1959 // Disallow allocation during garbage collection (but not during the
1961 // finalization that happens when the gcScope is torn down). 1960 // finalization that happens when the gcScope is torn down).
1962 ThreadState::NoAllocationScope noAllocationScope(state); 1961 ThreadState::NoAllocationScope noAllocationScope(state);
1963 1962
1964 preGC(); 1963 preGC();
1965 1964
1966 StackFrameDepthScope stackDepthScope; 1965 StackFrameDepthScope stackDepthScope;
1967 1966
1968 size_t totalObjectSize = Heap::allocatedObjectSize() + Heap::markedObjectSiz e(); 1967 size_t totalObjectSize = Heap::allocatedObjectSize() + Heap::markedObjectSiz e();
1969 Heap::resetHeapCounters(); 1968 Heap::resetHeapCounters();
1970 1969
1971 // 1. Trace persistent roots. 1970 // 1. Trace persistent roots.
1972 ThreadState::visitPersistentRoots(s_markingVisitor); 1971 ThreadState::visitPersistentRoots(&visitor);
1973 1972
1974 // 2. Trace objects reachable from the persistent roots including 1973 // 2. Trace objects reachable from the persistent roots including
1975 // ephemerons. 1974 // ephemerons.
1976 processMarkingStack(s_markingVisitor); 1975 processMarkingStack(&visitor);
1977 1976
1978 // 3. Trace objects reachable from the stack. We do this independent of the 1977 // 3. Trace objects reachable from the stack. We do this independent of the
1979 // given stackState since other threads might have a different stack state. 1978 // given stackState since other threads might have a different stack state.
1980 ThreadState::visitStackRoots(s_markingVisitor); 1979 ThreadState::visitStackRoots(&visitor);
1981 1980
1982 // 4. Trace objects reachable from the stack "roots" including ephemerons. 1981 // 4. Trace objects reachable from the stack "roots" including ephemerons.
1983 // Only do the processing if we found a pointer to an object on one of the 1982 // Only do the processing if we found a pointer to an object on one of the
1984 // thread stacks. 1983 // thread stacks.
1985 if (lastGCWasConservative()) 1984 if (lastGCWasConservative())
1986 processMarkingStack(s_markingVisitor); 1985 processMarkingStack(&visitor);
1987 1986
1988 postMarkingProcessing(s_markingVisitor); 1987 postMarkingProcessing(&visitor);
1989 globalWeakProcessing(s_markingVisitor); 1988 globalWeakProcessing(&visitor);
1990 1989
1991 // Now we can delete all orphaned pages because there are no dangling 1990 // Now we can delete all orphaned pages because there are no dangling
1992 // pointers to the orphaned pages. (If we have such dangling pointers, 1991 // pointers to the orphaned pages. (If we have such dangling pointers,
1993 // we should have crashed during marking before getting here.) 1992 // we should have crashed during marking before getting here.)
1994 orphanedPagePool()->decommitOrphanedPages(); 1993 orphanedPagePool()->decommitOrphanedPages();
1995 1994
1996 postGC(gcType); 1995 postGC(gcType);
1997 1996
1998 #if ENABLE(GC_PROFILING) 1997 #if ENABLE(GC_PROFILING)
1999 static_cast<MarkingVisitor<Visitor::GlobalMarking>*>(s_markingVisitor)->repo rtStats(); 1998 visitor.reportStats();
2000 #endif 1999 #endif
2001 2000
2002 double markingTimeInMilliseconds = WTF::currentTimeMS() - timeStamp; 2001 double markingTimeInMilliseconds = WTF::currentTimeMS() - timeStamp;
2003 s_estimatedMarkingTimePerByte = totalObjectSize ? (markingTimeInMilliseconds / 1000 / totalObjectSize) : 0; 2002 s_estimatedMarkingTimePerByte = totalObjectSize ? (markingTimeInMilliseconds / 1000 / totalObjectSize) : 0;
2004 2003
2005 Platform::current()->histogramCustomCounts("BlinkGC.CollectGarbage", marking TimeInMilliseconds, 0, 10 * 1000, 50); 2004 Platform::current()->histogramCustomCounts("BlinkGC.CollectGarbage", marking TimeInMilliseconds, 0, 10 * 1000, 50);
2006 Platform::current()->histogramCustomCounts("BlinkGC.TotalObjectSpace", Heap: :allocatedObjectSize() / 1024, 0, 4 * 1024 * 1024, 50); 2005 Platform::current()->histogramCustomCounts("BlinkGC.TotalObjectSpace", Heap: :allocatedObjectSize() / 1024, 0, 4 * 1024 * 1024, 50);
2007 Platform::current()->histogramCustomCounts("BlinkGC.TotalAllocatedSpace", He ap::allocatedSpace() / 1024, 0, 4 * 1024 * 1024, 50); 2006 Platform::current()->histogramCustomCounts("BlinkGC.TotalAllocatedSpace", He ap::allocatedSpace() / 1024, 0, 4 * 1024 * 1024, 50);
2008 Platform::current()->histogramEnumeration("BlinkGC.GCReason", reason, Number OfGCReason); 2007 Platform::current()->histogramEnumeration("BlinkGC.GCReason", reason, Number OfGCReason);
2009 Heap::reportMemoryUsageHistogram(); 2008 Heap::reportMemoryUsageHistogram();
2010 WTF::Partitions::reportMemoryUsageHistogram(); 2009 WTF::Partitions::reportMemoryUsageHistogram();
2011 2010
2012 if (state->isMainThread()) 2011 if (state->isMainThread())
2013 ScriptForbiddenScope::exit(); 2012 ScriptForbiddenScope::exit();
2014 } 2013 }
2015 2014
2016 void Heap::collectGarbageForTerminatingThread(ThreadState* state) 2015 void Heap::collectGarbageForTerminatingThread(ThreadState* state)
2017 { 2016 {
2018 { 2017 {
2019 // A thread-specific termination GC must not allow other global GCs to g o 2018 // A thread-specific termination GC must not allow other global GCs to g o
2020 // ahead while it is running, hence the termination GC does not enter a 2019 // ahead while it is running, hence the termination GC does not enter a
2021 // safepoint. GCScope will not enter also a safepoint scope for 2020 // safepoint. GCScope will not enter also a safepoint scope for
2022 // ThreadTerminationGC. 2021 // ThreadTerminationGC.
2023 GCScope gcScope(state, ThreadState::NoHeapPointersOnStack, ThreadState:: ThreadTerminationGC); 2022 GCScope gcScope(state, ThreadState::NoHeapPointersOnStack, ThreadState:: ThreadTerminationGC);
2024 2023
2025 MarkingVisitor<Visitor::ThreadLocalMarking> markingVisitor; 2024 MarkingVisitor<Visitor::ThreadLocalMarking> visitor;
2026 ThreadState::NoAllocationScope noAllocationScope(state); 2025 ThreadState::NoAllocationScope noAllocationScope(state);
2027 2026
2028 state->preGC(); 2027 state->preGC();
2029 StackFrameDepthScope stackDepthScope; 2028 StackFrameDepthScope stackDepthScope;
2030 2029
2031 // 1. Trace the thread local persistent roots. For thread local GCs we 2030 // 1. Trace the thread local persistent roots. For thread local GCs we
2032 // don't trace the stack (ie. no conservative scanning) since this is 2031 // don't trace the stack (ie. no conservative scanning) since this is
2033 // only called during thread shutdown where there should be no objects 2032 // only called during thread shutdown where there should be no objects
2034 // on the stack. 2033 // on the stack.
2035 // We also assume that orphaned pages have no objects reachable from 2034 // We also assume that orphaned pages have no objects reachable from
2036 // persistent handles on other threads or CrossThreadPersistents. The 2035 // persistent handles on other threads or CrossThreadPersistents. The
2037 // only cases where this could happen is if a subsequent conservative 2036 // only cases where this could happen is if a subsequent conservative
2038 // global GC finds a "pointer" on the stack or due to a programming 2037 // global GC finds a "pointer" on the stack or due to a programming
2039 // error where an object has a dangling cross-thread pointer to an 2038 // error where an object has a dangling cross-thread pointer to an
2040 // object on this heap. 2039 // object on this heap.
2041 state->visitPersistents(&markingVisitor); 2040 state->visitPersistents(&visitor);
2042 2041
2043 // 2. Trace objects reachable from the thread's persistent roots 2042 // 2. Trace objects reachable from the thread's persistent roots
2044 // including ephemerons. 2043 // including ephemerons.
2045 processMarkingStack(&markingVisitor); 2044 processMarkingStack(&visitor);
2046 2045
2047 postMarkingProcessing(&markingVisitor); 2046 postMarkingProcessing(&visitor);
2048 globalWeakProcessing(&markingVisitor); 2047 globalWeakProcessing(&visitor);
2049 2048
2050 state->postGC(ThreadState::GCWithSweep); 2049 state->postGC(ThreadState::GCWithSweep);
2051 } 2050 }
2052 state->preSweep(); 2051 state->preSweep();
2053 } 2052 }
2054 2053
2055 void Heap::processMarkingStack(Visitor* markingVisitor) 2054 void Heap::processMarkingStack(Visitor* visitor)
2056 { 2055 {
2057 // Ephemeron fixed point loop. 2056 // Ephemeron fixed point loop.
2058 do { 2057 do {
2059 { 2058 {
2060 // Iteratively mark all objects that are reachable from the objects 2059 // Iteratively mark all objects that are reachable from the objects
2061 // currently pushed onto the marking stack. 2060 // currently pushed onto the marking stack.
2062 TRACE_EVENT0("blink_gc", "Heap::processMarkingStackSingleThreaded"); 2061 TRACE_EVENT0("blink_gc", "Heap::processMarkingStackSingleThreaded");
2063 while (popAndInvokeTraceCallback(markingVisitor)) { } 2062 while (popAndInvokeTraceCallback(visitor)) { }
2064 } 2063 }
2065 2064
2066 { 2065 {
2067 // Mark any strong pointers that have now become reachable in 2066 // Mark any strong pointers that have now become reachable in
2068 // ephemeron maps. 2067 // ephemeron maps.
2069 TRACE_EVENT0("blink_gc", "Heap::processEphemeronStack"); 2068 TRACE_EVENT0("blink_gc", "Heap::processEphemeronStack");
2070 s_ephemeronStack->invokeEphemeronCallbacks(markingVisitor); 2069 s_ephemeronStack->invokeEphemeronCallbacks(visitor);
2071 } 2070 }
2072 2071
2073 // Rerun loop if ephemeron processing queued more objects for tracing. 2072 // Rerun loop if ephemeron processing queued more objects for tracing.
2074 } while (!s_markingStack->isEmpty()); 2073 } while (!s_markingStack->isEmpty());
2075 } 2074 }
2076 2075
2077 void Heap::postMarkingProcessing(Visitor* markingVisitor) 2076 void Heap::postMarkingProcessing(Visitor* visitor)
2078 { 2077 {
2079 TRACE_EVENT0("blink_gc", "Heap::postMarkingProcessing"); 2078 TRACE_EVENT0("blink_gc", "Heap::postMarkingProcessing");
2080 // Call post-marking callbacks including: 2079 // Call post-marking callbacks including:
2081 // 1. the ephemeronIterationDone callbacks on weak tables to do cleanup 2080 // 1. the ephemeronIterationDone callbacks on weak tables to do cleanup
2082 // (specifically to clear the queued bits for weak hash tables), and 2081 // (specifically to clear the queued bits for weak hash tables), and
2083 // 2. the markNoTracing callbacks on collection backings to mark them 2082 // 2. the markNoTracing callbacks on collection backings to mark them
2084 // if they are only reachable from their front objects. 2083 // if they are only reachable from their front objects.
2085 while (popAndInvokePostMarkingCallback(markingVisitor)) { } 2084 while (popAndInvokePostMarkingCallback(visitor)) { }
2086 2085
2087 s_ephemeronStack->clear(); 2086 s_ephemeronStack->clear();
2088 2087
2089 // Post-marking callbacks should not trace any objects and 2088 // Post-marking callbacks should not trace any objects and
2090 // therefore the marking stack should be empty after the 2089 // therefore the marking stack should be empty after the
2091 // post-marking callbacks. 2090 // post-marking callbacks.
2092 ASSERT(s_markingStack->isEmpty()); 2091 ASSERT(s_markingStack->isEmpty());
2093 } 2092 }
2094 2093
2095 void Heap::globalWeakProcessing(Visitor* markingVisitor) 2094 void Heap::globalWeakProcessing(Visitor* visitor)
2096 { 2095 {
2097 TRACE_EVENT0("blink_gc", "Heap::globalWeakProcessing"); 2096 TRACE_EVENT0("blink_gc", "Heap::globalWeakProcessing");
2098 // Call weak callbacks on objects that may now be pointing to dead objects. 2097 // Call weak callbacks on objects that may now be pointing to dead objects.
2099 while (popAndInvokeGlobalWeakCallback(markingVisitor)) { } 2098 while (popAndInvokeGlobalWeakCallback(visitor)) { }
2100 2099
2101 // It is not permitted to trace pointers of live objects in the weak 2100 // It is not permitted to trace pointers of live objects in the weak
2102 // callback phase, so the marking stack should still be empty here. 2101 // callback phase, so the marking stack should still be empty here.
2103 ASSERT(s_markingStack->isEmpty()); 2102 ASSERT(s_markingStack->isEmpty());
2104 } 2103 }
2105 2104
2106 void Heap::collectAllGarbage() 2105 void Heap::collectAllGarbage()
2107 { 2106 {
2108 // FIXME: Oilpan: we should perform a single GC and everything 2107 // FIXME: Oilpan: we should perform a single GC and everything
2109 // should die. Unfortunately it is not the case for all objects 2108 // should die. Unfortunately it is not the case for all objects
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 2261
2263 void Heap::resetHeapCounters() 2262 void Heap::resetHeapCounters()
2264 { 2263 {
2265 ASSERT(ThreadState::current()->isInGC()); 2264 ASSERT(ThreadState::current()->isInGC());
2266 2265
2267 s_allocatedObjectSize = 0; 2266 s_allocatedObjectSize = 0;
2268 s_markedObjectSize = 0; 2267 s_markedObjectSize = 0;
2269 s_externalObjectSizeAtLastGC = WTF::Partitions::totalSizeOfCommittedPages(); 2268 s_externalObjectSizeAtLastGC = WTF::Partitions::totalSizeOfCommittedPages();
2270 } 2269 }
2271 2270
2272 Visitor* Heap::s_markingVisitor;
2273 CallbackStack* Heap::s_markingStack; 2271 CallbackStack* Heap::s_markingStack;
2274 CallbackStack* Heap::s_postMarkingCallbackStack; 2272 CallbackStack* Heap::s_postMarkingCallbackStack;
2275 CallbackStack* Heap::s_globalWeakCallbackStack; 2273 CallbackStack* Heap::s_globalWeakCallbackStack;
2276 CallbackStack* Heap::s_ephemeronStack; 2274 CallbackStack* Heap::s_ephemeronStack;
2277 HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache; 2275 HeapDoesNotContainCache* Heap::s_heapDoesNotContainCache;
2278 bool Heap::s_shutdownCalled = false; 2276 bool Heap::s_shutdownCalled = false;
2279 bool Heap::s_lastGCWasConservative = false; 2277 bool Heap::s_lastGCWasConservative = false;
2280 FreePagePool* Heap::s_freePagePool; 2278 FreePagePool* Heap::s_freePagePool;
2281 OrphanedPagePool* Heap::s_orphanedPagePool; 2279 OrphanedPagePool* Heap::s_orphanedPagePool;
2282 Heap::RegionTree* Heap::s_regionTree = nullptr; 2280 Heap::RegionTree* Heap::s_regionTree = nullptr;
2283 size_t Heap::s_allocatedObjectSize = 0; 2281 size_t Heap::s_allocatedObjectSize = 0;
2284 size_t Heap::s_allocatedSpace = 0; 2282 size_t Heap::s_allocatedSpace = 0;
2285 size_t Heap::s_markedObjectSize = 0; 2283 size_t Heap::s_markedObjectSize = 0;
2286 // We don't want to use 0 KB for the initial value because it may end up 2284 // We don't want to use 0 KB for the initial value because it may end up
2287 // triggering the first GC of some thread too prematurely. 2285 // triggering the first GC of some thread too prematurely.
2288 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024; 2286 size_t Heap::s_estimatedLiveObjectSize = 512 * 1024;
2289 size_t Heap::s_externalObjectSizeAtLastGC = 0; 2287 size_t Heap::s_externalObjectSizeAtLastGC = 0;
2290 double Heap::s_estimatedMarkingTimePerByte = 0.0; 2288 double Heap::s_estimatedMarkingTimePerByte = 0.0;
2291 2289
2292 } // namespace blink 2290 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/heap/Heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698