Bug 186702 - CodeBlock's SegmentedVector wastes almost 400KB of Vector capacity on theverge.com
Summary: CodeBlock's SegmentedVector wastes almost 400KB of Vector capacity on theverg...
Status: RESOLVED CONFIGURATION CHANGED
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-15 15:02 PDT by Simon Fraser (smfr)
Modified: 2019-04-27 22:41 PDT (History)
4 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-15 15:02:48 PDT
On theverge.com, tooling from bug 186698:

Wasted capacity: 58232 bytes (used 8144 of 66376 bytes, utilization: 12.27%) - 603 allocations
1   0x115829225 WTF::VectorBuffer<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul>::VectorBuffer()
2   0x115829205 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
3   0x1158291e5 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
4   0x1158291c0 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
5   0x11580fc45 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
6   0x1158113aa 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)
7   0x1167404fb 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)
8   0x116740292 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)
Comment 1 Radar WebKit Bug Importer 2018-06-15 15:03:26 PDT
<rdar://problem/41173478>
Comment 2 Simon Fraser (smfr) 2018-06-15 15:05:43 PDT
On nytimes.com:

Wasted capacity: 125336 bytes (used 16456 of 141792 bytes, utilization: 11.61%) - 1434 allocations
1   0x115829225 WTF::VectorBuffer<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul>::VectorBuffer()
2   0x115829205 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
3   0x1158291e5 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
4   0x1158291c0 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
5   0x11580fc45 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
6   0x1158113aa 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)
7   0x1167404fb 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)
8   0x116740292 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)
Comment 3 Simon Fraser (smfr) 2018-06-15 15:06:19 PDT
cnn.com:

Wasted capacity: 121520 bytes (used 20496 of 142016 bytes, utilization: 14.43%) - 1317 allocations
1   0x115829225 WTF::VectorBuffer<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul>::VectorBuffer()
2   0x115829205 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
3   0x1158291e5 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
4   0x1158291c0 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
5   0x11580fc45 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
6   0x1158113aa 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)
7   0x1167404fb 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)
8   0x116740292 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)
Comment 4 Saam Barati 2018-06-15 15:43:53 PDT
Hmm, I thought we shrunk it?
Comment 5 Saam Barati 2018-06-15 15:44:34 PDT
Oh, this is for ArrayProfile. Got it.
Comment 6 Simon Fraser (smfr) 2018-06-24 20:59:49 PDT
Just saw almost 400KB on theverge.com:

Wasted capacity: 394016 bytes (used 58952 of 452968 bytes, utilization: 13.01%). 4460 allocations. Non-empty size range 8 to 888, non-empty capacity range 128-1088
1   0x1156dc9b5 WTF::VectorBuffer<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul>::VectorBuffer()
2   0x1156dc995 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
3   0x1156dc975 WTF::Vector<WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::Segment*, 0ul, WTF::CrashOnOverflow, 16ul>::Vector()
4   0x1156dc950 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
5   0x1156c34c5 WTF::SegmentedVector<JSC::ArrayProfile, 4ul>::SegmentedVector()
6   0x1156c4c0d 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)
Comment 7 Yusuke Suzuki 2019-01-29 22:30:08 PST
It's now moved to bytecode Metadata.
Comment 8 Yusuke Suzuki 2019-04-27 22:41:03 PDT
ArrayProfile is now handled in metadata.