gecko-dev/xpcom/base
Andrew McCreight cb5234676d Bug 1005500 - Use a separate linear scan pass to mark nodes white in ScanRoots. r=smaug
The existing code for ScanRoots looks at all traversal roots in the graph,
and floods white or black from them. This can take up a large chunk of the
Scan/Unlink slice of ICC, maybe because graph traversal has poor locality.

Outside of a leak, the cycle collector graph is usually only large when
there is a lot of garbage (95% or more of the graph), so we want to
speed up white marking.

To do this, I add a new pass that scans every node and directly sets the
color of any node that should be white, without flooding. This is very
fast. Then a second pass floods black from any remaining grey nodes.

On the page close CC for a real page, I measured a 10x improvement in
ScanRoots() time with this algorithm, from 3ms to 0.3ms.
2014-05-08 11:28:03 -07:00
..
AvailableMemoryTracker.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
AvailableMemoryTracker.h
ClearOnShutdown.cpp
ClearOnShutdown.h
CycleCollectedJSRuntime.cpp Bug 1004017 - Rename CycleCollectedJSRuntime::NeedCollect() and Collect(). r=smaug 2014-05-06 17:25:26 -07:00
CycleCollectedJSRuntime.h Bug 1005232 - Log number of incremental cycle collector slices. r=smaug 2014-05-06 17:25:26 -07:00
Debug.cpp
Debug.h
ErrorList.h
Makefile.in
moz.build Bug 106787 - Fix: Remove nsIAllocator and it's references. r=bsmedberg 2014-04-14 17:20:45 +02:00
nsAgg.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsAllocator.h Bug 106787 - Fix: Remove nsIAllocator and it's references. r=bsmedberg 2014-04-14 17:20:45 +02:00
nsAutoPtr.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsAutoRef.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsCom.h
nsConsoleMessage.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsConsoleMessage.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsConsoleService.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsConsoleService.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nscore.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsCrashOnException.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsCrashOnException.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsCycleCollector.cpp Bug 1005500 - Use a separate linear scan pass to mark nodes white in ScanRoots. r=smaug 2014-05-08 11:28:03 -07:00
nsCycleCollector.h Bug 958353 - Add finishCC() and ccSlice() methods for testing incremental cycle collection. r=smaug 2014-05-06 17:25:26 -07:00
nsDebugImpl.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsDebugImpl.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsDumpUtils.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsDumpUtils.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsError.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsErrorAssertsC.c
nsErrorService.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsErrorService.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsGZFileWriter.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsGZFileWriter.h
nsIConsoleListener.idl
nsIConsoleMessage.idl
nsIConsoleService.idl
nsICycleCollectorListener.idl
nsIDebug2.idl
nsIDebug.idl
nsIErrorService.idl
nsIException.idl
nsIGZFileWriter.idl
nsIID.h
nsIInterfaceRequestor.idl
nsIMacUtils.idl
nsIMemory.idl
nsIMemoryInfoDumper.idl
nsIMemoryReporter.idl Bug 590790 part 2 - Add memory reporter for VectorImage's SVGDocumentWrapper's document. r=dholbert, r=njn, r=seth 2014-05-08 10:53:00 +01:00
nsIMessageLoop.idl
nsIMutable.idl
nsInterfaceRequestorAgg.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsInterfaceRequestorAgg.h
nsIProgrammingLanguage.idl
nsISecurityConsoleMessage.idl
nsISizeOf.h
nsIStatusReporter.idl Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsISupports.idl
nsISupportsBase.h
nsISupportsObsolete.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsIUUIDGenerator.idl
nsIVersionComparator.idl
nsIVisualEventTracer.idl
nsIWeakReference.idl
nsMacUtilsImpl.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsMacUtilsImpl.h
nsMemoryImpl.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsMemoryImpl.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsMemoryInfoDumper.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsMemoryInfoDumper.h
nsMemoryReporterManager.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsMemoryReporterManager.h
nsMessageLoop.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsMessageLoop.h
nsObjCExceptions.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsrootidl.idl
nsSecurityConsoleMessage.cpp Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
nsSecurityConsoleMessage.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsSetDllDirectory.h
nsStackWalk.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsStackWalk.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsStackWalkPrivate.h
nsStatusReporterManager.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsStatusReporterManager.h
nsSystemInfo.cpp Fix incorrect resolution of merge conflicts between bug 995730 and bug 1001542 (no bug; CLOSED TREE) 2014-05-06 09:00:06 +01:00
nsSystemInfo.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsTraceRefcnt.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsTraceRefcnt.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsUUIDGenerator.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsUUIDGenerator.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsVersionComparatorImpl.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
nsVersionComparatorImpl.h
nsWeakPtr.h
nsWindowsHelpers.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
pure_api.c
pure.h
StackWalk.h
StaticMutex.h
StaticPtr.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
SystemMemoryReporter.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
SystemMemoryReporter.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
VisualEventTracer.cpp Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00
VisualEventTracer.h Bug 995730 - Change xpcom/base/ to use 2 space indentation 2014-05-05 20:30:39 +03:00