Add a Talos test for displaylist mutation. (bug 1411804, r=jmaher, r=mattwoodrow)
☠☠ backed out by 60b780a847f8 ☠ ☠
authorDavid Anderson <danderson@mozilla.com>
Sun, 29 Oct 2017 23:21:39 -0700
changeset 388951 d7a32fbcb477076272846196541e0ea14f0d5343
parent 388950 d7a53e1454addc0d6bdda84e6c5125c88a14d5cc
child 388952 dd40c8a5af547f1fdb9c37907ba27cb9d5b9d8a6
push id96750
push userdanderson@mozilla.com
push dateMon, 30 Oct 2017 06:23:54 +0000
treeherdermozilla-inbound@d7a32fbcb477 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher, mattwoodrow
bugs1411804
milestone58.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
Add a Talos test for displaylist mutation. (bug 1411804, r=jmaher, r=mattwoodrow)
testing/talos/talos.json
testing/talos/talos/test.py
testing/talos/talos/tests/layout/benchmarks/displaylist_mutate.html
testing/talos/talos/tests/layout/displaylist_mutate.manifest
--- a/testing/talos/talos.json
+++ b/testing/talos/talos.json
@@ -42,17 +42,17 @@
         "g3-e10s": {
             "tests": ["dromaeo_dom"]
         },
         "g3-stylo-disabled-e10s": {
             "tests": ["dromaeo_dom"],
             "talos_options": ["--disable-stylo"]
         },
         "g4-e10s": {
-            "tests": ["basic_compositor_video", "glvideo"]
+            "tests": ["basic_compositor_video", "glvideo", "displaylist_mutate"]
         },
         "g4-stylo-disabled-e10s": {
             "tests": ["basic_compositor_video", "glvideo"],
             "talos_options": ["--disable-stylo"]
         },
         "g5-e10s": {
             "tests": ["ts_paint_webext", "tp5o_webext"],
             "pagesets_name": "tp5n.zip"
--- a/testing/talos/talos/test.py
+++ b/testing/talos/talos/test.py
@@ -975,8 +975,31 @@ class tp6_facebook(QuantumPageloadTest):
 
 
 @register_test()
 class tp6_facebook_heavy(tp6_facebook):
     """
     tp6_facebook test ran against a heavy-user profile
     """
     profile = 'simple'
+
+
+@register_test()
+class displaylist_mutate(PageloaderTest):
+    """
+    Test modifying single items in a large display list. Measure transaction speed
+    to the compositor.
+    """
+    tpmanifest = '${talos}/tests/layout/displaylist_mutate.manifest'
+    tpcycles = 1
+    tppagecycles = 5
+    tploadnocache = True
+    tpmozafterpaint = False
+    tpchrome = False
+    gecko_profile_interval = 2
+    gecko_profile_entries = 2000000
+    win_counters = w7_counters = linux_counters = mac_counters = None
+    filters = filter.ignore_first.prepare(1) + filter.median.prepare()
+    """ASAP mode"""
+    preferences = {'layout.frame_rate': 0,
+                   'docshell.event_starvation_delay_hint': 1,
+                   'dom.send_after_paint_to_content': False}
+    unit = 'ms'
new file mode 100644
--- /dev/null
+++ b/testing/talos/talos/tests/layout/benchmarks/displaylist_mutate.html
@@ -0,0 +1,68 @@
+<html>
+<head>
+<style>
+  div {
+    width:10px;
+    height:10px;
+    background-color:green;
+    display: inline-block;
+  }
+</style>
+</head>
+<body id="body">
+</body>
+<script>
+
+var start = null;
+var divCount = 10000;
+var maxIterations = 600;
+
+for (var i = 0; i < divCount; i++) {
+  var div = document.createElement("div");
+  div.id = i;
+  document.getElementById("body").appendChild(div);
+}
+
+var i = 0;
+function runFrame() {
+  if (document.getElementById(i).style.backgroundColor == "red") {
+    document.getElementById(i).style.backgroundColor = "green";
+  } else {
+    document.getElementById(i).style.backgroundColor = "red";
+  }
+  i++;
+  i = i%divCount;
+  if (--maxIterations == 0) {
+    var end = new Date();
+    if (window.tpRecordTime) {
+      window.tpRecordTime(end - start, start);
+    }
+    if (parent.reportResults) {
+      parent.reportResults(end - start, start);
+    }
+    return;
+  }
+
+  window.requestAnimationFrame(runFrame);
+}
+
+addEventListener("load", function() {
+  try {
+    // Outside of talos, this throws a security exception which no-op this file.
+    // (It's not required nor allowed for addons since Firefox 17)
+    // It's used inside talos from non-privileged pages (like during tscroll),
+    // and it works because talos disables all/most security measures.
+    netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+  } catch (e) {}
+
+  Components.utils.import("resource://gre/modules/Services.jsm");
+  Services.scriptloader.loadSubScript("chrome://talos-powers-content/content/TalosContentProfiler.js");
+
+  TalosContentProfiler.resume("displaylist_mutate.html loaded", true).then(() => {
+    start = new Date();
+    window.requestAnimationFrame(runFrame);
+  });
+});
+
+</script>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/talos/talos/tests/layout/displaylist_mutate.manifest
@@ -0,0 +1,1 @@
+% http://localhost/tests/layout/benchmarks/displaylist_mutate.html