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)
<rdar://problem/41189289>
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.
Created attachment 368426 [details] Patch WIP
I think we can implement CodeBlockSet with IsoCellSet with a bit interesting lock to support SamplingProfiler etc.
Created attachment 368428 [details] Patch WIP
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
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
Created attachment 369261 [details] Patch