<?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>131118</bug_id>
          
          <creation_ts>2014-04-02 12:26:35 -0700</creation_ts>
          <short_desc>Let&apos;s benchmark malloc</short_desc>
          <delta_ts>2014-04-02 18:54:18 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Geoffrey Garen">ggaren</reporter>
          <assigned_to name="Geoffrey Garen">ggaren</assigned_to>
          <cc>barraclough</cc>
    
    <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>kling</cc>
    
    <cc>mhahnenberg</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>996781</commentid>
    <comment_count>0</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 12:26:35 -0700</bug_when>
    <thetext>Let&apos;s benchmark malloc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996789</commentid>
    <comment_count>1</comment_count>
      <attachid>228412</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 12:44:41 -0700</bug_when>
    <thetext>Created attachment 228412
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996791</commentid>
    <comment_count>2</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 12:45:46 -0700</bug_when>
    <thetext>Note: There&apos;s a binary file of opcodes that goes with the Facebook benchmark. I haven&apos;t uploaded it here because Bugzilla.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996792</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2014-04-02 12:47:06 -0700</bug_when>
    <thetext>Attachment 228412 did not pass style-queue:


ERROR: PerformanceTests/MallocBench/MallocBench/big.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/big.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/big.cpp:33:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/big.cpp:42:  benchmark_big is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.cpp:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.cpp:178:  benchmark_tree_allocate is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.cpp:193:  benchmark_tree_traverse is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.cpp:208:  benchmark_tree_churn is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Interpreter.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Interpreter.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Interpreter.cpp:41:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.h:29:  benchmark_tree_allocate is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.h:30:  benchmark_tree_traverse is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/tree.h:31:  benchmark_tree_churn is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:32:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:113:  benchmark_message_one is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:126:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:133:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:136:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:141:  benchmark_message_many is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:158:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:168:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/message.cpp:172:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/medium.h:29:  benchmark_medium is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.cpp:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.cpp:99:  benchmark_list_allocate is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.cpp:127:  benchmark_list_traverse is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/medium.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/medium.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/medium.cpp:33:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/medium.cpp:42:  benchmark_medium is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.h:29:  benchmark_list_allocate is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/list.h:30:  benchmark_list_traverse is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Benchmark.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Benchmark.cpp:38:  Streams are highly discouraged.  [readability/streams] [3]
ERROR: PerformanceTests/MallocBench/MallocBench/Benchmark.cpp:47:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Benchmark.cpp:145:  Missing space before {  [whitespace/braces] [5]
ERROR: PerformanceTests/MallocBench/MallocBench/Benchmark.cpp:212:  vm_info is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Benchmark.cpp:213:  vm_size is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.h:29:  benchmark_fragment is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.h:30:  benchmark_fragment_iterate is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.cpp:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.cpp:82:  benchmark_fragment is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/fragment.cpp:110:  benchmark_fragment_iterate is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/big.h:29:  benchmark_big is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/balloon.h:29:  benchmark_balloon is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/balloon.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/balloon.cpp:28:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/balloon.cpp:34:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/balloon.cpp:36:  benchmark_balloon is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/facebook.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/facebook.cpp:28:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/facebook.cpp:31:  &quot;cstddef&quot; already included at PerformanceTests/MallocBench/MallocBench/facebook.cpp:30  [build/include] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/facebook.cpp:43:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/facebook.cpp:45:  benchmark_facebook is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CPUCount.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CPUCount.cpp:41:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: PerformanceTests/MallocBench/MallocBench/mbmalloc.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/realloc.h:29:  benchmark_realloc is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/realloc.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/realloc.cpp:30:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/realloc.cpp:32:  benchmark_realloc is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CommandLine.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CommandLine.cpp:28:  Streams are highly discouraged.  [readability/streams] [3]
ERROR: PerformanceTests/MallocBench/MallocBench/CommandLine.cpp:30:  CommandLine::long_options is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CommandLine.cpp:46:  option_index is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CommandLine.cpp:50:  This { should be at the end of the previous line  [whitespace/braces] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/main.cpp:28:  Streams are highly discouraged.  [readability/streams] [3]
ERROR: PerformanceTests/MallocBench/MallocBench/facebook.h:29:  benchmark_facebook is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Interpreter.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Interpreter.h:40:  More than one command on the same line  [whitespace/newline] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/Interpreter.h:41:  More than one command on the same line  [whitespace/newline] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.h:29:  benchmark_message_one is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/message.h:30:  benchmark_message_many is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/churn.h:29:  benchmark_churn is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/churn.cpp:26:  Found other header before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/churn.cpp:27:  Found header this file implements after other header. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/churn.cpp:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/churn.cpp:37:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/churn.cpp:42:  benchmark_churn is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: PerformanceTests/MallocBench/MallocBench/CommandLine.h:41:  long_options is incorrectly named. Don&apos;t use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 88 in 34 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996798</commentid>
    <comment_count>4</comment_count>
      <attachid>228412</attachid>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-04-02 12:57:19 -0700</bug_when>
    <thetext>Comment on attachment 228412
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=228412&amp;action=review

r=me with questions

&gt; PerformanceTests/MallocBench/MallocBench/CPUCount.cpp:34
&gt; +size_t cpuCount()

Don&apos;t we have something in WTF already that computes how many cores you have?

&gt; PerformanceTests/MallocBench/MallocBench/facebook.cpp:49
&gt; +    Interpreter interpreter(&quot;facebook.ops&quot;);

Is there a way to record these binary files for arbitrary workloads?

&gt; PerformanceTests/MallocBench/MallocBench/realloc.cpp:34
&gt; +void benchmark_realloc(bool isParallel)
&gt; +{
&gt; +}

Is this supposed to do anything yet?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996800</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-04-02 12:57:55 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (From update of attachment 228412 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=228412&amp;action=review
&gt; 
&gt; r=me with questions
&gt; 
&gt; &gt; PerformanceTests/MallocBench/MallocBench/CPUCount.cpp:34
&gt; &gt; +size_t cpuCount()
&gt; 
&gt; Don&apos;t we have something in WTF already that computes how many cores you have?
&gt; 
&gt; &gt; PerformanceTests/MallocBench/MallocBench/facebook.cpp:49
&gt; &gt; +    Interpreter interpreter(&quot;facebook.ops&quot;);
&gt; 
&gt; Is there a way to record these binary files for arbitrary workloads?
&gt; 
&gt; &gt; PerformanceTests/MallocBench/MallocBench/realloc.cpp:34
&gt; &gt; +void benchmark_realloc(bool isParallel)
&gt; &gt; +{
&gt; &gt; +}
&gt; 
&gt; Is this supposed to do anything yet?

Along with style fixes where appropriate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996804</commentid>
    <comment_count>6</comment_count>
      <attachid>228417</attachid>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 13:02:32 -0700</bug_when>
    <thetext>Created attachment 228417
Example Output Comparing SystemMalloc vs NanoMalloc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996805</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-04-02 13:04:11 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Created an attachment (id=228417) [details]
&gt; Example Output Comparing SystemMalloc vs NanoMalloc

One stylistic thing about the output. It might look nicer if we right-justified the columns with numbers in them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996806</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-04-02 13:06:24 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Created an attachment (id=228417) [details]
&gt; Example Output Comparing SystemMalloc vs NanoMalloc

Also, it would be nice if we could somehow factor out our confidence interval calculation stuff from bencher/run-jsc-benchmarks so that it could be reused in other scripts. Might be a good followup bug. I know I&apos;ve wished for that before when writing new performance analysis tools.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996812</commentid>
    <comment_count>9</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 13:18:58 -0700</bug_when>
    <thetext>&gt; Don&apos;t we have something in WTF already that computes how many cores you have?

Yes: wtf/NumberOfCores.cpp.

I wanted to avoid linking against other WebKit stuff because I wanted something stand-alone that I could give to non-WebKit developers to measure outside the WebKit context.

&gt; &gt; PerformanceTests/MallocBench/MallocBench/facebook.cpp:49
&gt; &gt; +    Interpreter interpreter(&quot;facebook.ops&quot;);
&gt; 
&gt; Is there a way to record these binary files for arbitrary workloads?

Sadly, in a fit of silliness, I seem to have lost the FastMalloc patch that does recordings. For any malloc, though, it&apos;s pretty easy to produce a recording: Duplicate the &quot;Op&quot; struct, put each allocation+size+slot in a hash table, and dump each malloc/free Op to a binary file as you go.

&gt; &gt; PerformanceTests/MallocBench/MallocBench/realloc.cpp:34
&gt; &gt; +void benchmark_realloc(bool isParallel)
&gt; &gt; +{
&gt; &gt; +}
&gt; 
&gt; Is this supposed to do anything yet?

No -- I haven&apos;t filled it out yet, and the script doesn&apos;t run it :(.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996813</commentid>
    <comment_count>10</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 13:20:24 -0700</bug_when>
    <thetext>&gt; Along with style fixes where appropriate.

Looks like the main thing that needs fixing is order of system header includes. I&apos;ll fix that. 

The other cases seem to be the bot being a bot.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996814</commentid>
    <comment_count>11</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 13:20:53 -0700</bug_when>
    <thetext>&gt; One stylistic thing about the output. It might look nicer if we right-justified the columns with numbers in them.

Will do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996819</commentid>
    <comment_count>12</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 13:24:21 -0700</bug_when>
    <thetext>&gt; Also, it would be nice if we could somehow factor out our confidence interval calculation stuff from bencher/run-jsc-benchmarks so that it could be reused in other scripts. Might be a good followup bug. I know I&apos;ve wished for that before when writing new performance analysis tools.

Yeah. I spent about 10 minutes trying to do this when I started the project, and then I reached the limits of my Ruby. We should try again: &lt;https://bugs.webkit.org/show_bug.cgi?id=131122&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996841</commentid>
    <comment_count>13</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 14:01:54 -0700</bug_when>
    <thetext>&gt; Looks like the main thing that needs fixing is order of system header includes. I&apos;ll fix that. 

Actually, I think it&apos;s complaining about mbmalloc.h following other things. mbmalloc.h needs to be last because it undefs the malloc APIs to catch errors in benchmarks.

Another complaint is &quot;benchmark_&quot; -- I think that&apos;s a special case because it&apos;s a global convention for mapping strings to function names.

Another complaint is &quot;^{&quot; -- but that&apos;s correct for blocks.

Another complaint is long_options. Fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996863</commentid>
    <comment_count>14</comment_count>
    <who name="Geoffrey Garen">ggaren</who>
    <bug_when>2014-04-02 14:39:18 -0700</bug_when>
    <thetext>Committed revision 166667.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996955</commentid>
    <comment_count>15</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2014-04-02 18:53:27 -0700</bug_when>
    <thetext>We need to add MallocBench to PerformanceTests/MallocBench since run-perf-tests can&apos;t parse results from this test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>996956</commentid>
    <comment_count>16</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2014-04-02 18:54:18 -0700</bug_when>
    <thetext>Oh, I guess we don&apos;t need to since we don&apos;t have any .html, .xhtml, and .svg files.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>228412</attachid>
            <date>2014-04-02 12:44:41 -0700</date>
            <delta_ts>2014-04-02 12:57:19 -0700</delta_ts>
            <desc>patch</desc>
            <filename>ro.txt</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="Geoffrey Garen">ggaren</attacher>
            
              <data encoding="base64"></data>
<flag name="review"
          id="252702"
          type_id="1"
          status="+"
          setter="mhahnenberg"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>228417</attachid>
            <date>2014-04-02 13:02:32 -0700</date>
            <delta_ts>2014-04-02 13:03:00 -0700</delta_ts>
            <desc>Example Output Comparing SystemMalloc vs NanoMalloc</desc>
            <filename>Example Output</filename>
            <type>text/plain</type>
            <size>6383</size>
            <attacher name="Geoffrey Garen">ggaren</attacher>
            
              <data encoding="base64">fj4gfi93ZWJraXQvUGVyZm9ybWFuY2VUZXN0cy9NYWxsb2NCZW5jaC9ydW4tbWFsbG9jLWJlbmNo
bWFya3MgLS1tZWFzdXJlLWhlYXAgU3lzdGVtTWFsbG9jIE5hbm9NYWxsb2MKICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3lzdGVtTWFs
bG9jICAgICBOYW5vTWFsbG9jCkV4ZWN1dGlvbiBUaW1lOgogICAgY2h1cm4gICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICA3MDVtcyAgICAgICAgICAgIDg0NW1zICAgICAgICAgICAgISAxLjJ4
IHNsb3dlcgogICAgY2h1cm4gLS1wYXJhbGxlbCAgICAgICAgICAgICAgICAgICAxMjdtcyAgICAg
ICAgICAgIDE2NG1zICAgICAgICAgICAgISAxLjI5eCBzbG93ZXIKICAgIGxpc3RfYWxsb2NhdGUg
ICAgICAgICAgICAgICAgICAgICAgMSwwMDNtcyAgICAgICAgICA1NDJtcyAgICAgICAgICAgIF4g
MS44NXggZmFzdGVyCiAgICBsaXN0X2FsbG9jYXRlIC0tcGFyYWxsZWwgICAgICAgICAgIDI3N21z
ICAgICAgICAgICAgMTM2bXMgICAgICAgICAgICBeIDIuMDR4IGZhc3RlcgogICAgdHJlZV9hbGxv
Y2F0ZSAgICAgICAgICAgICAgICAgICAgICA2NDltcyAgICAgICAgICAgIDMyN21zICAgICAgICAg
ICAgXiAxLjk4eCBmYXN0ZXIKICAgIHRyZWVfYWxsb2NhdGUgLS1wYXJhbGxlbCAgICAgICAgICAg
ODAxbXMgICAgICAgICAgICAzNzRtcyAgICAgICAgICAgIF4gMi4xNHggZmFzdGVyCiAgICB0cmVl
X2NodXJuICAgICAgICAgICAgICAgICAgICAgICAgIDMyMW1zICAgICAgICAgICAgMjQ4bXMgICAg
ICAgICAgICBeIDEuMjl4IGZhc3RlcgogICAgdHJlZV9jaHVybiAtLXBhcmFsbGVsICAgICAgICAg
ICAgICA0MDNtcyAgICAgICAgICAgIDI4MW1zICAgICAgICAgICAgXiAxLjQzeCBmYXN0ZXIKICAg
IGZhY2Vib29rICAgICAgICAgICAgICAgICAgICAgICAgICAgNTAybXMgICAgICAgICAgICA0NzFt
cyAgICAgICAgICAgIF4gMS4wN3ggZmFzdGVyCiAgICBmYWNlYm9vayAtLXBhcmFsbGVsICAgICAg
ICAgICAgICAgIDMsODAwbXMgICAgICAgICAgMyw5ODVtcyAgICAgICAgICAhIDEuMDV4IHNsb3dl
cgogICAgZnJhZ21lbnQgICAgICAgICAgICAgICAgICAgICAgICAgICA3MDJtcyAgICAgICAgICAg
IDM3OG1zICAgICAgICAgICAgXiAxLjg2eCBmYXN0ZXIKICAgIGZyYWdtZW50IC0tcGFyYWxsZWwg
ICAgICAgICAgICAgICAgMTMxbXMgICAgICAgICAgICAxMTZtcyAgICAgICAgICAgIF4gMS4xM3gg
ZmFzdGVyCiAgICBmcmFnbWVudF9pdGVyYXRlICAgICAgICAgICAgICAgICAgIDM0Mm1zICAgICAg
ICAgICAgNDU2bXMgICAgICAgICAgICAhIDEuMzN4IHNsb3dlcgogICAgZnJhZ21lbnRfaXRlcmF0
ZSAtLXBhcmFsbGVsICAgICAgICA0OG1zICAgICAgICAgICAgIDQybXMgICAgICAgICAgICAgXiAx
LjE0eCBmYXN0ZXIKICAgIG1lc3NhZ2Vfb25lICAgICAgICAgICAgICAgICAgICAgICAgNTg3bXMg
ICAgICAgICAgICA0NThtcyAgICAgICAgICAgIF4gMS4yOHggZmFzdGVyCiAgICBtZXNzYWdlX21h
bnkgICAgICAgICAgICAgICAgICAgICAgIDMsNjQxbXMgICAgICAgICAgMiw3NDJtcyAgICAgICAg
ICBeIDEuMzN4IGZhc3RlcgogICAgbWVkaXVtICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4
MjFtcyAgICAgICAgICAgIDgzMm1zICAgICAgICAgICAgISAxLjAxeCBzbG93ZXIKICAgIG1lZGl1
bSAtLXBhcmFsbGVsICAgICAgICAgICAgICAgICAgMzk1bXMgICAgICAgICAgICA0MzVtcyAgICAg
ICAgICAgICEgMS4xeCBzbG93ZXIKICAgIGJpZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgNzE4bXMgICAgICAgICAgICA3MzFtcyAgICAgICAgICAgICEgMS4wMnggc2xvd2VyCiAgICBi
aWcgLS1wYXJhbGxlbCAgICAgICAgICAgICAgICAgICAgIDI3Nm1zICAgICAgICAgICAgMjc1bXMg
ICAgICAgICAgICBeIDEuMHggZmFzdGVyCgogICAgPGdlb21ldHJpYyBtZWFuPiAgICAgICAgICAg
ICAgICAgICA0OTFtcyAgICAgICAgICAgIDQwM21zICAgICAgICAgICAgXiAxLjIyeCBmYXN0ZXIK
ICAgIDxhcml0aG1ldGljIG1lYW4+ICAgICAgICAgICAgICAgICAgODEybXMgICAgICAgICAgICA2
OTJtcyAgICAgICAgICAgIF4gMS4xN3ggZmFzdGVyCiAgICA8aGFybW9uaWMgbWVhbj4gICAgICAg
ICAgICAgICAgICAgIDI5NG1zICAgICAgICAgICAgMjQ4bXMgICAgICAgICAgICBeIDEuMTh4IGZh
c3RlcgoKUGVhayBNZW1vcnk6CiAgICBjaHVybiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IDU5MmtCICAgICAgICAgICAgNjQwa0IgICAgICAgICAgICAhIDEuMDh4IGJpZ2dlcgogICAgY2h1
cm4gLS1wYXJhbGxlbCAgICAgICAgICAgICAgICAgICAxLDA3MmtCICAgICAgICAgIDk5NmtCICAg
ICAgICAgICAgXiAxLjA4eCBzbWFsbGVyCiAgICBsaXN0X2FsbG9jYXRlICAgICAgICAgICAgICAg
ICAgICAgIDQsNjY0a0IgICAgICAgICAgNSwyNzZrQiAgICAgICAgICAhIDEuMTN4IGJpZ2dlcgog
ICAgbGlzdF9hbGxvY2F0ZSAtLXBhcmFsbGVsICAgICAgICAgICAzLDg4OGtCICAgICAgICAgIDMs
MTQwa0IgICAgICAgICAgXiAxLjI0eCBzbWFsbGVyCiAgICB0cmVlX2FsbG9jYXRlICAgICAgICAg
ICAgICAgICAgICAgIDUsNjg4a0IgICAgICAgICAgNSwzOTJrQiAgICAgICAgICBeIDEuMDV4IHNt
YWxsZXIKICAgIHRyZWVfYWxsb2NhdGUgLS1wYXJhbGxlbCAgICAgICAgICAgMTcsODI0a0IgICAg
ICAgICAxMiw1NzJrQiAgICAgICAgIF4gMS40Mnggc21hbGxlcgogICAgdHJlZV9jaHVybiAgICAg
ICAgICAgICAgICAgICAgICAgICAzLDY0MGtCICAgICAgICAgIDMsODM2a0IgICAgICAgICAgISAx
LjA1eCBiaWdnZXIKICAgIHRyZWVfY2h1cm4gLS1wYXJhbGxlbCAgICAgICAgICAgICAgMTEsMDU2
a0IgICAgICAgICA5LDExNmtCICAgICAgICAgIF4gMS4yMXggc21hbGxlcgogICAgZmFjZWJvb2sg
ICAgICAgICAgICAgICAgICAgICAgICAgICA3MCwzNjBrQiAgICAgICAgIDcwLDkzMmtCICAgICAg
ICAgISAxLjAxeCBiaWdnZXIKICAgIGZhY2Vib29rIC0tcGFyYWxsZWwgICAgICAgICAgICAgICAg
OTM5LDA2MGtCICAgICAgICAxLDA0Nyw4MDRrQiAgICAgICEgMS4xMnggYmlnZ2VyCiAgICBmcmFn
bWVudCAgICAgICAgICAgICAgICAgICAgICAgICAgIDYsNzE2a0IgICAgICAgICAgNSw3NzZrQiAg
ICAgICAgICBeIDEuMTZ4IHNtYWxsZXIKICAgIGZyYWdtZW50IC0tcGFyYWxsZWwgICAgICAgICAg
ICAgICAgMTAsOTY0a0IgICAgICAgICA5LDY4MGtCICAgICAgICAgIF4gMS4xM3ggc21hbGxlcgog
ICAgZnJhZ21lbnRfaXRlcmF0ZSAgICAgICAgICAgICAgICAgICAyMiwwNzZrQiAgICAgICAgIDIx
LDU5NmtCICAgICAgICAgXiAxLjAyeCBzbWFsbGVyCiAgICBmcmFnbWVudF9pdGVyYXRlIC0tcGFy
YWxsZWwgICAgICAgIDM2LDg1MmtCICAgICAgICAgMjMsNjE2a0IgICAgICAgICBeIDEuNTZ4IHNt
YWxsZXIKICAgIG1lc3NhZ2Vfb25lICAgICAgICAgICAgICAgICAgICAgICAgOCw5MDRrQiAgICAg
ICAgICAxMSw5NjBrQiAgICAgICAgICEgMS4zNHggYmlnZ2VyCiAgICBtZXNzYWdlX21hbnkgICAg
ICAgICAgICAgICAgICAgICAgIDExLDUzNmtCICAgICAgICAgOCw0MDBrQiAgICAgICAgICBeIDEu
Mzd4IHNtYWxsZXIKICAgIG1lZGl1bSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwxMDks
MzY0a0IgICAgICAxLDEwOCwwMDRrQiAgICAgIF4gMS4weCBzbWFsbGVyCiAgICBtZWRpdW0gLS1w
YXJhbGxlbCAgICAgICAgICAgICAgICAgIDEsMDQwLDkzMmtCICAgICAgMSwwMzMsMDQ0a0IgICAg
ICBeIDEuMDF4IHNtYWxsZXIKICAgIGJpZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
MSwwNjUsMTg4a0IgICAgICAxLDA2NSwyNzJrQiAgICAgICEgMS4weCBiaWdnZXIKICAgIGJpZyAt
LXBhcmFsbGVsICAgICAgICAgICAgICAgICAgICAgMSwwMTEsMDk2a0IgICAgICA5OTMsMjY0a0Ig
ICAgICAgIF4gMS4wMnggc21hbGxlcgoKICAgIDxnZW9tZXRyaWMgbWVhbj4gICAgICAgICAgICAg
ICAgICAgMjYsMjI5a0IgICAgICAgICAyNCw1NzVrQiAgICAgICAgIF4gMS4wN3ggc21hbGxlcgog
ICAgPGFyaXRobWV0aWMgbWVhbj4gICAgICAgICAgICAgICAgICAyNjksMDc0a0IgICAgICAgIDI3
MiwwMTZrQiAgICAgICAgISAxLjAxeCBiaWdnZXIKICAgIDxoYXJtb25pYyBtZWFuPiAgICAgICAg
ICAgICAgICAgICAgNCw3MzhrQiAgICAgICAgICA0LDY1NWtCICAgICAgICAgIF4gMS4wMnggc21h
bGxlcgoKTWVtb3J5IGF0IEVuZDoKICAgIGNodXJuICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgMzQwa0IgICAgICAgICAgICAzODhrQiAgICAgICAgICAgICEgMS4xNHggYmlnZ2VyCiAgICBj
aHVybiAtLXBhcmFsbGVsICAgICAgICAgICAgICAgICAgIDgxNmtCICAgICAgICAgICAgNzQwa0Ig
ICAgICAgICAgICBeIDEuMXggc21hbGxlcgogICAgbGlzdF9hbGxvY2F0ZSAgICAgICAgICAgICAg
ICAgICAgICAzLDQyMGtCICAgICAgICAgIDUsMDI0a0IgICAgICAgICAgISAxLjQ3eCBiaWdnZXIK
ICAgIGxpc3RfYWxsb2NhdGUgLS1wYXJhbGxlbCAgICAgICAgICAgMyw2MzJrQiAgICAgICAgICAy
LDg4NGtCICAgICAgICAgIF4gMS4yNnggc21hbGxlcgogICAgdHJlZV9hbGxvY2F0ZSAgICAgICAg
ICAgICAgICAgICAgICAxLDQyNGtCICAgICAgICAgIDUsMTQwa0IgICAgICAgICAgISAzLjYxeCBi
aWdnZXIKICAgIHRyZWVfYWxsb2NhdGUgLS1wYXJhbGxlbCAgICAgICAgICAgMTYsNTcya0IgICAg
ICAgICAxMiwzMTZrQiAgICAgICAgIF4gMS4zNXggc21hbGxlcgogICAgdHJlZV9jaHVybiAgICAg
ICAgICAgICAgICAgICAgICAgICAxLDM5MmtCICAgICAgICAgIDMsNTg0a0IgICAgICAgICAgISAy
LjU3eCBiaWdnZXIKICAgIHRyZWVfY2h1cm4gLS1wYXJhbGxlbCAgICAgICAgICAgICAgMTAsODAw
a0IgICAgICAgICA4LDg2MGtCICAgICAgICAgIF4gMS4yMnggc21hbGxlcgogICAgZmFjZWJvb2sg
ICAgICAgICAgICAgICAgICAgICAgICAgICAxNyw0MTZrQiAgICAgICAgIDI0LDAwMGtCICAgICAg
ICAgISAxLjM4eCBiaWdnZXIKICAgIGZhY2Vib29rIC0tcGFyYWxsZWwgICAgICAgICAgICAgICAg
MTU4LDQ5NmtCICAgICAgICAyNjQsNTQ4a0IgICAgICAgICEgMS42N3ggYmlnZ2VyCiAgICBmcmFn
bWVudCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsNDYwa0IgICAgICAgICAgNSw1MjRrQiAg
ICAgICAgICAhIDIuMjV4IGJpZ2dlcgogICAgZnJhZ21lbnQgLS1wYXJhbGxlbCAgICAgICAgICAg
ICAgICAxMCw3MDhrQiAgICAgICAgIDksNDI0a0IgICAgICAgICAgXiAxLjE0eCBzbWFsbGVyCiAg
ICBmcmFnbWVudF9pdGVyYXRlICAgICAgICAgICAgICAgICAgIDUsNzc2a0IgICAgICAgICAgMjEs
MzQ0a0IgICAgICAgICAhIDMuN3ggYmlnZ2VyCiAgICBmcmFnbWVudF9pdGVyYXRlIC0tcGFyYWxs
ZWwgICAgICAgIDIwLDU0NGtCICAgICAgICAgMjMsMzYwa0IgICAgICAgICAhIDEuMTR4IGJpZ2dl
cgogICAgbWVzc2FnZV9vbmUgICAgICAgICAgICAgICAgICAgICAgICA3LDY0NGtCICAgICAgICAg
IDExLDcwNGtCICAgICAgICAgISAxLjUzeCBiaWdnZXIKICAgIG1lc3NhZ2VfbWFueSAgICAgICAg
ICAgICAgICAgICAgICAgMTEsMjgwa0IgICAgICAgICA4LDE0NGtCICAgICAgICAgIF4gMS4zOXgg
c21hbGxlcgogICAgbWVkaXVtICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMiw2NDRrQiAg
ICAgICAgIDExLDI4NGtCICAgICAgICAgXiAxLjEyeCBzbWFsbGVyCiAgICBtZWRpdW0gLS1wYXJh
bGxlbCAgICAgICAgICAgICAgICAgIDExNSwwMDBrQiAgICAgICAgOTMsMTg0a0IgICAgICAgICBe
IDEuMjN4IHNtYWxsZXIKICAgIGJpZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOSw0
MjhrQiAgICAgICAgICAxNyw3MDRrQiAgICAgICAgICEgMS44OHggYmlnZ2VyCiAgICBiaWcgLS1w
YXJhbGxlbCAgICAgICAgICAgICAgICAgICAgIDExMCwzMjBrQiAgICAgICAgMTIxLDI5NmtCICAg
ICAgICAhIDEuMXggYmlnZ2VyCgogICAgPGdlb21ldHJpYyBtZWFuPiAgICAgICAgICAgICAgICAg
ICA4LDA3MWtCICAgICAgICAgIDEwLDU1OWtCICAgICAgICAgISAxLjMxeCBiaWdnZXIKICAgIDxh
cml0aG1ldGljIG1lYW4+ICAgICAgICAgICAgICAgICAgMjYsMDA2a0IgICAgICAgICAzMiw1MjNr
QiAgICAgICAgICEgMS4yNXggYmlnZ2VyCiAgICA8aGFybW9uaWMgbWVhbj4gICAgICAgICAgICAg
ICAgICAgIDIsNjYxa0IgICAgICAgICAgMywzNjlrQiAgICAgICAgICAhIDEuMjd4IGJpZ2dlcgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>