Backed out changeset d5c898a4aaaf (bug 1463483) for causing talos xperf failures.
authorCosmin Sabou <csabou@mozilla.com>
Sat, 18 Aug 2018 02:44:09 +0300
changeset 432214 c99d9b6ba765993b58f8570e9ad62d5f5dbcea1a
parent 432213 fd8d17192696250a5396894301478f36c6c75be7
child 432215 457c223707df08866c3abd734781f75500dd1412
push id106669
push usercsabou@mozilla.com
push dateFri, 17 Aug 2018 23:44:27 +0000
treeherdermozilla-inbound@c99d9b6ba765 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1463483
milestone63.0a1
backs outd5c898a4aaafedae7c53131adb5ca910c054df85
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
Backed out changeset d5c898a4aaaf (bug 1463483) for causing talos xperf failures.
testing/talos/talos/results.py
testing/talos/talos/test.py
testing/talos/talos/xtalos/etlparser.py
testing/talos/talos/xtalos/parse_xperf.py
--- a/testing/talos/talos/results.py
+++ b/testing/talos/talos/results.py
@@ -410,27 +410,23 @@ class BrowserLogResults(object):
         if global_counters is not None:
             if 'responsiveness' in global_counters:
                 global_counters['responsiveness'].extend(self.responsiveness())
             self.xperf(global_counters)
 
     def xperf(self, counter_results):
         """record xperf counters in counter_results dictionary"""
 
-        session_store_counter = 'time_to_session_store_window_restored_ms'
-
         counters = ['main_startup_fileio',
                     'main_startup_netio',
                     'main_normal_fileio',
                     'main_normal_netio',
                     'nonmain_startup_fileio',
                     'nonmain_normal_fileio',
-                    'nonmain_normal_netio',
-                    session_store_counter,
-                    ]
+                    'nonmain_normal_netio']
 
         mainthread_counter_keys = ['readcount', 'readbytes', 'writecount',
                                    'writebytes']
         mainthread_counters = ['_'.join(['mainthread', counter_key])
                                for counter_key in mainthread_counter_keys]
 
         self.mainthread_io(counter_results)
 
@@ -490,25 +486,16 @@ class BrowserLogResults(object):
                     continue
                 values = dict(zip(header, row))
                 for i, mainthread_counter in enumerate(mainthread_counters):
                     if int(values[mainthread_counter_keys[i]]) > 0:
                         counter_results.setdefault(mainthread_counter, [])\
                             .append([int(values[mainthread_counter_keys[i]]),
                                      values['filename']])
 
-        if session_store_counter in counter_results.keys():
-            filename = 'etl_output_session_restore_stats.csv'
-            # This file is a csv but it only contains one field, so we'll just
-            # obtain the value by converting the second line in the file.
-            with open(filename, 'r') as contents:
-                lines = contents.read().splitlines()
-                value = float(lines[1].strip())
-                counter_results.setdefault(session_store_counter, []).append(value)
-
     def mainthread_io(self, counter_results):
         """record mainthread IO counters in counter_results dictionary"""
 
         # we want to measure mtio on xperf runs.
         # this will be shoved into the xperf results as we ignore those
         SCRIPT_DIR = \
             os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
         filename = os.path.join(SCRIPT_DIR, 'mainthread_io.json')
--- a/testing/talos/talos/test.py
+++ b/testing/talos/talos/test.py
@@ -507,19 +507,17 @@ class tp5n(PageloaderTest):
     win_counters = []
     linux_counters = []
     mac_counters = []
     xperf_counters = ['main_startup_fileio', 'main_startup_netio',
                       'main_normal_fileio', 'main_normal_netio',
                       'nonmain_startup_fileio', 'nonmain_normal_fileio',
                       'nonmain_normal_netio', 'mainthread_readcount',
                       'mainthread_readbytes', 'mainthread_writecount',
-                      'mainthread_writebytes',
-                      'time_to_session_store_window_restored_ms',
-                      ]
+                      'mainthread_writebytes']
     xperf_providers = ['PROC_THREAD', 'LOADER', 'HARD_FAULTS', 'FILENAME',
                        'FILE_IO', 'FILE_IO_INIT']
     xperf_user_providers = ['Mozilla Generic Provider',
                             'Microsoft-Windows-TCPIP']
     xperf_stackwalk = ['FileCreate', 'FileRead', 'FileWrite', 'FileFlush',
                        'FileClose']
     filters = filter.ignore_first.prepare(1) + filter.median.prepare()
     timeout = 1800
--- a/testing/talos/talos/xtalos/etlparser.py
+++ b/testing/talos/talos/xtalos/etlparser.py
@@ -8,16 +8,17 @@ from __future__ import absolute_import, 
 import csv
 import json
 import os
 import re
 import shutil
 import subprocess
 import sys
 
+import mozfile
 import xtalos
 
 EVENTNAME_INDEX = 0
 PROCESS_INDEX = 2
 THREAD_ID_INDEX = 3
 DISKBYTES_COL = "Size"
 FNAME_COL = "FileName"
 IMAGEFUNC_COL = "Image!Function"
@@ -328,16 +329,18 @@ def etlparser(xperf_path, etl_filename, 
         elif event.endswith("Event/Classic") and \
                 row[THREAD_ID_INDEX] in gThreads:
             stage = updateStage(row, stage)
         elif event.startswith("Microsoft-Windows-TCPIP"):
             trackThreadNetIO(row, io, stage)
 
     if debug:
         uploadFile(csvname)
+    else:
+        mozfile.remove(csvname)
 
     output = "thread, stage, counter, value\n"
     for cntr in sorted(io.iterkeys()):
         output += "%s, %s\n" % (", ".join(cntr), str(io[cntr]))
     if outputFile:
         fname = "%s_thread_stats%s" % os.path.splitext(outputFile)
         with open(fname, "w") as f:
             f.write(output)
--- a/testing/talos/talos/xtalos/parse_xperf.py
+++ b/testing/talos/talos/xtalos/parse_xperf.py
@@ -5,49 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 from __future__ import absolute_import, print_function
 
 import os
 import subprocess
 import sys
 
 import etlparser
-import mozfile
 import xtalos
-from xperf_analyzer import (ProcessStart, SessionStoreWindowRestored,
-                            XPerfAttribute, XPerfFile, XPerfInterval)
-
-
-def run_session_restore_analysis(debug=False, **kwargs):
-    required = ('csv_filename', 'outputFile')
-    for r in required:
-        if r not in kwargs:
-            raise xtalos.XTalosError('%s required' % r)
-
-    final_output_file = "%s_session_restore_stats%s" % os.path.splitext(
-        kwargs['outputFile'])
-
-    output = 'time_to_session_store_window_restored_ms\n'
-
-    with XPerfFile(csvfile=kwargs['csv_filename'], debug=debug) as xperf:
-        fx_start = ProcessStart('firefox.exe')
-        ss_window_restored = SessionStoreWindowRestored()
-
-        interval = XPerfInterval(fx_start, ss_window_restored)
-        xperf.add_attr(interval)
-
-        xperf.analyze()
-
-        output += "%.3f\n" % (interval.get_results()[XPerfAttribute.RESULT])
-
-    with open(final_output_file, 'w') as out:
-        out.write(output)
-
-    if debug:
-        etlparser.uploadFile(final_output_file)
 
 
 def stop(xperf_path, debug=False):
     xperf_cmd = [xperf_path, '-stop', '-stop', 'talos_ses']
     if debug:
         print("executing '%s'" % subprocess.list2cmdline(xperf_cmd))
     subprocess.call(xperf_cmd)
 
@@ -84,30 +52,24 @@ def stop_from_config(config_file=None, d
     # call start
     stop(**stopargs)
 
     etlparser.etlparser_from_config(config_file,
                                     approot=kwargs['approot'],
                                     error_filename=kwargs['error_filename'],
                                     processID=kwargs['processID'])
 
-    csv_base = '%s.csv' % kwargs['etl_filename']
-    run_session_restore_analysis(csv_filename=csv_base, debug=debug, **kwargs)
-
-    if not debug:
-        mozfile.remove(csv_base)
-
 
 def main(args=sys.argv[1:]):
 
     # parse command line arguments
     parser = xtalos.XtalosOptions()
     args = parser.parse_args(args)
 
-    # stop xperf
+    # start xperf
     try:
         stop_from_config(config_file=args.configFile,
                          debug=args.debug_level >= xtalos.DEBUG_INFO,
                          **args.__dict__)
     except xtalos.XTalosError as e:
         parser.error(str(e))