Bug 1567122 - Enable Fission for AWSY r=perftest-reviewers,stephendonner,sparky
☠☠ backed out by c0aebe5e0bc0 ☠ ☠
authorMarian Raiciof <mraiciof@mozilla.com>
Tue, 12 Nov 2019 14:07:17 +0000
changeset 501583 776dc76ec598f7d400d24564ec5e9e44d106b006
parent 501582 97b8c3759aae60e6513fe0c2c7e399c0814081b3
child 501584 8d28c3108fc018c92e3af80254cef8671961e038
push id100299
push usermraiciof@mozilla.com
push dateTue, 12 Nov 2019 15:55:43 +0000
treeherderautoland@776dc76ec598 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperftest-reviewers, stephendonner, sparky
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 1567122 - Enable Fission for AWSY r=perftest-reviewers,stephendonner,sparky Differential Revision: https://phabricator.services.mozilla.com/D48660
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -69,16 +69,17 @@ treeherder:
         'Tsd': 'Talos performance tests, Stylo disabled'
         'Tsd-1proc': 'Talos performance tests with Stylo disabled without e10s'
         'Tss': 'Talos performance tests, Stylo sequential'
         'Tss-fis': 'Talos performance tests, Stylo sequential with fission enabled'
         'Tss-1proc': 'Talos performance tests with Stylo sequential without e10s'
         'tt': 'Telemetry tests'
         'tt-1proc': 'Telemetry tests without e10s'
         'SY': 'Are we slim yet tests by TaskCluster'
+        'SY-fis': 'Are we slim yet tests by TaskCluster, fission enabled'
         'SYsd': 'Are we slim yet tests by TaskCluster, Stylo disabled'
         'SYss': 'Are we slim yet tests by TaskCluster, Stylo sequential'
         'VP': 'VideoPuppeteer tests'
         'W': 'Web platform tests'
         'W-1proc': 'Web platform tests without e10s'
         'W-fis': 'Web platform tests with fission enabled'
         'W-sw': 'Web platform tests with serviceworker redesign'
         'W-sw-1proc': 'Web platform tests with serviceworker redesign, without e10s'
--- a/taskcluster/ci/test/awsy.yml
+++ b/taskcluster/ci/test/awsy.yml
@@ -33,26 +33,28 @@ job-defaults:
             default: ['try', 'integration', 'mozilla-central', 'mozilla-beta', 'mozilla-release']
     description: "Are we slim yet"
     treeherder-symbol: SY(sy)
     description: "Are we slim yet - tp6 pageset"
+    variants: ["fission"]
     treeherder-symbol: SY(sy-tp6)
             .*-ccov/.*: []  # don't run on coverage
             .*-devedition/.*: []  # don't run on devedition
             windows10-aarch64/opt: ['try', 'mozilla-central']
             default: ['try', 'integration', 'mozilla-central', 'mozilla-beta', 'mozilla-release']
             - --tp6
+            - --enable-fission
     description: "Are we slim yet - dmd enabled"
     treeherder-symbol: SY(sy-d)
     run-on-projects: ['try']
             - --dmd
--- a/testing/awsy/awsy/test_memory_usage.py
+++ b/testing/awsy/awsy/test_memory_usage.py
@@ -82,17 +82,21 @@ class TestMemoryUsage(AwsyTestCase):
                 if isinstance(url, list):
         self._urls = urls
         # Indicate that we're using tp6 in the perf data.
+        # ENABLE_FISSION is accessed through inheritance:
+        # MarionetteTestCase :: AwsyTestCase :: TestMemoryUsage
         self._extra_opts = ["tp6"]
+        if TestMemoryUsage.ENABLE_FISSION:
+            self._extra_opts.append("fission-enabled")
         # Now we setup the mitm proxy with our tp6 pageset.
         tp6_pageset_manifest = os.path.join(AWSY_PATH, 'tp6-pageset.manifest')
         config = {
             'playback_tool': 'mitmproxy',
             'playback_version': '4.0.4',
             'playback_pageset_manifest': tp6_pageset_manifest,
             'platform': mozinfo.os,
--- a/testing/awsy/mach_commands.py
+++ b/testing/awsy/mach_commands.py
@@ -70,17 +70,17 @@ class MachCommands(MachCommandBase):
         if 'single_stylo_traversal' in kwargs and kwargs['single_stylo_traversal']:
             os.environ['STYLO_THREADS'] = '1'
             os.environ['STYLO_THREADS'] = '4'
         runtime_testvars = {}
         for arg in ('webRootDir', 'pageManifest', 'resultsDir', 'entities', 'iterations',
-                    'perTabPause', 'settleWaitTime', 'maxTabs', 'dmd', 'tp6'):
+                    'perTabPause', 'settleWaitTime', 'maxTabs', 'dmd', 'tp6', 'enable_fission'):
             if arg in kwargs and kwargs[arg] is not None:
                 runtime_testvars[arg] = kwargs[arg]
         if 'webRootDir' not in runtime_testvars:
             awsy_tests_dir = os.path.join(self.topobjdir, '_tests', 'awsy')
             web_root_dir = os.path.join(awsy_tests_dir, 'html')
             runtime_testvars['webRootDir'] = web_root_dir
@@ -233,16 +233,19 @@ class MachCommands(MachCommandBase):
                      dest='single_stylo_traversal', default=False,
                      help='Set STYLO_THREADS=1.')
     @CommandArgument('--dmd', group='AWSY', action='store_true',
                      dest='dmd', default=False,
                      help='Enable DMD during testing. Requires a DMD-enabled build.')
     @CommandArgument('--tp6', group='AWSY', action='store_true',
                      dest='tp6', default=False,
                      help='Use the tp6 pageset during testing.')
+    @CommandArgument('--enable-fission', group='AWSY', action='store_true',
+                     dest='enable_fission', default=False,
+                     help='Enable Fission (site isolation) in Gecko.')
     def run_awsy_test(self, tests, **kwargs):
         """mach awsy-test runs the in-tree version of the Are We Slim Yet
         (AWSY) tests.
         awsy-test is implemented as a marionette test and marionette
         test arguments also apply although they are not necessary
         since reasonable defaults will be chosen.
--- a/testing/marionette/harness/marionette_harness/marionette_test/testcases.py
+++ b/testing/marionette/harness/marionette_harness/marionette_test/testcases.py
@@ -281,25 +281,38 @@ class CommonTestCase(unittest.TestCase):
                 path = path[len(prefix):]
         return path
 class MarionetteTestCase(CommonTestCase):
     match_re = re.compile(r"test_(.*)\.py$")
     def __init__(self, marionette_weakref, fixtures, methodName='runTest',
                  filepath='', **kwargs):
         self.filepath = filepath
         self.testvars = kwargs.pop('testvars', None)
         super(MarionetteTestCase, self).__init__(
             methodName, marionette_weakref=marionette_weakref, fixtures=fixtures, **kwargs)
+        fission_in_flags = kwargs.get('enable_fission', False)
+        fission_in_prefs_args = False
+        if (kwargs.get('prefs_args') is not None) and \
+                ('fission.autostart=true' in kwargs.get('prefs_args') or
+                 '"fission.autostart=true"' in kwargs.get('prefs_args')):
+            fission_in_prefs_args = True
+        # For 'mach awsy-test --tp6' fission is enabled through:
+        # "--enable-fission" flag on local runs
+        # or "prefs_args" on treeherder
+        MarionetteTestCase.ENABLE_FISSION = fission_in_flags or fission_in_prefs_args
     def add_tests_to_suite(cls, mod_name, filepath, suite, testloader, marionette,
                            fixtures, testvars, **kwargs):
         # since we use imp.load_source to load test modules, if a module
         # is loaded with the same name as another one the module would just be
         # reloaded.
         # We may end up by finding too many test in a module then since
--- a/testing/mozharness/scripts/awsy_script.py
+++ b/testing/mozharness/scripts/awsy_script.py
@@ -74,17 +74,23 @@ class AWSY(TestingMixin, MercurialScript
           "default": False,
           "help": "Runs tests with DMD enabled.",
          {"action": "store_true",
           "dest": "tp6",
           "default": False,
           "help": "Runs tests with the tp6 pageset.",
-          }]
+          }],
+        [["--enable-fission"],
+         {"action": "store_true",
+          "dest": "enable_fission",
+          "default": False,
+          "help": "Enable Fission (site isolation) in Gecko.",
+          }],
     ] + testing_config_options + copy.deepcopy(code_coverage_config_options)
     error_list = [
         {'regex': re.compile(r'''(TEST-UNEXPECTED|PROCESS-CRASH)'''), 'level': ERROR},
     def __init__(self, **kwargs):