Bug 186734 - FunctionCodeBlock wastes 144KB of HashTable capacity on cnn.com
Summary: FunctionCodeBlock wastes 144KB of HashTable capacity on cnn.com
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-16 12:29 PDT by Simon Fraser (smfr)
Modified: 2019-01-28 21:11 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2018-06-16 12:29:06 PDT
Using tooling from bug 186698, loading can and running "notifyutil -p com.apple.WebKit.dumpHashTableCapacity" shows:

Wasted capacity: 143952 bytes (used 37488 of 181440 bytes, utilization: 20.66%) - 4780 allocations
1   0x115776625 WTF::HashTable<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::KeyValuePair<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashMap<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> >, WTF::HashTraits<WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >::KeyValuePairTraits, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> > >::HashTable()
2   0x115776605 WTF::HashMap<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> >, WTF::HashTraits<WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >::HashMap()
3   0x11574ef25 WTF::HashMap<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> >, WTF::HashTraits<WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >::HashMap()
4   0x1157504a5 JSC::CodeBlock::CodeBlock(JSC::VM*, JSC::Structure*, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
5   0x11666020b JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
6   0x11665ffa2 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
7   0x116659b2e JSC::FunctionCodeBlock::create(JSC::VM*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
8   0x11665967b JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, JSC::JSFunction*, JSC::JSScope*, JSC::JSObject*&)
Comment 1 Radar WebKit Bug Importer 2018-06-16 12:29:37 PDT
<rdar://problem/41189150>
Comment 2 Simon Fraser (smfr) 2018-06-16 12:37:38 PDT
> 300KB on nytimes.com:

Wasted capacity: 301344 bytes (used 77088 of 378432 bytes, utilization: 20.37%) - 8369 allocations
1   0x115776625 WTF::HashTable<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::KeyValuePair<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashMap<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> >, WTF::HashTraits<WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >::KeyValuePairTraits, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> > >::HashTable()
2   0x115776605 WTF::HashMap<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> >, WTF::HashTraits<WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >::HashMap()
3   0x11574ef25 WTF::HashMap<std::__1::tuple<JSC::Structure*, JSC::Instruction*>, WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > >, WTF::TupleHash<JSC::Structure*, JSC::Instruction*>, WTF::HashTraits<std::__1::tuple<JSC::Structure*, JSC::Instruction*> >, WTF::HashTraits<WTF::Bag<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint, WTF::DumbPtrTraits<WTF::Private::BagNode<JSC::LLIntPrototypeLoadAdaptiveStructureWatchpoint> > > > >::HashMap()
4   0x1157504a5 JSC::CodeBlock::CodeBlock(JSC::VM*, JSC::Structure*, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
5   0x11666020b JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
6   0x11665ffa2 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
7   0x116659b2e JSC::FunctionCodeBlock::create(JSC::VM*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr<JSC::SourceProvider, WTF::DumbPtrTraits<JSC::SourceProvider> >&&, unsigned int, unsigned int)
8   0x11665967b JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, JSC::JSFunction*, JSC::JSScope*, JSC::JSObject*&)