Bug 489636 - Add a GC u-bench test for property tree splitting via deletion; r=sfink
authorTerrence Cole <terrence@mozilla.com>
Thu, 31 Dec 2015 11:32:27 -0800
changeset 278089 31edd1840c5f651b5dbf182fdb7f04fe98c88d86
parent 278088 ef3be88cb79c45132d67c16ab40ebe35ba6f202f
child 278090 9fbf850dc78d7197132a298f9ec0270c7de16a13
push id69682
push usertcole@mozilla.com
push dateThu, 31 Dec 2015 19:33:03 +0000
treeherdermozilla-inbound@31edd1840c5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs489636
milestone46.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 489636 - Add a GC u-bench test for property tree splitting via deletion; r=sfink
js/src/devtools/gc-ubench/benchmarks/propertyTreeSplitting.js
js/src/devtools/gc-ubench/index.html
new file mode 100644
--- /dev/null
+++ b/js/src/devtools/gc-ubench/benchmarks/propertyTreeSplitting.js
@@ -0,0 +1,25 @@
+window.tests.set('propertyTreeSplitting', (function() {
+var garbage = [];
+var garbageIndex = 0;
+return {
+    description: "use delete to generate Shape garbage",
+    load: (N) => { garbage = new Array(N); },
+    unload: () => { garbage = []; garbageIndex = 0; },
+    makeGarbage: (N) => {
+        function f()
+        {
+            var a1 = eval;
+            delete eval;
+            eval = a1;
+            var a3 = toString;
+            delete toString;
+            toString = a3;
+        }
+        for (var a = 0; a < N; ++a) {
+            garbage[garbageIndex++] = new f();
+            if (garbageIndex == garbage.length)
+                garbageIndex = 0;
+        }
+    }
+};
+})());
--- a/js/src/devtools/gc-ubench/index.html
+++ b/js/src/devtools/gc-ubench/index.html
@@ -15,16 +15,17 @@
   <script src="benchmarks/globalArrayBuffer.js"></script>
   <script src="benchmarks/globalArrayFgFinalized.js"></script>
   <script src="benchmarks/selfCyclicWeakMap.js"></script>
   <script src="benchmarks/pairCyclicWeakMap.js"></script>
   <script src="benchmarks/textNodes.js"></script>
   <script src="benchmarks/bigTextNodes.js"></script>
   <script src="benchmarks/events.js"></script>
   <script src="benchmarks/expandoEvents.js"></script>
+  <script src="benchmarks/propertyTreeSplitting.js"></script>
 
   <script src="harness.js"></script>
 
 </head>
 
 <body onload="onload()" onunload="onunload()">
 
 <canvas id="graph" width="1080" height="400" style="padding-left:10px"></canvas>