Bug 186740

Summary: CodeBlockSet wastes 190KB of HashTable capacity on nytimes.com
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: NEW    
Severity: Normal CC: ews-watchlist, guijemont, guijemont+jsc-armv7-ews, keith_miller, mark.lam, msaboff, saam, simon.fraser, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Simon Fraser (smfr)
Reported 2018-06-16 12:41:34 PDT
Using tooling from bug 186698, loading can and running "notifyutil -p com.apple.WebKit.dumpHashTableCapacity" shows: Wasted capacity: 189656 bytes (used 72488 of 262144 bytes, utilization: 27.65%) - 1 allocations 1 0x116005465 WTF::HashTable<JSC::CodeBlock*, JSC::CodeBlock*, WTF::IdentityExtractor, WTF::PtrHash<JSC::CodeBlock*>, WTF::HashTraits<JSC::CodeBlock*>, WTF::HashTraits<JSC::CodeBlock*> >::HashTable() 2 0x116005445 WTF::HashSet<JSC::CodeBlock*, WTF::PtrHash<JSC::CodeBlock*>, WTF::HashTraits<JSC::CodeBlock*> >::HashSet() 3 0x116001de5 WTF::HashSet<JSC::CodeBlock*, WTF::PtrHash<JSC::CodeBlock*>, WTF::HashTraits<JSC::CodeBlock*> >::HashSet() 4 0x116001da9 JSC::CodeBlockSet::CodeBlockSet() 5 0x116001e05 JSC::CodeBlockSet::CodeBlockSet() 6 0x11600ff64 JSC::Heap::Heap(JSC::VM*, JSC::HeapType) 7 0x1160126b3 JSC::Heap::Heap(JSC::VM*, JSC::HeapType) 8 0x1166b8e72 JSC::VM::VM(JSC::VM::VMType, JSC::HeapType)
Attachments
Patch (11.31 KB, patch)
2019-04-28 02:19 PDT, Yusuke Suzuki
no flags
Patch (20.81 KB, patch)
2019-04-28 04:29 PDT, Yusuke Suzuki
no flags
Patch (62.33 KB, patch)
2019-05-07 02:25 PDT, Yusuke Suzuki
no flags
Radar WebKit Bug Importer
Comment 1 2018-06-16 12:42:55 PDT
Yusuke Suzuki
Comment 2 2019-04-27 23:46:30 PDT
CodeBlockSet is basically duplicate to IsoSubspace's set feature. But it exists for Debuggers and Sampling Profilers. If they are not enabled, we should not use this.
Yusuke Suzuki
Comment 3 2019-04-28 02:19:41 PDT
Created attachment 368426 [details] Patch WIP
Yusuke Suzuki
Comment 4 2019-04-28 04:25:44 PDT
I think we can implement CodeBlockSet with IsoCellSet with a bit interesting lock to support SamplingProfiler etc.
Yusuke Suzuki
Comment 5 2019-04-28 04:29:12 PDT
Created attachment 368428 [details] Patch WIP
jsc-armv7 EWS
Comment 6 2019-04-28 06:50:42 PDT
Comment on attachment 368428 [details] Patch Attachment 368428 [details] did not pass jsc-armv7-ews (jsc-only): Output: https://webkit-queues.webkit.org/results/12022531 New failing tests: stress/scope-operation-cache-global-property-bump-counter.js.default apiTests
EWS Watchlist
Comment 7 2019-04-28 06:57:15 PDT
Comment on attachment 368428 [details] Patch Attachment 368428 [details] did not pass jsc-ews (mac): Output: https://webkit-queues.webkit.org/results/12022539 New failing tests: stress/scope-operation-cache-global-property-bump-counter.js.default
Yusuke Suzuki
Comment 8 2019-05-07 02:25:27 PDT
Note You need to log in before you can comment on or make changes to this bug.