<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196955] trunk/PerformanceTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196955">196955</a></dd>
<dt>Author</dt> <dd>msaboff@apple.com</dd>
<dt>Date</dt> <dd>2016-02-22 14:02:24 -0800 (Mon, 22 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>MallocBench: Added recording for nimlang website, new recording details and added new options
https://bugs.webkit.org/show_bug.cgi?id=154485

Reviewed by Geoff Garen.

Added new capabilities to MallocBench.  These include:
    Added a recording of http://nim-lang.org/docs/lib.html.
    Added thread id to the recording and the ability to playback switching threads in MallocBench
    Added aligned allocations to recordings and the ability to playback 
    Added --use-thread-id option to honor recorded thread ids
    Added --detailed-report to output remaining allocations by size after playback
    Added --no-warmup to not run the warm up iteration

Changed the way that options are passed down to the benchmarks.  Instead of passing individual
boolean or numeric option values, just pass a reference the CommandLine itself.  Each benchmark
can access the options that are appropriate.  The Benchmark class also uses the options for
is parallel, run counts and warm up.

Added thread id and aligned malloc to the Op by noticing that structure padding and Opcode allowed
for another 32 bits of data.  Breaking that unused 32 bits into a 16 bit thread id value and a
16 bit log base 2 of the alignment for aligned malloc allowed for existing recordings to playback
without any incompatibilities.

Threaded operation is simulated by creating threads as needed.  As long as the next Op's thread id
is the same as the last, operation continues as normal.  When the next Op has a different thread id,
we switch to that thread using the shared Op stream to continue playing back.  There is a mutex to
assure that only one thread is really running at a time and a condition variable used to wait
that the current thread id matches each block thread's thread id.  This doesn't simulate true
concurrent threading, but is instead plays back Ops recorded for multiple thread faithfully.

* MallocBench/MallocBench.xcodeproj/project.pbxproj:
* MallocBench/MallocBench/Benchmark.cpp:
(deallocateHeap):
(Benchmark::Benchmark):
(Benchmark::runOnce):
(Benchmark::run):
* MallocBench/MallocBench/Benchmark.h:
(Benchmark::isValid):
* MallocBench/MallocBench/CommandLine.cpp:
(CommandLine::printUsage):
* MallocBench/MallocBench/CommandLine.h:
(CommandLine::isValid):
(CommandLine::benchmarkName):
(CommandLine::isParallel):
(CommandLine::useThreadID):
(CommandLine::detailedReport):
(CommandLine::warmUp):
(CommandLine::heapSize):
(CommandLine::runs):
* MallocBench/MallocBench/Interpreter.cpp:
(Interpreter::Interpreter):
(Interpreter::run):
(Interpreter::readOps):
(Interpreter::doOnSameThread):
(Interpreter::switchToThread):
(Interpreter::detailedReport):
(compute2toPower):
(writeData):
(Interpreter::doMallocOp):
(Interpreter::Thread::Thread):
(Interpreter::Thread::stop):
(Interpreter::Thread::~Thread):
(Interpreter::Thread::runThread):
(Interpreter::Thread::waitToRun):
(Interpreter::Thread::switchTo):
* MallocBench/MallocBench/Interpreter.h:
(Interpreter::Thread::isMainThread):
* MallocBench/MallocBench/alloc_free.cpp: Added.
(benchmark_alloc_free):
* MallocBench/MallocBench/alloc_free.h: Added.
* MallocBench/MallocBench/balloon.cpp:
(benchmark_balloon):
* MallocBench/MallocBench/balloon.h:
* MallocBench/MallocBench/big.cpp:
(benchmark_big):
* MallocBench/MallocBench/big.h:
* MallocBench/MallocBench/churn.cpp:
(benchmark_churn):
* MallocBench/MallocBench/churn.h:
* MallocBench/MallocBench/facebook.cpp:
(benchmark_facebook):
* MallocBench/MallocBench/facebook.h:
* MallocBench/MallocBench/flickr.cpp:
(benchmark_flickr):
(benchmark_flickr_memory_warning):
* MallocBench/MallocBench/flickr.h:
* MallocBench/MallocBench/fragment.cpp:
(validate):
(benchmark_fragment):
(benchmark_fragment_iterate):
* MallocBench/MallocBench/fragment.h:
* MallocBench/MallocBench/list.cpp:
(benchmark_list_allocate):
(benchmark_list_traverse):
* MallocBench/MallocBench/list.h:
* MallocBench/MallocBench/main.cpp:
(main):
* MallocBench/MallocBench/medium.cpp:
(benchmark_medium):
* MallocBench/MallocBench/medium.h:
* MallocBench/MallocBench/memalign.cpp:
(test):
(benchmark_memalign):
* MallocBench/MallocBench/memalign.h:
* MallocBench/MallocBench/message.cpp:
(benchmark_message_one):
(benchmark_message_many):
* MallocBench/MallocBench/message.h:
* MallocBench/MallocBench/nimlang.cpp: Added.
(benchmark_nimlang):
* MallocBench/MallocBench/nimlang.h: Added.
* MallocBench/MallocBench/nimlang.ops: Added.
* MallocBench/MallocBench/realloc.cpp:
(benchmark_realloc):
* MallocBench/MallocBench/realloc.h:
* MallocBench/MallocBench/reddit.cpp:
(benchmark_reddit):
(benchmark_reddit_memory_warning):
* MallocBench/MallocBench/reddit.h:
* MallocBench/MallocBench/stress.cpp:
(deallocate):
(benchmark_stress):
* MallocBench/MallocBench/stress.h:
* MallocBench/MallocBench/stress_aligned.cpp:
(benchmark_stress_aligned):
* MallocBench/MallocBench/stress_aligned.h:
* MallocBench/MallocBench/theverge.cpp:
(benchmark_theverge):
(benchmark_theverge_memory_warning):
* MallocBench/MallocBench/theverge.h:
* MallocBench/MallocBench/tree.cpp:
(benchmark_tree_allocate):
(benchmark_tree_traverse):
(benchmark_tree_churn):
* MallocBench/MallocBench/tree.h:
* MallocBench/run-malloc-benchmarks:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchBenchmarkcpp">trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchBenchmarkh">trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchCommandLinecpp">trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchCommandLineh">trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchInterpretercpp">trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchInterpreterh">trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchballooncpp">trunk/PerformanceTests/MallocBench/MallocBench/balloon.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchballoonh">trunk/PerformanceTests/MallocBench/MallocBench/balloon.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchbigcpp">trunk/PerformanceTests/MallocBench/MallocBench/big.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchbigh">trunk/PerformanceTests/MallocBench/MallocBench/big.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchchurncpp">trunk/PerformanceTests/MallocBench/MallocBench/churn.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchchurnh">trunk/PerformanceTests/MallocBench/MallocBench/churn.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchfacebookcpp">trunk/PerformanceTests/MallocBench/MallocBench/facebook.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchfacebookh">trunk/PerformanceTests/MallocBench/MallocBench/facebook.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchflickrcpp">trunk/PerformanceTests/MallocBench/MallocBench/flickr.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchflickrh">trunk/PerformanceTests/MallocBench/MallocBench/flickr.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchfragmentcpp">trunk/PerformanceTests/MallocBench/MallocBench/fragment.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchfragmenth">trunk/PerformanceTests/MallocBench/MallocBench/fragment.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchlistcpp">trunk/PerformanceTests/MallocBench/MallocBench/list.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchlisth">trunk/PerformanceTests/MallocBench/MallocBench/list.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmaincpp">trunk/PerformanceTests/MallocBench/MallocBench/main.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmediumcpp">trunk/PerformanceTests/MallocBench/MallocBench/medium.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmediumh">trunk/PerformanceTests/MallocBench/MallocBench/medium.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmemaligncpp">trunk/PerformanceTests/MallocBench/MallocBench/memalign.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmemalignh">trunk/PerformanceTests/MallocBench/MallocBench/memalign.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmessagecpp">trunk/PerformanceTests/MallocBench/MallocBench/message.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchmessageh">trunk/PerformanceTests/MallocBench/MallocBench/message.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchrealloccpp">trunk/PerformanceTests/MallocBench/MallocBench/realloc.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchrealloch">trunk/PerformanceTests/MallocBench/MallocBench/realloc.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchredditcpp">trunk/PerformanceTests/MallocBench/MallocBench/reddit.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchreddith">trunk/PerformanceTests/MallocBench/MallocBench/reddit.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchstresscpp">trunk/PerformanceTests/MallocBench/MallocBench/stress.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchstressh">trunk/PerformanceTests/MallocBench/MallocBench/stress.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchstress_alignedcpp">trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchstress_alignedh">trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchthevergecpp">trunk/PerformanceTests/MallocBench/MallocBench/theverge.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchthevergeh">trunk/PerformanceTests/MallocBench/MallocBench/theverge.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchtreecpp">trunk/PerformanceTests/MallocBench/MallocBench/tree.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchtreeh">trunk/PerformanceTests/MallocBench/MallocBench/tree.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchxcodeprojprojectpbxproj">trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchrunmallocbenchmarks">trunk/PerformanceTests/MallocBench/run-malloc-benchmarks</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchalloc_freecpp">trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchalloc_freeh">trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchnimlangcpp">trunk/PerformanceTests/MallocBench/MallocBench/nimlang.cpp</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchnimlangh">trunk/PerformanceTests/MallocBench/MallocBench/nimlang.h</a></li>
<li><a href="#trunkPerformanceTestsMallocBenchMallocBenchnimlangops">trunk/PerformanceTests/MallocBench/MallocBench/nimlang.ops</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/ChangeLog        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -1,3 +1,142 @@
</span><ins>+2016-02-19  Michael Saboff  &lt;msaboff@apple.com&gt;
+
+        MallocBench: Added recording for nimlang website, new recording details and added new options
+        https://bugs.webkit.org/show_bug.cgi?id=154485
+
+        Reviewed by Geoff Garen.
+
+        Added new capabilities to MallocBench.  These include:
+            Added a recording of http://nim-lang.org/docs/lib.html.
+            Added thread id to the recording and the ability to playback switching threads in MallocBench
+            Added aligned allocations to recordings and the ability to playback 
+            Added --use-thread-id option to honor recorded thread ids
+            Added --detailed-report to output remaining allocations by size after playback
+            Added --no-warmup to not run the warm up iteration
+
+        Changed the way that options are passed down to the benchmarks.  Instead of passing individual
+        boolean or numeric option values, just pass a reference the CommandLine itself.  Each benchmark
+        can access the options that are appropriate.  The Benchmark class also uses the options for
+        is parallel, run counts and warm up.
+
+        Added thread id and aligned malloc to the Op by noticing that structure padding and Opcode allowed
+        for another 32 bits of data.  Breaking that unused 32 bits into a 16 bit thread id value and a
+        16 bit log base 2 of the alignment for aligned malloc allowed for existing recordings to playback
+        without any incompatibilities.
+
+        Threaded operation is simulated by creating threads as needed.  As long as the next Op's thread id
+        is the same as the last, operation continues as normal.  When the next Op has a different thread id,
+        we switch to that thread using the shared Op stream to continue playing back.  There is a mutex to
+        assure that only one thread is really running at a time and a condition variable used to wait
+        that the current thread id matches each block thread's thread id.  This doesn't simulate true
+        concurrent threading, but is instead plays back Ops recorded for multiple thread faithfully.
+
+        * MallocBench/MallocBench.xcodeproj/project.pbxproj:
+        * MallocBench/MallocBench/Benchmark.cpp:
+        (deallocateHeap):
+        (Benchmark::Benchmark):
+        (Benchmark::runOnce):
+        (Benchmark::run):
+        * MallocBench/MallocBench/Benchmark.h:
+        (Benchmark::isValid):
+        * MallocBench/MallocBench/CommandLine.cpp:
+        (CommandLine::printUsage):
+        * MallocBench/MallocBench/CommandLine.h:
+        (CommandLine::isValid):
+        (CommandLine::benchmarkName):
+        (CommandLine::isParallel):
+        (CommandLine::useThreadID):
+        (CommandLine::detailedReport):
+        (CommandLine::warmUp):
+        (CommandLine::heapSize):
+        (CommandLine::runs):
+        * MallocBench/MallocBench/Interpreter.cpp:
+        (Interpreter::Interpreter):
+        (Interpreter::run):
+        (Interpreter::readOps):
+        (Interpreter::doOnSameThread):
+        (Interpreter::switchToThread):
+        (Interpreter::detailedReport):
+        (compute2toPower):
+        (writeData):
+        (Interpreter::doMallocOp):
+        (Interpreter::Thread::Thread):
+        (Interpreter::Thread::stop):
+        (Interpreter::Thread::~Thread):
+        (Interpreter::Thread::runThread):
+        (Interpreter::Thread::waitToRun):
+        (Interpreter::Thread::switchTo):
+        * MallocBench/MallocBench/Interpreter.h:
+        (Interpreter::Thread::isMainThread):
+        * MallocBench/MallocBench/alloc_free.cpp: Added.
+        (benchmark_alloc_free):
+        * MallocBench/MallocBench/alloc_free.h: Added.
+        * MallocBench/MallocBench/balloon.cpp:
+        (benchmark_balloon):
+        * MallocBench/MallocBench/balloon.h:
+        * MallocBench/MallocBench/big.cpp:
+        (benchmark_big):
+        * MallocBench/MallocBench/big.h:
+        * MallocBench/MallocBench/churn.cpp:
+        (benchmark_churn):
+        * MallocBench/MallocBench/churn.h:
+        * MallocBench/MallocBench/facebook.cpp:
+        (benchmark_facebook):
+        * MallocBench/MallocBench/facebook.h:
+        * MallocBench/MallocBench/flickr.cpp:
+        (benchmark_flickr):
+        (benchmark_flickr_memory_warning):
+        * MallocBench/MallocBench/flickr.h:
+        * MallocBench/MallocBench/fragment.cpp:
+        (validate):
+        (benchmark_fragment):
+        (benchmark_fragment_iterate):
+        * MallocBench/MallocBench/fragment.h:
+        * MallocBench/MallocBench/list.cpp:
+        (benchmark_list_allocate):
+        (benchmark_list_traverse):
+        * MallocBench/MallocBench/list.h:
+        * MallocBench/MallocBench/main.cpp:
+        (main):
+        * MallocBench/MallocBench/medium.cpp:
+        (benchmark_medium):
+        * MallocBench/MallocBench/medium.h:
+        * MallocBench/MallocBench/memalign.cpp:
+        (test):
+        (benchmark_memalign):
+        * MallocBench/MallocBench/memalign.h:
+        * MallocBench/MallocBench/message.cpp:
+        (benchmark_message_one):
+        (benchmark_message_many):
+        * MallocBench/MallocBench/message.h:
+        * MallocBench/MallocBench/nimlang.cpp: Added.
+        (benchmark_nimlang):
+        * MallocBench/MallocBench/nimlang.h: Added.
+        * MallocBench/MallocBench/nimlang.ops: Added.
+        * MallocBench/MallocBench/realloc.cpp:
+        (benchmark_realloc):
+        * MallocBench/MallocBench/realloc.h:
+        * MallocBench/MallocBench/reddit.cpp:
+        (benchmark_reddit):
+        (benchmark_reddit_memory_warning):
+        * MallocBench/MallocBench/reddit.h:
+        * MallocBench/MallocBench/stress.cpp:
+        (deallocate):
+        (benchmark_stress):
+        * MallocBench/MallocBench/stress.h:
+        * MallocBench/MallocBench/stress_aligned.cpp:
+        (benchmark_stress_aligned):
+        * MallocBench/MallocBench/stress_aligned.h:
+        * MallocBench/MallocBench/theverge.cpp:
+        (benchmark_theverge):
+        (benchmark_theverge_memory_warning):
+        * MallocBench/MallocBench/theverge.h:
+        * MallocBench/MallocBench/tree.cpp:
+        (benchmark_tree_allocate):
+        (benchmark_tree_traverse):
+        (benchmark_tree_churn):
+        * MallocBench/MallocBench/tree.h:
+        * MallocBench/run-malloc-benchmarks:
+
</ins><span class="cx"> 2016-02-11  Jon Lee  &lt;jonlee@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix a missing refactoring.
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchBenchmarkcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Benchmark.h&quot;
</span><span class="cx"> #include &quot;CPUCount.h&quot;
</span><ins>+#include &quot;alloc_free.h&quot;
</ins><span class="cx"> #include &quot;balloon.h&quot;
</span><span class="cx"> #include &quot;big.h&quot;
</span><span class="cx"> #include &quot;churn.h&quot;
</span><span class="lines">@@ -35,8 +36,10 @@
</span><span class="cx"> #include &quot;medium.h&quot;
</span><span class="cx"> #include &quot;memalign.h&quot;
</span><span class="cx"> #include &quot;message.h&quot;
</span><ins>+#include &quot;nimlang.h&quot;
</ins><span class="cx"> #include &quot;reddit.h&quot;
</span><span class="cx"> #include &quot;realloc.h&quot;
</span><ins>+#include &quot;simple.h&quot;
</ins><span class="cx"> #include &quot;stress.h&quot;
</span><span class="cx"> #include &quot;stress_aligned.h&quot;
</span><span class="cx"> #include &quot;theverge.h&quot;
</span><span class="lines">@@ -61,6 +64,7 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> static const BenchmarkPair benchmarkPairs[] = {
</span><ins>+    { &quot;alloc_free&quot;, benchmark_alloc_free },
</ins><span class="cx">     { &quot;balloon&quot;, benchmark_balloon },
</span><span class="cx">     { &quot;big&quot;, benchmark_big },
</span><span class="cx">     { &quot;churn&quot;, benchmark_churn },
</span><span class="lines">@@ -75,6 +79,7 @@
</span><span class="cx">     { &quot;memalign&quot;, benchmark_memalign },
</span><span class="cx">     { &quot;message_many&quot;, benchmark_message_many },
</span><span class="cx">     { &quot;message_one&quot;, benchmark_message_one },
</span><ins>+    { &quot;nimlang&quot;, benchmark_nimlang },
</ins><span class="cx">     { &quot;realloc&quot;, benchmark_realloc },
</span><span class="cx">     { &quot;reddit&quot;, benchmark_reddit },
</span><span class="cx">     { &quot;reddit_memory_warning&quot;, benchmark_reddit_memory_warning },
</span><span class="lines">@@ -127,15 +132,13 @@
</span><span class="cx">     mbfree(chunks, chunkCount * sizeof(void**));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Benchmark::Benchmark(const string&amp; benchmarkName, bool isParallel, size_t runs, size_t heapSize)
</del><ins>+Benchmark::Benchmark(CommandLine&amp; commandLine)
</ins><span class="cx">     : m_benchmarkPair()
</span><span class="cx">     , m_elapsedTime()
</span><del>-    , m_isParallel(isParallel)
-    , m_heapSize(heapSize)
-    , m_runs(runs)
</del><ins>+    , m_commandLine(commandLine)
</ins><span class="cx"> {
</span><span class="cx">     const BenchmarkPair* benchmarkPair = std::find(
</span><del>-        benchmarkPairs, benchmarkPairs + benchmarksPairsCount, benchmarkName);
</del><ins>+        benchmarkPairs, benchmarkPairs + benchmarksPairsCount, m_commandLine.benchmarkName());
</ins><span class="cx">     if (benchmarkPair == benchmarkPairs + benchmarksPairsCount)
</span><span class="cx">         return;
</span><span class="cx">     
</span><span class="lines">@@ -151,8 +154,8 @@
</span><span class="cx"> 
</span><span class="cx"> void Benchmark::runOnce()
</span><span class="cx"> {
</span><del>-    if (!m_isParallel) {
-        m_benchmarkPair-&gt;function(m_isParallel);
</del><ins>+    if (!m_commandLine.isParallel()) {
+        m_benchmarkPair-&gt;function(m_commandLine);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -160,7 +163,7 @@
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; cpuCount(); ++i) {
</span><span class="cx">         dispatch_group_async(group, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
</span><del>-            m_benchmarkPair-&gt;function(m_isParallel);
</del><ins>+            m_benchmarkPair-&gt;function(m_commandLine);
</ins><span class="cx">         });
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -174,20 +177,23 @@
</span><span class="cx">     static const size_t objectSize = 32;
</span><span class="cx">     static const size_t chunkSize = 1024 * 1024;
</span><span class="cx">     
</span><del>-    void*** heap = allocateHeap(m_heapSize, chunkSize, objectSize);
</del><ins>+    void*** heap = allocateHeap(m_commandLine.heapSize(), chunkSize, objectSize);
</ins><span class="cx"> 
</span><del>-    runOnce(); // Warmup run.
</del><ins>+    if (m_commandLine.warmUp())
+        runOnce(); // Warmup run.
</ins><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; m_runs; ++i) {
</del><ins>+    size_t runs = m_commandLine.runs();
+
+    for (size_t i = 0; i &lt; runs; ++i) {
</ins><span class="cx">         double start = currentTimeMS();
</span><span class="cx">         runOnce();
</span><span class="cx">         double end = currentTimeMS();
</span><span class="cx">         double elapsed = end - start;
</span><span class="cx">         m_elapsedTime += elapsed;
</span><span class="cx">     }
</span><del>-    m_elapsedTime /= m_runs;
</del><ins>+    m_elapsedTime /= runs;
</ins><span class="cx"> 
</span><del>-    deallocateHeap(heap, m_heapSize, chunkSize, objectSize);
</del><ins>+    deallocateHeap(heap, m_commandLine.heapSize(), chunkSize, objectSize);
</ins><span class="cx">     
</span><span class="cx">     mbscavenge();
</span><span class="cx">     m_memory = currentMemoryBytes();
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchBenchmarkh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Benchmark.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,10 +26,11 @@
</span><span class="cx"> #ifndef Benchmark_h
</span><span class="cx"> #define Benchmark_h
</span><span class="cx"> 
</span><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> #include &lt;map&gt;
</span><span class="cx"> #include &lt;string&gt;
</span><span class="cx"> 
</span><del>-typedef void (*BenchmarkFunction)(bool isParallel);
</del><ins>+typedef void (*BenchmarkFunction)(CommandLine&amp; commandLine);
</ins><span class="cx"> struct BenchmarkPair;
</span><span class="cx"> 
</span><span class="cx"> class Benchmark {
</span><span class="lines">@@ -59,7 +60,7 @@
</span><span class="cx">     static double currentTimeMS();
</span><span class="cx">     static Memory currentMemoryBytes();
</span><span class="cx"> 
</span><del>-    Benchmark(const std::string&amp;, bool isParallel, size_t runs, size_t heapSize);
</del><ins>+    Benchmark(CommandLine&amp;);
</ins><span class="cx">     
</span><span class="cx">     bool isValid() { return m_benchmarkPair; }
</span><span class="cx">     
</span><span class="lines">@@ -75,10 +76,9 @@
</span><span class="cx">     MapType m_map;
</span><span class="cx"> 
</span><span class="cx">     const BenchmarkPair* m_benchmarkPair;
</span><del>-    bool m_isParallel;
-    size_t m_runs;
-    size_t m_heapSize;
</del><span class="cx"> 
</span><ins>+    CommandLine&amp; m_commandLine;
+
</ins><span class="cx">     Memory m_memory;
</span><span class="cx">     double m_elapsedTime;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchCommandLinecpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -30,32 +30,46 @@
</span><span class="cx"> struct option CommandLine::longOptions[] =
</span><span class="cx"> {
</span><span class="cx">     {&quot;benchmark&quot;, required_argument, 0, 'b'},
</span><ins>+    {&quot;detailed-report&quot;, no_argument, 0, 'd'},
+    {&quot;no-warmup&quot;, no_argument, 0, 'n' },
</ins><span class="cx">     {&quot;parallel&quot;, no_argument, 0, 'p'},
</span><span class="cx">     {&quot;heap&quot;, required_argument, 0, 'h'},
</span><span class="cx">     {&quot;runs&quot;, required_argument, 0, 'r'},
</span><ins>+    {&quot;use-thread-id&quot;, no_argument, 0, 't'},
</ins><span class="cx">     {0, 0, 0, 0}
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> CommandLine::CommandLine(int argc, char** argv)
</span><span class="cx">     : m_argc(argc)
</span><span class="cx">     , m_argv(argv)
</span><ins>+    , m_detailedReport(false)
</ins><span class="cx">     , m_isParallel(false)
</span><ins>+    , m_useThreadID(false)
+    , m_warmUp(true)
</ins><span class="cx">     , m_heapSize(0)
</span><span class="cx">     , m_runs(4)
</span><span class="cx"> {
</span><span class="cx">     int optionIndex = 0;
</span><span class="cx">     int ch;
</span><del>-    while ((ch = getopt_long(argc, argv, &quot;b:p:h:r&quot;, longOptions, &amp;optionIndex)) != -1) {
</del><ins>+    while ((ch = getopt_long(argc, argv, &quot;b:dnph:r:t&quot;, longOptions, &amp;optionIndex)) != -1) {
</ins><span class="cx">         switch (ch)
</span><span class="cx">         {
</span><span class="cx">             case 'b':
</span><span class="cx">                 m_benchmarkName = optarg;
</span><span class="cx">                 break;
</span><span class="cx"> 
</span><ins>+            case 'd':
+                m_detailedReport = true;
+                break;
+                
+            case 'n':
+                m_warmUp = false;
+                break;
+
</ins><span class="cx">             case 'p':
</span><span class="cx">                 m_isParallel = true;
</span><span class="cx">                 break;
</span><del>-
</del><ins>+                
</ins><span class="cx">             case 'h':
</span><span class="cx">                 m_heapSize = atoi(optarg) * 1024 * 1024;
</span><span class="cx">                 break;
</span><span class="lines">@@ -64,6 +78,10 @@
</span><span class="cx">                 m_runs = atoi(optarg);
</span><span class="cx">                 break;
</span><span class="cx"> 
</span><ins>+            case 't':
+                m_useThreadID = true;
+                break;
+                
</ins><span class="cx">             default:
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -75,5 +93,5 @@
</span><span class="cx">     std::string fullPath(m_argv[0]);
</span><span class="cx">     size_t pos = fullPath.find_last_of(&quot;/&quot;) + 1;
</span><span class="cx">     std::string program = fullPath.substr(pos);
</span><del>-    std::cout &lt;&lt; &quot;Usage: &quot; &lt;&lt; program &lt;&lt; &quot; --benchmark benchmark_name [ --parallel ] [ --heap MB ]&quot; &lt;&lt; std::endl;
</del><ins>+    std::cout &lt;&lt; &quot;Usage: &quot; &lt;&lt; program &lt;&lt; &quot; --benchmark benchmark_name [--parallel ] [--use-thread-id ] [--detailed-report] [--no-warmup] [--runs count] [--heap MB ]&quot; &lt;&lt; std::endl;
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchCommandLineh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/CommandLine.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -23,6 +23,9 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+#ifndef CommandLine_h
+#define CommandLine_h
+
</ins><span class="cx"> #include &lt;string&gt;
</span><span class="cx"> 
</span><span class="cx"> class CommandLine {
</span><span class="lines">@@ -32,6 +35,9 @@
</span><span class="cx">     bool isValid() { return m_benchmarkName.size(); }
</span><span class="cx">     const std::string&amp; benchmarkName() { return m_benchmarkName; }
</span><span class="cx">     bool isParallel() { return m_isParallel; }
</span><ins>+    bool useThreadID() { return m_useThreadID; }
+    bool detailedReport() { return m_detailedReport; }
+    bool warmUp() { return m_warmUp; }
</ins><span class="cx">     size_t heapSize() { return m_heapSize; }
</span><span class="cx">     size_t runs() { return m_runs; }
</span><span class="cx"> 
</span><span class="lines">@@ -43,7 +49,12 @@
</span><span class="cx">     int m_argc;
</span><span class="cx">     char** m_argv;
</span><span class="cx">     std::string m_benchmarkName;
</span><ins>+    bool m_detailedReport;
</ins><span class="cx">     bool m_isParallel;
</span><ins>+    bool m_useThreadID;
+    bool m_warmUp;
</ins><span class="cx">     size_t m_heapSize;
</span><span class="cx">     size_t m_runs;
</span><span class="cx"> };
</span><ins>+
+#endif // CommandLine_h
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -30,7 +30,9 @@
</span><span class="cx"> #include &lt;cstdlib&gt;
</span><span class="cx"> #include &lt;errno.h&gt;
</span><span class="cx"> #include &lt;fcntl.h&gt;
</span><ins>+#include &lt;iostream&gt;
</ins><span class="cx"> #include &lt;string&gt;
</span><ins>+#include &lt;string.h&gt;
</ins><span class="cx"> #include &lt;sys/mman.h&gt;
</span><span class="cx"> #include &lt;sys/stat.h&gt;
</span><span class="cx"> #include &lt;sys/types.h&gt;
</span><span class="lines">@@ -40,8 +42,11 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-Interpreter::Interpreter(const char* fileName, bool shouldFreeAllObjects)
</del><ins>+Interpreter::Interpreter(const char* fileName, bool shouldFreeAllObjects, bool useThreadId)
</ins><span class="cx">     : m_shouldFreeAllObjects(shouldFreeAllObjects)
</span><ins>+    , m_useThreadId(useThreadId)
+    , m_currentThreadId(0)
+    , m_ops(1024)
</ins><span class="cx"> {
</span><span class="cx">     m_fd = open(fileName, O_RDWR, S_IRUSR | S_IWUSR);
</span><span class="cx">     if (m_fd == -1)
</span><span class="lines">@@ -84,44 +89,18 @@
</span><span class="cx"> {
</span><span class="cx">     std::vector&lt;Op&gt; ops(1024);
</span><span class="cx">     lseek(m_fd, 0, SEEK_SET);
</span><del>-    size_t remaining = m_opCount * sizeof(Op);
-    while (remaining) {
-        size_t bytes = std::min(remaining, ops.size() * sizeof(Op));
-        remaining -= bytes;
-        read(m_fd, ops.data(), bytes);
</del><span class="cx"> 
</span><del>-        size_t opCount = bytes / sizeof(Op);
-        for (size_t i = 0; i &lt; opCount; ++i) {
-            Op op = ops[i];
-            switch (op.opcode) {
-            case op_malloc: {
-                m_objects[op.slot] = { mbmalloc(op.size), op.size };
-                assert(m_objects[op.slot].object);
-                bzero(m_objects[op.slot].object, op.size);
-                break;
-            }
-            case op_free: {
-                if (!m_objects[op.slot].object)
-                    continue;
-                mbfree(m_objects[op.slot].object, m_objects[op.slot].size);
-                m_objects[op.slot] = { 0, 0 };
-                break;
-            }
-            case op_realloc: {
-                if (!m_objects[op.slot].object)
-                    continue;
-                m_objects[op.slot] = { mbrealloc(m_objects[op.slot].object, m_objects[op.slot].size, op.size), op.size };
-                break;
-            }
-            default: {
-                fprintf(stderr, &quot;bad opcode: %d\n&quot;, op.opcode);
-                abort();
-                break;
-            }
-            }
-        }
-    }
</del><ins>+    m_remaining = m_opCount * sizeof(Op);
+    m_opsCursor = m_opsInBuffer = 0;
+    doOnSameThread(0);
</ins><span class="cx"> 
</span><ins>+    fprintf(stderr, &quot;Done running\n&quot;);
+    for (auto thread : m_threads)
+        thread-&gt;stop();
+
+    for (auto thread : m_threads)
+        delete thread;
+
</ins><span class="cx">     // A recording might not free all of its allocations.
</span><span class="cx">     if (!m_shouldFreeAllObjects)
</span><span class="cx">         return;
</span><span class="lines">@@ -133,3 +112,204 @@
</span><span class="cx">         m_objects[i] = { 0, 0 };
</span><span class="cx">     }
</span><span class="cx"> }
</span><ins>+
+bool Interpreter::readOps()
+{
+    if (!m_remaining)
+        return false;
+
+    size_t bytes = std::min(m_remaining, m_ops.size() * sizeof(Op));
+    m_remaining -= bytes;
+    read(m_fd, m_ops.data(), bytes);
+    m_opsCursor = 0;
+    m_opsInBuffer = bytes / sizeof(Op);
+    
+    if (!m_opsInBuffer)
+        return false;
+
+    return true;
+}
+
+void Interpreter::doOnSameThread(ThreadId runThreadId)
+{
+    while (true) {
+        if ((m_opsCursor &gt;= m_opsInBuffer) &amp;&amp; (!readOps())) {
+            if (runThreadId)
+                switchToThread(0);
+            return;
+        }
+
+        for (; m_opsCursor &lt; m_opsInBuffer; ++m_opsCursor) {
+            Op op = m_ops[m_opsCursor];
+            ThreadId threadId = op.threadId;
+            if (m_useThreadId &amp;&amp; (runThreadId != threadId)) {
+                switchToThread(threadId);
+                break;
+            }
+
+            doMallocOp(op, m_currentThreadId);
+        }
+    }
+}
+
+void Interpreter::switchToThread(ThreadId threadId)
+{
+    if (m_currentThreadId == threadId)
+        return;
+
+    for (ThreadId threadIndex = static_cast&lt;ThreadId&gt;(m_threads.size());
+         threadIndex &lt; threadId; ++threadIndex)
+        m_threads.push_back(new Thread(this, threadId));
+
+    ThreadId currentThreadId = m_currentThreadId;
+
+    if (threadId == 0) {
+        std::unique_lock&lt;std::mutex&gt; lock(m_threadMutex);
+        m_currentThreadId = threadId;
+        m_shouldRun.notify_one();
+    } else
+        m_threads[threadId - 1]-&gt;switchTo();
+    
+    if (currentThreadId == 0) {
+        std::unique_lock&lt;std::mutex&gt; lock(m_threadMutex);
+        m_shouldRun.wait(lock, [this](){return m_currentThreadId == 0; });
+    } else
+        m_threads[currentThreadId - 1]-&gt;waitToRun();
+}
+
+void Interpreter::detailedReport()
+{
+    size_t totalInUse = 0;
+    size_t smallInUse = 0;
+    size_t mediumInUse = 0;
+    size_t largeInUse = 0;
+    size_t extraLargeInUse = 0;
+    size_t memoryAllocated = 0;
+
+    for (size_t i = 0; i &lt; m_objects.size(); ++i) {
+        if (!m_objects[i].object)
+            continue;
+        size_t objectSize = m_objects[i].size;
+        memoryAllocated += objectSize;
+        totalInUse++;
+
+        if (objectSize &lt;= 256)
+            smallInUse++;
+        else if (objectSize &lt;= 1024)
+            mediumInUse++;
+        else if (objectSize &lt;= 1032192)
+            largeInUse++;
+        else
+            extraLargeInUse++;
+    }
+
+    std::cout &lt;&lt; &quot;0B-256B objects in use: &quot; &lt;&lt; smallInUse &lt;&lt; std::endl;
+    std::cout &lt;&lt; &quot;257B-1K objects in use: &quot; &lt;&lt; mediumInUse &lt;&lt; std::endl;
+    std::cout &lt;&lt; &quot;  1K-1M objects in use: &quot; &lt;&lt; largeInUse &lt;&lt; std::endl;
+    std::cout &lt;&lt; &quot;    1M+ objects in use: &quot; &lt;&lt; extraLargeInUse &lt;&lt; std::endl;
+    std::cout &lt;&lt; &quot;  Total objects in use: &quot; &lt;&lt; totalInUse &lt;&lt; std::endl;
+    std::cout &lt;&lt; &quot;Total allocated memory: &quot; &lt;&lt; memoryAllocated / 1024 &lt;&lt; &quot;kB&quot; &lt;&lt; std::endl;
+}
+static size_t compute2toPower(unsigned log2n)
+{
+    // Check for bad alignment log2 value and return a bad alignment.
+    if (log2n &gt; 64)
+        return 0xff00;
+
+    size_t result = 1;
+    while (log2n--)
+        result &lt;&lt;= 1;
+    
+    return result;
+}
+
+static void writeData(void* start, size_t size)
+{
+    char* writePtr = reinterpret_cast&lt;char*&gt;(start);
+
+    for (size_t sizeLeft = size; !!sizeLeft; ) {
+        size_t sizeThisIter = std::min(sizeLeft, 4096ul);
+        
+        writePtr[0] = random() &amp; 0xff;
+        writePtr[1] = random() &amp; 0xff;
+        writePtr[2] = random() &amp; 0xff;
+        writePtr[3] = random() &amp; 0xff;
+
+        writePtr += sizeThisIter;
+        sizeLeft -= sizeThisIter;
+    }
+}
+
+void Interpreter::doMallocOp(Op op, ThreadId threadId)
+{
+    switch (op.opcode) {
+        case op_malloc: {
+            m_objects[op.slot] = { mbmalloc(op.size), op.size };
+            assert(m_objects[op.slot].object);
+            writeData(m_objects[op.slot].object, op.size);
+            break;
+        }
+        case op_free: {
+            if (!m_objects[op.slot].object)
+                return;
+            mbfree(m_objects[op.slot].object, m_objects[op.slot].size);
+            m_objects[op.slot] = { 0, 0 };
+            break;
+        }
+        case op_realloc: {
+            if (!m_objects[op.slot].object)
+                return;
+            m_objects[op.slot] = { mbrealloc(m_objects[op.slot].object, m_objects[op.slot].size, op.size), op.size };
+            break;
+        }
+        case op_align_malloc: {
+            size_t alignment = compute2toPower(op.alignLog2);
+            m_objects[op.slot] = { mbmemalign(alignment, op.size), op.size };
+            assert(m_objects[op.slot].object);
+            writeData(m_objects[op.slot].object, op.size);
+            break;
+        }
+        default: {
+            fprintf(stderr, &quot;bad opcode: %d\n&quot;, op.opcode);
+            abort();
+            break;
+        }
+    }
+}
+
+Interpreter::Thread::Thread(Interpreter* myInterpreter, ThreadId threadId)
+    : m_threadId(threadId)
+    , m_myInterpreter(myInterpreter)
+{
+    m_thread = std::thread(&amp;Thread::runThread, this);
+}
+
+void Interpreter::Thread::stop()
+{
+    m_myInterpreter-&gt;switchToThread(m_threadId);
+}
+
+Interpreter::Thread::~Thread()
+{
+    switchTo();
+    m_thread.join();
+}
+
+void Interpreter::Thread::runThread()
+{
+    waitToRun();
+    m_myInterpreter-&gt;doOnSameThread(m_threadId);
+}
+
+void Interpreter::Thread::waitToRun()
+{
+    std::unique_lock&lt;std::mutex&gt; lock(m_myInterpreter-&gt;m_threadMutex);
+    m_shouldRun.wait(lock, [this](){return m_myInterpreter-&gt;m_currentThreadId == m_threadId; });
+}
+
+void Interpreter::Thread::switchTo()
+{
+    std::unique_lock&lt;std::mutex&gt; lock(m_myInterpreter-&gt;m_threadMutex);
+    m_myInterpreter-&gt;m_currentThreadId = m_threadId;
+    m_shouldRun.notify_one();
+}
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchInterpreterh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/Interpreter.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,23 +26,65 @@
</span><span class="cx"> #ifndef Interpreter_h
</span><span class="cx"> #define Interpreter_h
</span><span class="cx"> 
</span><ins>+#include &lt;condition_variable&gt;
+#include &lt;mutex&gt;
+#include &lt;thread&gt;
</ins><span class="cx"> #include &lt;vector&gt;
</span><span class="cx"> 
</span><span class="cx"> class Interpreter {
</span><span class="cx"> public:
</span><del>-    Interpreter(const char* fileName, bool shouldFreeAllObjects = true);
</del><ins>+    Interpreter(const char* fileName, bool shouldFreeAllObjects = true, bool useThreadId = false);
</ins><span class="cx">     ~Interpreter();
</span><span class="cx"> 
</span><span class="cx">     void run();
</span><ins>+    void detailedReport();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    enum Opcode { op_malloc, op_free, op_realloc };
-    struct Op { Opcode opcode; size_t slot; size_t size; };
</del><ins>+    typedef unsigned short ThreadId; // 0 is the main thread
+    typedef unsigned short Log2Alignment; // log2(alignment) or ~0 for non power of 2.
+    enum Opcode { op_malloc, op_free, op_realloc, op_align_malloc };
+    struct Op { Opcode opcode; ThreadId threadId; Log2Alignment alignLog2; size_t slot; size_t size; };
</ins><span class="cx">     struct Record { void* object; size_t size; };
</span><span class="cx"> 
</span><ins>+    class Thread
+    {
+    public:
+        Thread(Interpreter*, ThreadId);
+        ~Thread();
+
+        void runThread();
+
+        void waitToRun();
+        void switchTo();
+        void stop();
+        
+        bool isMainThread() { return m_threadId == 0; }
+
+    private:
+        ThreadId m_threadId;
+        Interpreter* m_myInterpreter;
+        std::condition_variable m_shouldRun;
+        std::thread m_thread;
+    };
+
+    bool readOps();
+    void doOnSameThread(ThreadId);
+    void switchToThread(ThreadId);
+
+    void doMallocOp(Op, ThreadId);
+    
</ins><span class="cx">     bool m_shouldFreeAllObjects;
</span><ins>+    bool m_useThreadId;
</ins><span class="cx">     int m_fd;
</span><span class="cx">     size_t m_opCount;
</span><ins>+    size_t m_remaining;
+    size_t m_opsCursor;
+    size_t m_opsInBuffer;
+    ThreadId m_currentThreadId;
+    std::vector&lt;Op&gt; m_ops;
+    std::mutex m_threadMutex;
+    std::condition_variable m_shouldRun;
+    std::vector&lt;Thread*&gt; m_threads;
</ins><span class="cx">     std::vector&lt;Record&gt; m_objects;
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchalloc_freecpp"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.cpp (0 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.cpp                                (rev 0)
+++ trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;alloc_free.h&quot;
+
+#include &quot;mbmalloc.h&quot;
+#include &lt;string.h&gt;
+
+void benchmark_alloc_free(CommandLine&amp;)
+{
+    size_t loops = 1000000;
+
+    size_t allocSize = 1030;
+    
+    char* dummy1 = (char*)mbmalloc(allocSize);
+    char* dummy2 = (char*)mbmalloc(allocSize);
+    dummy2[0] = 'a';
+    mbfree(dummy1, allocSize);
+
+    while (--loops) {
+        char* object = (char*)mbmalloc(allocSize);
+
+        memset(object, 'a', allocSize);
+
+        mbfree(object, allocSize);
+    }
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchalloc_freeh"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.h (0 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.h                                (rev 0)
+++ trunk/PerformanceTests/MallocBench/MallocBench/alloc_free.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef alloc_free_h
+#define alloc_free_h
+
+#include &quot;CommandLine.h&quot;
+
+void benchmark_alloc_free(CommandLine&amp;);
+
+#endif // alloc_free_h
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchballooncpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/balloon.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/balloon.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/balloon.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-void benchmark_balloon(bool isParallel)
</del><ins>+void benchmark_balloon(CommandLine&amp;)
</ins><span class="cx"> {
</span><span class="cx">     const size_t chunkSize = 1 * 1024;
</span><span class="cx">     const size_t balloonSize = 100 * 1024 * 1024;
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchballoonh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/balloon.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/balloon.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/balloon.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef balloon_h
</span><span class="cx"> #define balloon_h
</span><span class="cx"> 
</span><del>-void benchmark_balloon(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_balloon(CommandLine&amp;);
+
</ins><span class="cx"> #endif // balloon_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchbigcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/big.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/big.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/big.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -39,14 +39,14 @@
</span><span class="cx">     size_t size;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void benchmark_big(bool isParallel)
</del><ins>+void benchmark_big(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 1;
</span><span class="cx"> 
</span><span class="cx">     size_t vmSize = 1ul * 1024 * 1024 * 1024;
</span><span class="cx">     size_t objectSizeMin = 4 * 1024;
</span><span class="cx">     size_t objectSizeMax = 64 * 1024;
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         vmSize /= cpuCount();
</span><span class="cx"> 
</span><span class="cx">     size_t objectCount = vmSize / objectSizeMin;
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchbigh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/big.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/big.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/big.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef big_h
</span><span class="cx"> #define big_h
</span><span class="cx"> 
</span><del>-void benchmark_big(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_big(CommandLine&amp;);
+
</ins><span class="cx"> #endif // big_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchchurncpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/churn.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/churn.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/churn.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -39,10 +39,10 @@
</span><span class="cx">     double value;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void benchmark_churn(bool isParallel)
</del><ins>+void benchmark_churn(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 7000000;
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         times /= cpuCount();
</span><span class="cx"> 
</span><span class="cx">     auto total = std::unique_ptr&lt;HeapDouble&gt;(new HeapDouble(0.0));
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchchurnh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/churn.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/churn.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/churn.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef churn_h
</span><span class="cx"> #define churn_h
</span><span class="cx"> 
</span><del>-void benchmark_churn(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_churn(CommandLine&amp;);
+
</ins><span class="cx"> #endif // churn_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchfacebookcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/facebook.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/facebook.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/facebook.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -42,11 +42,14 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-void benchmark_facebook(bool isParallel)
</del><ins>+void benchmark_facebook(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 1;
</span><span class="cx"> 
</span><span class="cx">     Interpreter interpreter(&quot;facebook.ops&quot;);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchfacebookh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/facebook.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/facebook.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/facebook.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef facebook_h
</span><span class="cx"> #define facebook_h
</span><span class="cx"> 
</span><del>-void benchmark_facebook(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_facebook(CommandLine&amp;);
+
</ins><span class="cx"> #endif // facebook_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchflickrcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/flickr.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/flickr.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/flickr.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -42,16 +42,19 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-void benchmark_flickr(bool isParallel)
</del><ins>+void benchmark_flickr(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 3;
</span><span class="cx"> 
</span><span class="cx">     Interpreter interpreter(&quot;flickr.ops&quot;);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_flickr_memory_warning(bool isParallel)
</del><ins>+void benchmark_flickr_memory_warning(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 1;
</span><span class="cx"> 
</span><span class="lines">@@ -59,4 +62,7 @@
</span><span class="cx">     Interpreter interpreter(&quot;flickr_memory_warning.ops&quot;, shouldFreeAllObjects);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchflickrh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/flickr.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/flickr.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/flickr.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef flickr_h
</span><span class="cx"> #define flickr_h
</span><span class="cx"> 
</span><del>-void benchmark_flickr(bool isParallel);
-void benchmark_flickr_memory_warning(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_flickr(CommandLine&amp;);
+void benchmark_flickr_memory_warning(CommandLine&amp;);
+
</ins><span class="cx"> #endif // flickr_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchfragmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/fragment.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/fragment.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/fragment.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -79,10 +79,10 @@
</span><span class="cx">         node-&gt;validate();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_fragment(bool isParallel)
</del><ins>+void benchmark_fragment(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t nodeCount = 128 * 1024;
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         nodeCount /= cpuCount();
</span><span class="cx">     size_t replaceCount = nodeCount / 4;
</span><span class="cx">     size_t times = 25;
</span><span class="lines">@@ -107,11 +107,11 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_fragment_iterate(bool isParallel)
</del><ins>+void benchmark_fragment_iterate(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t nodeCount = 512 * 1024;
</span><span class="cx">     size_t times = 20;
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         nodeCount /= cpuCount();
</span><span class="cx">     size_t replaceCount = nodeCount / 4;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchfragmenth"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/fragment.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/fragment.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/fragment.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef fragment_h
</span><span class="cx"> #define fragment_h
</span><span class="cx"> 
</span><del>-void benchmark_fragment(bool isParallel);
-void benchmark_fragment_iterate(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_fragment(CommandLine&amp;);
+void benchmark_fragment_iterate(CommandLine&amp;);
+
</ins><span class="cx"> #endif // fragment_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchlistcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/list.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/list.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/list.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -96,12 +96,12 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace
</span><span class="cx"> 
</span><del>-void benchmark_list_allocate(bool isParallel)
</del><ins>+void benchmark_list_allocate(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     Node* head = 0;
</span><span class="cx">     size_t times = 70;
</span><span class="cx">     size_t nodes = 32 * 1024;
</span><del>-    if (isParallel) {
</del><ins>+    if (commandLine.isParallel()) {
</ins><span class="cx">         nodes /= cpuCount();
</span><span class="cx">         times *= 2;
</span><span class="cx">     }
</span><span class="lines">@@ -124,12 +124,12 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_list_traverse(bool isParallel)
</del><ins>+void benchmark_list_traverse(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     Node* head = 0;
</span><span class="cx">     size_t times = 1 * 1024;
</span><span class="cx">     size_t nodes = 32 * 1024;
</span><del>-    if (isParallel) {
</del><ins>+    if (commandLine.isParallel()) {
</ins><span class="cx">         nodes /= cpuCount();
</span><span class="cx">         times *= 4;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchlisth"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/list.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/list.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/list.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef list_h
</span><span class="cx"> #define list_h
</span><span class="cx"> 
</span><del>-void benchmark_list_allocate(bool isParallel);
-void benchmark_list_traverse(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_list_allocate(CommandLine&amp;);
+void benchmark_list_traverse(CommandLine&amp;);
+
</ins><span class="cx"> #endif // list_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmaincpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/main.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/main.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/main.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">         exit(1);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    Benchmark benchmark(commandLine.benchmarkName(), commandLine.isParallel(), commandLine.runs(), commandLine.heapSize());
</del><ins>+    Benchmark benchmark(commandLine);
</ins><span class="cx">     if (!benchmark.isValid()) {
</span><span class="cx">         cout &lt;&lt; &quot;Invalid benchmark: &quot; &lt;&lt; commandLine.benchmarkName() &lt;&lt; endl &lt;&lt; endl;
</span><span class="cx">         benchmark.printBenchmarks();
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     string parallel = commandLine.isParallel() ? string(&quot; [ parallel ]&quot;) : string(&quot; [ not parallel ]&quot;);
</span><ins>+    string threaded = commandLine.useThreadID() ? string(&quot; [ use-thread-id ]&quot;) : string(&quot; [ don't use-thread-id ]&quot;);
</ins><span class="cx"> 
</span><span class="cx">     stringstream runs;
</span><span class="cx">     runs &lt;&lt; &quot; [ runs: &quot; &lt;&lt; commandLine.runs() &lt;&lt; &quot; ]&quot;;
</span><span class="lines">@@ -58,7 +59,7 @@
</span><span class="cx">     else
</span><span class="cx">         heapSize &lt;&lt; &quot; [ heap: 0MB ]&quot;;
</span><span class="cx"> 
</span><del>-    cout &lt;&lt; &quot;Running &quot; &lt;&lt; commandLine.benchmarkName() &lt;&lt; parallel &lt;&lt; heapSize.str() &lt;&lt; runs.str() &lt;&lt; &quot;...&quot; &lt;&lt; endl;
</del><ins>+    cout &lt;&lt; &quot;Running &quot; &lt;&lt; commandLine.benchmarkName() &lt;&lt; parallel &lt;&lt; threaded &lt;&lt; heapSize.str() &lt;&lt; runs.str() &lt;&lt; &quot;...&quot; &lt;&lt; endl;
</ins><span class="cx">     benchmark.run();
</span><span class="cx">     benchmark.printReport();
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmediumcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/medium.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/medium.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/medium.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -39,14 +39,14 @@
</span><span class="cx">     size_t size;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void benchmark_medium(bool isParallel)
</del><ins>+void benchmark_medium(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 1;
</span><span class="cx"> 
</span><span class="cx">     size_t vmSize = 1ul * 1024 * 1024 * 1024;
</span><span class="cx">     size_t objectSizeMin = 2 * 1024;
</span><span class="cx">     size_t objectSizeMax = 8 * 1024;
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         vmSize /= cpuCount();
</span><span class="cx"> 
</span><span class="cx">     size_t objectCount = vmSize / objectSizeMin;
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmediumh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/medium.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/medium.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/medium.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef medium_h
</span><span class="cx"> #define medium_h
</span><span class="cx"> 
</span><del>-void benchmark_medium(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_medium(CommandLine&amp;);
+
</ins><span class="cx"> #endif // medium_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmemaligncpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/memalign.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/memalign.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/memalign.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include &quot;memalign.h&quot;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;stddef.h&gt;
</span><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -40,7 +41,7 @@
</span><span class="cx">     mbfree(result, size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_memalign(bool isParallel)
</del><ins>+void benchmark_memalign(CommandLine&amp;)
</ins><span class="cx"> {
</span><span class="cx">     for (size_t alignment = 2; alignment &lt; 4096; alignment *= 2) {
</span><span class="cx">         for (size_t size = 0; size &lt; 4096; ++size)
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmemalignh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/memalign.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/memalign.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/memalign.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef memalign_h
</span><span class="cx"> #define memalign_h
</span><span class="cx"> 
</span><del>-void benchmark_memalign(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_memalign(CommandLine&amp;);
+
</ins><span class="cx"> #endif // memalign_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmessagecpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/message.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/message.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/message.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -110,9 +110,9 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace
</span><span class="cx"> 
</span><del>-void benchmark_message_one(bool isParallel)
</del><ins>+void benchmark_message_one(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         abort();
</span><span class="cx"> 
</span><span class="cx">     const size_t times = 2048;
</span><span class="lines">@@ -138,9 +138,9 @@
</span><span class="cx">     dispatch_release(queue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_message_many(bool isParallel)
</del><ins>+void benchmark_message_many(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><del>-    if (isParallel)
</del><ins>+    if (commandLine.isParallel())
</ins><span class="cx">         abort();
</span><span class="cx"> 
</span><span class="cx">     const size_t times = 768;
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchmessageh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/message.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/message.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/message.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef message_h
</span><span class="cx"> #define message_h
</span><span class="cx"> 
</span><del>-void benchmark_message_one(bool isParallel);
-void benchmark_message_many(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_message_one(CommandLine&amp;);
+void benchmark_message_many(CommandLine&amp;);
+
</ins><span class="cx"> #endif // message_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchnimlangcpp"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/MallocBench/MallocBench/nimlang.cpp (0 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/nimlang.cpp                                (rev 0)
+++ trunk/PerformanceTests/MallocBench/MallocBench/nimlang.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -0,0 +1,56 @@
</span><ins>+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;CPUCount.h&quot;
+#include &quot;Interpreter.h&quot;
+#include &quot;nimlang.h&quot;
+#include &lt;assert.h&gt;
+#include &lt;cstddef&gt;
+#include &lt;cstddef&gt;
+#include &lt;cstdlib&gt;
+#include &lt;errno.h&gt;
+#include &lt;fcntl.h&gt;
+#include &lt;string&gt;
+#include &lt;sys/mman.h&gt;
+#include &lt;sys/stat.h&gt;
+#include &lt;sys/types.h&gt;
+#include &lt;sys/uio.h&gt;
+#include &lt;unistd.h&gt;
+#include &lt;vector&gt;
+
+#include &quot;mbmalloc.h&quot;
+
+void benchmark_nimlang(CommandLine&amp; commandLine)
+{
+    size_t times = 1;
+
+    bool shouldFreeAllObjects = false;
+    Interpreter interpreter(&quot;nimlang.ops&quot;, shouldFreeAllObjects, commandLine.useThreadID());
+    for (size_t i = 0; i &lt; times; ++i)
+        interpreter.run();
+
+        if (commandLine.detailedReport())
+            interpreter.detailedReport();
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchnimlangh"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/MallocBench/MallocBench/nimlang.h (0 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/nimlang.h                                (rev 0)
+++ trunk/PerformanceTests/MallocBench/MallocBench/nimlang.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef nimlang_h
+#define nimlang_h
+
+#include &quot;CommandLine.h&quot;
+
+void benchmark_nimlang(CommandLine&amp;);
+
+#endif // nimlang_h
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchnimlangops"></a>
<div class="binary"><h4>Added: trunk/PerformanceTests/MallocBench/MallocBench/nimlang.ops</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/PerformanceTests/MallocBench/MallocBench/nimlang.ops
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchrealloccpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/realloc.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/realloc.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/realloc.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -29,6 +29,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-void benchmark_realloc(bool isParallel)
</del><ins>+void benchmark_realloc(CommandLine&amp;)
</ins><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchrealloch"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/realloc.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/realloc.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/realloc.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef realloc_h
</span><span class="cx"> #define realloc_h
</span><span class="cx"> 
</span><del>-void benchmark_realloc(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_realloc(CommandLine&amp;);
+
</ins><span class="cx"> #endif // realloc_h
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchredditcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/reddit.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/reddit.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/reddit.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -42,16 +42,19 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-void benchmark_reddit(bool isParallel)
</del><ins>+void benchmark_reddit(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 6;
</span><span class="cx"> 
</span><span class="cx">     Interpreter interpreter(&quot;reddit.ops&quot;);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_reddit_memory_warning(bool isParallel)
</del><ins>+void benchmark_reddit_memory_warning(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 1;
</span><span class="cx"> 
</span><span class="lines">@@ -59,4 +62,7 @@
</span><span class="cx">     Interpreter interpreter(&quot;reddit_memory_warning.ops&quot;, shouldFreeAllObjects);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchreddith"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/reddit.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/reddit.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/reddit.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef reddit_h
</span><span class="cx"> #define reddit_h
</span><span class="cx"> 
</span><del>-void benchmark_reddit(bool isParallel);
-void benchmark_reddit_memory_warning(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_reddit(CommandLine&amp;);
+void benchmark_reddit_memory_warning(CommandLine&amp;);
+
</ins><span class="cx"> #endif // reddit_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchstresscpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/stress.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/stress.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/stress.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">     mbfree(object.pointer, object.size);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_stress(bool isParallel)
</del><ins>+void benchmark_stress(CommandLine&amp;)
</ins><span class="cx"> {
</span><span class="cx">     const size_t heapSize = 100 * MB;
</span><span class="cx">     const size_t churnSize = .05 * heapSize;
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchstressh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/stress.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/stress.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/stress.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #ifndef stress_h
</span><span class="cx"> #define stress_h
</span><span class="cx"> 
</span><del>-void benchmark_stress(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_stress(CommandLine&amp;);
+
</ins><span class="cx"> #endif // stress_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchstress_alignedcpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_stress_aligned(bool isParallel)
</del><ins>+void benchmark_stress_aligned(CommandLine&amp;)
</ins><span class="cx"> {
</span><span class="cx">     const size_t heapSize = 100 * MB;
</span><span class="cx">     const size_t churnSize = .05 * heapSize;
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchstress_alignedh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/stress_aligned.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,6 +26,8 @@
</span><span class="cx"> #ifndef stress_aligned_h
</span><span class="cx"> #define stress_aligned_h
</span><span class="cx"> 
</span><del>-void benchmark_stress_aligned(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_stress_aligned(CommandLine&amp;);
+
</ins><span class="cx"> #endif // stress_aligned_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchthevergecpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/theverge.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/theverge.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/theverge.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -42,16 +42,19 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;mbmalloc.h&quot;
</span><span class="cx"> 
</span><del>-void benchmark_theverge(bool isParallel)
</del><ins>+void benchmark_theverge(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 3;
</span><span class="cx"> 
</span><span class="cx">     Interpreter interpreter(&quot;theverge.ops&quot;);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_theverge_memory_warning(bool isParallel)
</del><ins>+void benchmark_theverge_memory_warning(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 1;
</span><span class="cx"> 
</span><span class="lines">@@ -59,4 +62,7 @@
</span><span class="cx">     Interpreter interpreter(&quot;theverge_memory_warning.ops&quot;, shouldFreeAllObjects);
</span><span class="cx">     for (size_t i = 0; i &lt; times; ++i)
</span><span class="cx">         interpreter.run();
</span><ins>+
+    if (commandLine.detailedReport())
+        interpreter.detailedReport();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchthevergeh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/theverge.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/theverge.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/theverge.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #ifndef theverge_h
</span><span class="cx"> #define theverge_h
</span><span class="cx"> 
</span><del>-void benchmark_theverge(bool isParallel);
-void benchmark_theverge_memory_warning(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_theverge(CommandLine&amp;);
+void benchmark_theverge_memory_warning(CommandLine&amp;);
+
</ins><span class="cx"> #endif // theverge_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchtreecpp"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/tree.cpp (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/tree.cpp        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/tree.cpp        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -175,11 +175,11 @@
</span><span class="cx"> 
</span><span class="cx"> } // namespace
</span><span class="cx"> 
</span><del>-void benchmark_tree_allocate(bool isParallel)
</del><ins>+void benchmark_tree_allocate(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 24;
</span><span class="cx">     size_t depth = 16;
</span><del>-    if (isParallel) {
</del><ins>+    if (commandLine.isParallel()) {
</ins><span class="cx">         times *= 4;
</span><span class="cx">         depth = 13;
</span><span class="cx">     }
</span><span class="lines">@@ -190,11 +190,11 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_tree_traverse(bool isParallel)
</del><ins>+void benchmark_tree_traverse(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 256;
</span><span class="cx">     size_t depth = 15;
</span><del>-    if (isParallel) {
</del><ins>+    if (commandLine.isParallel()) {
</ins><span class="cx">         times = 512;
</span><span class="cx">         depth = 13;
</span><span class="cx">     }
</span><span class="lines">@@ -205,11 +205,11 @@
</span><span class="cx">     tree-&gt;deref();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void benchmark_tree_churn(bool isParallel)
</del><ins>+void benchmark_tree_churn(CommandLine&amp; commandLine)
</ins><span class="cx"> {
</span><span class="cx">     size_t times = 130;
</span><span class="cx">     size_t depth = 15;
</span><del>-    if (isParallel) {
</del><ins>+    if (commandLine.isParallel()) {
</ins><span class="cx">         times *= 4;
</span><span class="cx">         depth = 12;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchtreeh"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench/tree.h (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench/tree.h        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench/tree.h        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -26,8 +26,10 @@
</span><span class="cx"> #ifndef tree_h
</span><span class="cx"> #define tree_h
</span><span class="cx"> 
</span><del>-void benchmark_tree_allocate(bool isParallel);
-void benchmark_tree_traverse(bool isParallel);
-void benchmark_tree_churn(bool isParallel);
</del><ins>+#include &quot;CommandLine.h&quot;
</ins><span class="cx"> 
</span><ins>+void benchmark_tree_allocate(CommandLine&amp;);
+void benchmark_tree_traverse(CommandLine&amp;);
+void benchmark_tree_churn(CommandLine&amp;);
+
</ins><span class="cx"> #endif // tree_h
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchMallocBenchxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/MallocBench.xcodeproj/project.pbxproj        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -38,6 +38,8 @@
</span><span class="cx">                 14D6322E1A69BE0B00A8F84F /* memalign.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14D6322C1A69BE0B00A8F84F /* memalign.cpp */; };
</span><span class="cx">                 14E11932177ECC8B003A8D15 /* CPUCount.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14E11930177ECC8B003A8D15 /* CPUCount.cpp */; };
</span><span class="cx">                 14FCA36119A7C917001CFDA9 /* stress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14FCA35F19A7C917001CFDA9 /* stress.cpp */; };
</span><ins>+                65E401A61C657A87003C6E9C /* nimlang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E401A41C657A87003C6E9C /* nimlang.cpp */; };
+                65E401AC1C73B068003C6E9C /* alloc_free.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 65E401AA1C73B068003C6E9C /* alloc_free.cpp */; };
</ins><span class="cx"> /* End PBXBuildFile section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXCopyFilesBuildPhase section */
</span><span class="lines">@@ -114,6 +116,11 @@
</span><span class="cx">                 14E11934177F5219003A8D15 /* mbmalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mbmalloc.h; path = MallocBench/mbmalloc.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14FCA35F19A7C917001CFDA9 /* stress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = stress.cpp; path = MallocBench/stress.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 14FCA36019A7C917001CFDA9 /* stress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stress.h; path = MallocBench/stress.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                65E401A41C657A87003C6E9C /* nimlang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = nimlang.cpp; path = MallocBench/nimlang.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                65E401A51C657A87003C6E9C /* nimlang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = nimlang.h; path = MallocBench/nimlang.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                65E401AA1C73B068003C6E9C /* alloc_free.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = alloc_free.cpp; path = MallocBench/alloc_free.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                65E401AB1C73B068003C6E9C /* alloc_free.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = alloc_free.h; path = MallocBench/alloc_free.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                65E401AD1C77E7C8003C6E9C /* nimlang.ops */ = {isa = PBXFileReference; lastKnownFileType = file; name = nimlang.ops; path = MallocBench/nimlang.ops; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx"> /* End PBXFileReference section */
</span><span class="cx"> 
</span><span class="cx"> /* Begin PBXFrameworksBuildPhase section */
</span><span class="lines">@@ -192,6 +199,8 @@
</span><span class="cx">                 14E11933177F51AC003A8D15 /* Benchmarks */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                65E401AA1C73B068003C6E9C /* alloc_free.cpp */,
+                                65E401AB1C73B068003C6E9C /* alloc_free.h */,
</ins><span class="cx">                                 14105E7D18DF7D73003A106E /* balloon.cpp */,
</span><span class="cx">                                 14105E7E18DF7D73003A106E /* balloon.h */,
</span><span class="cx">                                 14CE4A5E17BD355800288DAA /* big.cpp */,
</span><span class="lines">@@ -216,6 +225,9 @@
</span><span class="cx">                                 1444AE94177E8DF200F8030A /* message.cpp */,
</span><span class="cx">                                 1444AE95177E8DF200F8030A /* message.h */,
</span><span class="cx">                                 14105E8018E13EEC003A106E /* realloc.cpp */,
</span><ins>+                                65E401A41C657A87003C6E9C /* nimlang.cpp */,
+                                65E401AD1C77E7C8003C6E9C /* nimlang.ops */,
+                                65E401A51C657A87003C6E9C /* nimlang.h */,
</ins><span class="cx">                                 14105E8118E13EEC003A106E /* realloc.h */,
</span><span class="cx">                                 1447AE9718FB59D900B3D7FF /* reddit_memory_warning.ops */,
</span><span class="cx">                                 1447AE8A18FB584200B3D7FF /* reddit.cpp */,
</span><span class="lines">@@ -317,6 +329,7 @@
</span><span class="cx">                                 14CE4A6017BD355800288DAA /* big.cpp in Sources */,
</span><span class="cx">                                 14976ED1177E4AF7006B819A /* tree.cpp in Sources */,
</span><span class="cx">                                 1444AE96177E8DF200F8030A /* message.cpp in Sources */,
</span><ins>+                                65E401AC1C73B068003C6E9C /* alloc_free.cpp in Sources */,
</ins><span class="cx">                                 14452CEF177D47110097E057 /* churn.cpp in Sources */,
</span><span class="cx">                                 14452CB0177D24460097E057 /* main.cpp in Sources */,
</span><span class="cx">                                 14FCA36119A7C917001CFDA9 /* stress.cpp in Sources */,
</span><span class="lines">@@ -324,6 +337,7 @@
</span><span class="cx">                                 1447AE9018FB584200B3D7FF /* flickr.cpp in Sources */,
</span><span class="cx">                                 14976EC8177E3649006B819A /* list.cpp in Sources */,
</span><span class="cx">                                 14976ECC177E3C87006B819A /* CommandLine.cpp in Sources */,
</span><ins>+                                65E401A61C657A87003C6E9C /* nimlang.cpp in Sources */,
</ins><span class="cx">                                 1447AE9218FB584200B3D7FF /* theverge.cpp in Sources */,
</span><span class="cx">                                 14D0BFF31A6F4D3B00109F31 /* stress_aligned.cpp in Sources */,
</span><span class="cx">                                 1451FAED18B14B7100DB6D47 /* medium.cpp in Sources */,
</span></span></pre></div>
<a id="trunkPerformanceTestsMallocBenchrunmallocbenchmarks"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/MallocBench/run-malloc-benchmarks (196954 => 196955)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/MallocBench/run-malloc-benchmarks        2016-02-22 21:40:02 UTC (rev 196954)
+++ trunk/PerformanceTests/MallocBench/run-malloc-benchmarks        2016-02-22 22:02:24 UTC (rev 196955)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx">     &quot;reddit&quot;,
</span><span class="cx">     &quot;flickr&quot;,
</span><span class="cx">     &quot;theverge&quot;,
</span><ins>+    &quot;nimlang&quot;,
</ins><span class="cx"> 
</span><span class="cx">     # Multi-threaded benchmark variants.
</span><span class="cx">     &quot;message_one&quot;,
</span><span class="lines">@@ -34,6 +35,7 @@
</span><span class="cx">     # &quot;reddit --parallel&quot;,
</span><span class="cx">     # &quot;flickr --parallel&quot;,
</span><span class="cx">     # &quot;theverge --parallel&quot;,
</span><ins>+    # &quot;nimlang --use-thread-id&quot;,
</ins><span class="cx">     &quot;fragment --parallel&quot;,
</span><span class="cx">     &quot;fragment_iterate --parallel&quot;,
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>