Bug 140774 - EdenCollections are too long
Summary: EdenCollections are too long
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on: 142941 142950 142957 140717 140762 142675
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-22 11:02 PST by Mark Hahnenberg
Modified: 2015-03-22 19:12 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2015-01-22 11:02:44 PST
EdenCollections are a lot cheaper than FullCollections on average, but there's still room for improvement. I gathered some GC phase timing logs while browsing around on a few JS-heavy-ish websites and wrote a tool to parse the output and sort by average time spent in each phase. Here's what it looks like:

Eden
FinishingCollection                 	Eden	0.0  	avg
UpdateAllocationLimits              	Eden	0.0  	avg
ResetAllocators                     	Eden	0.0  	avg
RememberCurrentlyExecutingCodeBlocks	Eden	0.0  	avg
NotifyIncrementalSweeper            	Eden	0.0  	avg
FinalizeDFGWorklists                	Eden	0.0  	avg
SnapshotMarkedSpace                 	Eden	0.0  	avg
SweepingArrayBuffers                	Eden	0.0  	avg
VisitHandleStack                    	Eden	0.0  	avg
MarkingException                    	Eden	0.0  	avg
MarkingArgumentBuffers              	Eden	0.0  	avg
VisitTempSortVectors                	Eden	0.0  	avg
VisitSmallStrings                   	Eden	0.0  	avg
GatherScratchBufferRoots            	Eden	0.0  	avg
FlushWriteBarrierBuffer             	Eden	0.0  	avg
FlushOldStructureIDTables           	Eden	0.0  	avg
ClearLivenessData                   	Eden	0.01 	avg
VisitProtectedObjects               	Eden	0.02 	avg
ClearRememberedSet                  	Eden	0.03 	avg
TraceCodeBlocksAndJITStubRoutines   	Eden	0.05 	avg
ClearUnmarkedExecutables            	Eden	0.09 	avg
ReapingWeakHandles                  	Eden	0.11 	avg
DeleteSourceProviderCaches          	Eden	0.15 	avg
GatherStackRoots                    	Eden	0.15 	avg
StopAllocation                      	Eden	0.24 	avg
Convergence                         	Eden	0.25 	avg
VisitStrongHandles                  	Eden	0.38 	avg
CopyBackingStores                   	Eden	0.41 	avg
DeleteCodeBlocks                    	Eden	0.44 	avg
VisitingLiveWeakHandles             	Eden	0.52 	avg
VisitConservativeRoots              	Eden	1.25 	avg
FinalizeUnconditionalFinalizers     	Eden	1.53 	avg
MarkRoots                           	Eden	2.99 	avg
Collect                             	Eden	5.89 	avg

Note: Some of these phases are sub-phases of other phases. Times are in milliseconds. 

A bunch of these phases seem to have low-hanging fruit. Things like converting iteration over linked lists to iteration over vectors, skipping phases during EdenCollections, etc. I've already done a few things along these lines. This bug is just to keep track of the various things that could help.