<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>186702</bug_id>
          
          <creation_ts>2018-06-15 15:02:48 -0700</creation_ts>
          <short_desc>CodeBlock&apos;s SegmentedVector wastes almost 400KB of Vector capacity on theverge.com</short_desc>
          <delta_ts>2019-04-27 22:41:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>saam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1433577</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-15 15:02:48 -0700</bug_when>
    <thetext>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&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul&gt;::VectorBuffer()
2   0x115829205 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
3   0x1158291e5 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
4   0x1158291c0 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
5   0x11580fc45 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
6   0x1158113aa JSC::CodeBlock::CodeBlock(JSC::VM*, JSC::Structure*, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)
7   0x1167404fb JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)
8   0x116740292 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433578</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-06-15 15:03:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/41173478&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433583</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-15 15:05:43 -0700</bug_when>
    <thetext>On nytimes.com:

Wasted capacity: 125336 bytes (used 16456 of 141792 bytes, utilization: 11.61%) - 1434 allocations
1   0x115829225 WTF::VectorBuffer&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul&gt;::VectorBuffer()
2   0x115829205 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
3   0x1158291e5 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
4   0x1158291c0 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
5   0x11580fc45 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
6   0x1158113aa JSC::CodeBlock::CodeBlock(JSC::VM*, JSC::Structure*, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)
7   0x1167404fb JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)
8   0x116740292 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433585</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-15 15:06:19 -0700</bug_when>
    <thetext>cnn.com:

Wasted capacity: 121520 bytes (used 20496 of 142016 bytes, utilization: 14.43%) - 1317 allocations
1   0x115829225 WTF::VectorBuffer&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul&gt;::VectorBuffer()
2   0x115829205 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
3   0x1158291e5 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
4   0x1158291c0 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
5   0x11580fc45 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
6   0x1158113aa JSC::CodeBlock::CodeBlock(JSC::VM*, JSC::Structure*, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)
7   0x1167404fb JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)
8   0x116740292 JSC::FunctionCodeBlock::FunctionCodeBlock(JSC::VM*, JSC::Structure*, JSC::FunctionExecutable*, JSC::UnlinkedFunctionCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433613</commentid>
    <comment_count>4</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2018-06-15 15:43:53 -0700</bug_when>
    <thetext>Hmm, I thought we shrunk it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1433614</commentid>
    <comment_count>5</comment_count>
    <who name="Saam Barati">saam</who>
    <bug_when>2018-06-15 15:44:34 -0700</bug_when>
    <thetext>Oh, this is for ArrayProfile. Got it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435970</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-24 20:59:49 -0700</bug_when>
    <thetext>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&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul&gt;::VectorBuffer()
2   0x1156dc995 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
3   0x1156dc975 WTF::Vector&lt;WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::Segment*, 0ul, WTF::CrashOnOverflow, 16ul&gt;::Vector()
4   0x1156dc950 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
5   0x1156c34c5 WTF::SegmentedVector&lt;JSC::ArrayProfile, 4ul&gt;::SegmentedVector()
6   0x1156c4c0d JSC::CodeBlock::CodeBlock(JSC::VM*, JSC::Structure*, JSC::ScriptExecutable*, JSC::UnlinkedCodeBlock*, JSC::JSScope*, WTF::RefPtr&lt;JSC::SourceProvider, WTF::DumbPtrTraits&lt;JSC::SourceProvider&gt; &gt;&amp;&amp;, unsigned int, unsigned int)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1499908</commentid>
    <comment_count>7</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-01-29 22:30:08 -0800</bug_when>
    <thetext>It&apos;s now moved to bytecode Metadata.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1531031</commentid>
    <comment_count>8</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2019-04-27 22:41:03 -0700</bug_when>
    <thetext>ArrayProfile is now handled in metadata.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>