diff --git a/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py b/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py index bd141fa..1811c6d 100755 --- a/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py +++ b/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py
@@ -41,7 +41,7 @@ # Command line arguments for Chrome. -_CHROME_ARGS = [ +CHROME_ARGS = [ # Disable backgound network requests that may pollute WPR archive, pollute # HTTP cache generation, and introduce noise in loading performance. '--disable-background-networking', @@ -133,11 +133,10 @@ return match.group(1) if match is not None else None -Result = collections.namedtuple('Result', ['warmup', 'speculation_mode', - 'delay_to_may_launch_url', - 'delay_to_launch_url', - 'commit', 'plt', - 'first_contentful_paint']) +RESULT_FIELDS = ('warmup', 'speculation_mode', 'delay_to_may_launch_url', + 'delay_to_launch_url', 'commit', 'plt', + 'first_contentful_paint') +Result = collections.namedtuple('Result', RESULT_FIELDS) def ParseResult(result_line): @@ -181,7 +180,7 @@ try: while should_stop is None or not should_stop.is_set(): config = configs[random.randint(0, len(configs) - 1)] - chrome_args = _CHROME_ARGS + wpr_attributes.chrome_args + chrome_args = CHROME_ARGS + wpr_attributes.chrome_args if config['speculation_mode'] == 'no_state_prefetch': # NoStatePrefetch is enabled through an experiment. chrome_args.extend([ @@ -218,7 +217,7 @@ A numpy structured array. """ import numpy as np - data = np.genfromtxt(filename, delimiter=',') + data = np.genfromtxt(filename, delimiter=',', skip_header=1) result = np.array(np.zeros(len(data)), dtype=[('warmup', bool), ('speculation_mode', np.int32), ('delay_to_may_launch_url', np.int32),
diff --git a/tools/android/memtrack_helper/memtrack_helper.c b/tools/android/memtrack_helper/memtrack_helper.c index 9ce05fd..b1185573 100644 --- a/tools/android/memtrack_helper/memtrack_helper.c +++ b/tools/android/memtrack_helper/memtrack_helper.c
@@ -9,11 +9,9 @@ #include <dlfcn.h> #include <errno.h> #include <fcntl.h> -#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> #include <sys/socket.h> #include <sys/un.h> #include <sys/stat.h> @@ -66,16 +64,16 @@ static void handle_one_request(int client_sock) { char buf[32]; char response[4096] = ""; - ssize_t rsize = recv(client_sock, buf, sizeof(buf), 0); - + ssize_t rsize = recv(client_sock, buf, sizeof(buf) - 1, 0); if (rsize < 1) return; + buf[rsize] = '\0'; if (buf[0] == kShutdownRequest) exit(EXIT_SUCCESS); pid_t pid = -1; - if (sscanf(buf, "%d", &pid) != 1) + if (sscanf(buf, "%d", &pid) != 1 || pid < 0) return send_response(client_sock, "ERR invalid pid"); memtrack_proc_handle handle = memtrack_proc_new(); @@ -97,12 +95,12 @@ memtrack_proc_graphics_pss(handle)); } if (memtrack_proc_gl_total) { - response_ptr += - sprintf(response_ptr, "gl_total %zd\n", memtrack_proc_gl_total(handle)); + response_ptr += sprintf(response_ptr, "gl_total %zd\n", + memtrack_proc_gl_total(handle)); } if (memtrack_proc_gl_pss) { - response_ptr += - sprintf(response_ptr, "gl_pss %zd\n", memtrack_proc_gl_pss(handle)); + response_ptr += sprintf(response_ptr, "gl_pss %zd\n", + memtrack_proc_gl_pss(handle)); } if (memtrack_proc_other_total) { response_ptr += sprintf(response_ptr, "other_total %zd\n", @@ -124,7 +122,8 @@ if (pid < 0) exit_with_failure("fork"); if (pid > 0) { - /* Terminate the main process attached to TTY once the daemon re-forks. */ + // Main process keeps TTY while intermediate child do daemonization + // because adb can immediately kill a process disconnected from adb's TTY. int ignore; wait(&ignore); exit(EXIT_SUCCESS); @@ -180,8 +179,7 @@ memtrack_proc_other_pss = (memtrack_proc_other_pss_t)dlsym(libhandle, "memtrack_proc_other_pss"); - if (!memtrack_init || !memtrack_proc_new || !memtrack_proc_destroy || - !memtrack_proc_get) { + if (!memtrack_proc_new || !memtrack_proc_destroy || !memtrack_proc_get) { exit_with_failure("dlsym() libmemtrack.so"); } @@ -211,12 +209,18 @@ if (argc > 1 && strcmp(argv[1], "-d") == 0) daemonize(); - res = memtrack_init(); - if (res == -ENOENT) { - exit_with_failure("Unable to load memtrack module in libhardware. " - "Probably implementation is missing in this ROM."); - } else if (res != 0) { - exit_with_failure("memtrack_init() returned non-zero status."); + long pid = getpid(); + fprintf(stderr, "pid=%ld\n", pid); + __android_log_print(ANDROID_LOG_INFO, kLogTag, "pid=%ld\n", pid); + + if (memtrack_init) { + res = memtrack_init(); + if (res == -ENOENT) { + exit_with_failure("Unable to load memtrack module in libhardware. " + "Probably implementation is missing in this ROM."); + } else if (res != 0) { + exit_with_failure("memtrack_init() returned non-zero status."); + } } if (listen(server_fd, 128 /* max number of queued requests */))
diff --git a/tools/android/memtrack_helper/memtrack_helper.h b/tools/android/memtrack_helper/memtrack_helper.h index df349c3c..9a2de37 100644 --- a/tools/android/memtrack_helper/memtrack_helper.h +++ b/tools/android/memtrack_helper/memtrack_helper.h
@@ -15,9 +15,11 @@ #include <sys/socket.h> #include <sys/un.h> +static const char* const kLogTag = "memtrack_helper"; + static inline void exit_with_failure(const char* reason) { perror(reason); - __android_log_write(ANDROID_LOG_ERROR, "memtrack_helper", reason); + __android_log_write(ANDROID_LOG_ERROR, kLogTag, reason); exit(EXIT_FAILURE); }
diff --git a/tools/android/memtrack_helper/memtrack_helper_test_client.c b/tools/android/memtrack_helper/memtrack_helper_test_client.c index dd5cdab7..4f30bd19 100644 --- a/tools/android/memtrack_helper/memtrack_helper_test_client.c +++ b/tools/android/memtrack_helper/memtrack_helper_test_client.c
@@ -35,9 +35,10 @@ exit_with_failure("send"); char buf[4096]; - memset(buf, 0, sizeof(buf)); - if (recv(sock, buf, sizeof(buf), 0) <= 0) + ssize_t rsize = recv(sock, buf, sizeof(buf) - 1, 0); + if (rsize < 0) exit_with_failure("recv"); + buf[rsize] = '\0'; puts(buf); return EXIT_SUCCESS;
diff --git a/tools/chrome_proxy/webdriver/common.py b/tools/chrome_proxy/webdriver/common.py index 45585eb..05b2c89 100644 --- a/tools/chrome_proxy/webdriver/common.py +++ b/tools/chrome_proxy/webdriver/common.py
@@ -4,6 +4,7 @@ import argparse import json +import logging import os import re import socket @@ -18,9 +19,6 @@ from selenium import webdriver from selenium.webdriver.chrome.options import Options -# TODO(robertogden): Add logging. - - def ParseFlags(): """Parses the given command line arguments. @@ -45,7 +43,7 @@ 'will be used.') parser.add_argument('--disable_buffer', help='Causes stdout and stderr from ' 'tests to output normally. Otherwise, the standard output and standard ' - 'error streams are buffered during the test run, and output during a ' + 'error streams are buffered during the test run, and output from a ' 'passing test is discarded. Output will always be echoed normally on test ' 'fail or error and is added to the failure messages.', action='store_true') parser.add_argument('-c', '--catch', help='Control-C during the test run ' @@ -54,9 +52,53 @@ action='store_true') parser.add_argument('-f', '--failfast', help='Stop the test run on the first ' 'error or failure.', action='store_true') - # TODO(robertogden): Log sys.argv here. + parser.add_argument('--logging_level', choices=['DEBUG', 'INFO', 'WARN', + 'ERROR', 'CRIT'], default='ERROR', help='The logging verbosity for log ' + 'messages, printed to stderr. To see stderr logging output during a ' + 'successful test run, also pass --disable_buffer. Default=ERROR') + parser.add_argument('--log_file', help='If given, write logging statements ' + 'to the given file instead of stderr.') return parser.parse_args(sys.argv[1:]) +def GetLogger(name='common'): + """Creates a Logger instance with the given name and returns it. + + If a logger has already been created with the same name, that instance is + returned instead. + + Args: + name: The name of the logger to return. + Returns: + A logger with the given name. + """ + logger = logging.getLogger(name) + if hasattr(logger, "initialized"): + return logger + logging_level = ParseFlags().logging_level + if logging_level == 'DEBUG': + logger.setLevel(logging.DEBUG) + elif logging_level == 'INFO': + logger.setLevel(logging.INFO) + elif logging_level == 'WARN': + logger.setLevel(logging.WARNING) + elif logging_level == 'ERROR': + logger.setLevel(logging.ERROR) + elif logging_level == 'CRIT': + logger.setLevel(logging.CRITICAL) + else: + logger.setLevel(logging.NOTSET) + formatter = logging.Formatter('%(asctime)s %(funcName)s() %(levelname)s: ' + '%(message)s') + if ParseFlags().log_file: + fh = logging.FileHandler(ParseFlags().log_file) + fh.setFormatter(formatter) + logger.addHandler(fh) + else: + ch = logging.StreamHandler(sys.stderr) + ch.setFormatter(formatter) + logger.addHandler(ch) + logger.initialized = True + return logger class TestDriver: """The main driver for an integration test. @@ -78,6 +120,7 @@ self._driver = None self._chrome_args = set() self._url = '' + self._logger = GetLogger(name='TestDriver') def __enter__(self): return self @@ -106,7 +149,9 @@ arg_key = GetDictKey(override_arg) if arg_key in original_args: self._chrome_args.remove(original_args[arg_key]) + self._logger.info('Removed Chrome flag. %s', original_args[arg_key]) self._chrome_args.add(override_arg) + self._logger.info('Added Chrome flag. %s', override_arg) # Always add the flag that allows histograms to be queried in javascript. self._chrome_args.add('--enable-stats-collection-bindings') @@ -126,8 +171,15 @@ capabilities['chromeOptions'].update({ 'androidPackage': self._flags.android_package, }) + self._logger.debug('Will use Chrome on Android') elif self._flags.chrome_exec: capabilities['chrome.binary'] = self._flags.chrome_exec + self._logger.info('Using the Chrome binary at this path: %s', + self._flags.chrome_exec) + self._logger.info('Starting Chrome with these flags: %s', + str(self._chrome_args)) + self._logger.debug('Starting ChromeDriver with these capabilities: %s', + json.dumps(capabilities)) driver = webdriver.Chrome(executable_path=self._flags.chrome_driver, desired_capabilities=capabilities) driver.command_executor._commands.update({ @@ -138,6 +190,7 @@ def _StopDriver(self): """Nicely stops the ChromeDriver. """ + self._logger.debug('Stopping ChromeDriver') self._driver.quit() self._driver = None @@ -157,6 +210,7 @@ arg: a string argument to pass to Chrome at start """ self._chrome_args.add(arg) + self._logger.debug('Adding Chrome arg: %s', arg) def RemoveChromeArgs(self, args): """Removes multiple arguments that will no longer be passed to Chromium at @@ -177,11 +231,13 @@ arg: A string flag to no longer use the next time Chrome starts. """ self._chrome_args.discard(arg) + self._logger.debug('Removing Chrome arg: %s', arg) def ClearChromeArgs(self): """Removes all arguments from Chromium at start. """ self._chrome_args.clear() + self._logger.debug('Clearing all Chrome args') def ClearCache(self): """Clears the browser cache. @@ -189,10 +245,11 @@ Important note: ChromeDriver automatically starts a clean copy of Chrome on every instantiation. """ - self.ExecuteJavascript('if(window.chrome && chrome.benchmarking && ' + res = self.ExecuteJavascript('if(window.chrome && chrome.benchmarking && ' 'chrome.benchmarking.clearCache){chrome.benchmarking.clearCache(); ' 'chrome.benchmarking.clearPredictorCache();chrome.benchmarking.' 'clearHostResolverCache();}') + self._logger.info('Cleared browser cache. Returned=%s', str(res)) def LoadURL(self, url, timeout=30): """Starts Chromium with any arguments previously given and navigates to the @@ -206,7 +263,9 @@ if not self._driver: self._StartDriver() self._driver.set_page_load_timeout(timeout) + self._logger.debug('Set page load timeout to %f seconds', timeout) self._driver.get(self._url) + self._logger.debug('Loaded page %s', url) def ExecuteJavascript(self, script, timeout=30): """Executes the given javascript in the browser's current page in an @@ -227,8 +286,11 @@ # crbug/672114 is fixed. default_timeout = socket.getdefaulttimeout() socket.setdefaulttimeout(timeout) + self._logger.debug('Set socket timeout to %f seconds', timeout) script_result = self._driver.execute_script(script) + self._logger.debug('Executed Javascript in browser: %s', script) socket.setdefaulttimeout(default_timeout) + self._logger.debug('Set socket timeout to %s', str(default_timeout)) return script_result def ExecuteJavascriptStatement(self, script, timeout=30): @@ -247,6 +309,7 @@ def GetHistogram(self, histogram): js_query = 'statsCollectionController.getBrowserHistogram("%s")' % histogram string_response = self.ExecuteJavascriptStatement(js_query) + self._logger.debug('Got %s histogram=%s', histogram, string_response) return json.loads(string_response) def WaitForJavascriptExpression(self, expression, timeout, min_poll=0.1, @@ -262,6 +325,7 @@ Returns: The result of the expression. """ poll_interval = max(min(max_poll, float(timeout) / 10.0), min_poll) + self._logger.debug('Poll interval=%f seconds', poll_interval) result = self.ExecuteJavascriptStatement(expression) total_waited_time = 0 while not result and total_waited_time < timeout: @@ -269,6 +333,7 @@ total_waited_time += poll_interval result = self.ExecuteJavascriptStatement(expression) if not result: + self._logger.error('%s not true after %f seconds' % (expression, timeout)) raise Exception('%s not true after %f seconds' % (expression, timeout)) return result @@ -285,8 +350,11 @@ all_messages = [] for log in self._driver.execute('getLog', {'type': 'performance'})['value']: message = json.loads(log['message'])['message'] + self._logger.debug('Got Performance log: %s', log['message']) if re.match(method_filter, message['method']): all_messages.append(message) + self._logger.info('Got %d performance logs with filter method=%s', + len(all_messages), method_filter) return all_messages def GetHTTPResponses(self, include_favicon=False): @@ -322,9 +390,13 @@ all_responses = [] for message in self.GetPerformanceLogs(): response = MakeHTTPResponse(message) + self._logger.debug('New HTTPResponse: %s', str(response)) is_favicon = response.url.endswith('favicon.ico') if not is_favicon or include_favicon: all_responses.append(response) + self._logger.info('%d new HTTPResponse objects found in the logs %s ' + 'favicons', len(all_responses), ('including' if include_favicon else + 'not including')) return all_responses class HTTPResponse: @@ -447,9 +519,12 @@ def RunAllTests(): """A simple helper method to run all tests using unittest.main(). """ + flags = ParseFlags() + logger = GetLogger() + logger.debug('Command line args: %s', str(sys.argv)) + logger.info('sys.argv parsed to %s', str(flags)) # The unittest library uses sys.argv itself and is easily confused by our # command line options. Pass it a simpler argv instead, while working in the # unittest command line args functionality. - flags = ParseFlags() unittest.main(argv=[sys.argv[0]], verbosity=2, failfast=flags.failfast, catchbreak=flags.catch, buffer=(not flags.disable_buffer))
diff --git a/tools/clang/scripts/run_tool.py b/tools/clang/scripts/run_tool.py index 205d281..42b085e 100755 --- a/tools/clang/scripts/run_tool.py +++ b/tools/clang/scripts/run_tool.py
@@ -319,11 +319,10 @@ if args.generate_compdb: compile_db.GenerateWithNinja(args.compile_database) + filenames = set(_GetFilesFromGit(args.path_filter)) if args.all: - filenames = set(_GetFilesFromCompileDB(args.compile_database)) - source_filenames = filenames + source_filenames = set(_GetFilesFromCompileDB(args.compile_database)) else: - filenames = set(_GetFilesFromGit(args.path_filter)) # Filter out files that aren't C/C++/Obj-C/Obj-C++. extensions = frozenset(('.c', '.cc', '.cpp', '.m', '.mm')) source_filenames = [f @@ -343,4 +342,4 @@ if __name__ == '__main__': - sys.exit(main()) \ No newline at end of file + sys.exit(main())
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py index dbe0fdf..a8fe279 100755 --- a/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -27,7 +27,7 @@ # Do NOT CHANGE this if you don't know what you're doing -- see # https://chromium.googlesource.com/chromium/src/+/master/docs/updating_clang.md # Reverting problematic clang rolls is safe, though. -CLANG_REVISION = '289575' +CLANG_REVISION = '289944' use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ if use_head_revision:
diff --git a/tools/clang/scripts/upload_revision.py b/tools/clang/scripts/upload_revision.py index 8a7994e..8eb4eb3 100755 --- a/tools/clang/scripts/upload_revision.py +++ b/tools/clang/scripts/upload_revision.py
@@ -72,7 +72,7 @@ Git(["commit", "-m", "Roll clang {}:{}.\n\n{}".format( clang_old_revision, clang_revision, commit_message)]) - Git(["cl", "upload"]) + Git(["cl", "upload", "-f"]) Git(["cl", "try", "-b", "linux_upload_clang", "-r", git_revision]) Git(["cl", "try", "-b", "mac_upload_clang", "-r", git_revision]) Git(["cl", "try", "-b", "win_upload_clang", "-r", git_revision])
diff --git a/tools/gn/README.md b/tools/gn/README.md index 4f905052..0a677749 100644 --- a/tools/gn/README.md +++ b/tools/gn/README.md
@@ -1,7 +1,7 @@ # What is GN? GN is a meta-build system that generates -[NinjaBuild](https://chromium.googlesource.com/chromium/src/+/master/docs/ninja_build.md) +[NinjaBuild](https://ninja-build.org) files so that you can build Chromium with Ninja. ## Why did you switch from GYP? @@ -18,7 +18,7 @@ 4. GN gives us tools for querying the build graph; you can ask "what does X depend on" and "who depends on Y", for example. -## What's the status of the GYP->GN migration? +## What's the status of the GYP->GN migration for Chromium? _As of Oct 2016:_ @@ -36,13 +36,13 @@ Read these links: - * [Quick start](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/quick_start.md) - * [FAQ](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/faq.md) - * [Language and operation details](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md) - * [Reference](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/reference.md) The built-in `gn help` documentation. - * [Style guide](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/style_guide.md) - * [Cross compiling and toolchains](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cross_compiles.md) - * [Hacking on GN itself](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/hacking.md) - * [GNStandalone](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/standalone.md) Standalone GN projects - * [UpdateGNBinaries](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/update_binaries.md) Pushing new binaries - * [Check](https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/check.md) `gn check` command reference + * [Quick start](docs/quick_start.md) + * [FAQ](docs/faq.md) + * [Language and operation details](docs/language.md) + * [Reference](docs/reference.md) The built-in `gn help` documentation. + * [Style guide](docs/style_guide.md) + * [Cross compiling and toolchains](docs/cross_compiles.md) + * [Hacking on GN itself](docs/hacking.md) + * [GNStandalone](docs/standalone.md) Standalone GN projects + * [UpdateGNBinaries](docs/update_binaries.md) Pushing new binaries + * [Check](docs/check.md) `gn check` command reference
diff --git a/tools/gn/docs/reference.md b/tools/gn/docs/reference.md index ab3233a..1aa56f1d 100644 --- a/tools/gn/docs/reference.md +++ b/tools/gn/docs/reference.md
@@ -1641,9 +1641,8 @@ The precise behavior of declare args is: - 1. The declare_args() block executes. Any variable defined in the enclosing - scope is available for reading, but any variable defined earlier in - the current scope is not (since the overrides haven't been applied yet). + 1. The declare_arg block executes. Any variables in the enclosing scope are + available for reading. 2. At the end of executing the block, any variables set within that scope are saved globally as build arguments, with their current values being @@ -1662,10 +1661,12 @@ like [], "", or -1, and after the declare_args block, call exec_script if the value is unset by the user. - - Because you cannot read the value of a variable defined in the same - block, if you need to make the default value of one arg depend - on the possibly-overridden value of another, write two separate - declare_args() blocks: + - Any code inside of the declare_args block will see the default values of + previous variables defined in the block rather than the user-overridden + value. This can be surprising because you will be used to seeing the + overridden value. If you need to make the default value of one arg + dependent on the possibly-overridden value of another, write two separate + declare_args blocks: declare_args() { enable_foo = true
diff --git a/tools/gn/functions.cc b/tools/gn/functions.cc index 41be19b..e01a25c 100644 --- a/tools/gn/functions.cc +++ b/tools/gn/functions.cc
@@ -45,38 +45,8 @@ return false; } -// This key is set as a scope property on the scope of a declare_args() block, -// in order to prevent reading a variable defined earlier in the same call -// (see `gn help declare_args` for more). -const void *kInDeclareArgsKey = nullptr; - } // namespace - -bool EnsureNotReadingFromSameDeclareArgs(const ParseNode* node, - const Scope* cur_scope, - const Scope* val_scope, - Err* err) { - // If the value didn't come from a scope at all, we're safe. - if (!val_scope) - return true; - - const Scope* val_args_scope = nullptr; - val_scope->GetProperty(&kInDeclareArgsKey, &val_args_scope); - - const Scope* cur_args_scope = nullptr; - cur_scope->GetProperty(&kInDeclareArgsKey, &cur_args_scope); - if (!val_args_scope || !cur_args_scope || (val_args_scope != cur_args_scope)) - return true; - - *err = Err(node, - "Reading a variable defined in the same declare_args() call.\n" - "\n" - "If you need to set the value of one arg based on another, put\n" - "them in two separate declare_args() calls, one after the other.\n"); - return false; -} - bool EnsureNotProcessingImport(const ParseNode* node, const Scope* scope, Err* err) { @@ -387,9 +357,8 @@ The precise behavior of declare args is: - 1. The declare_args() block executes. Any variable defined in the enclosing - scope is available for reading, but any variable defined earlier in - the current scope is not (since the overrides haven't been applied yet). + 1. The declare_arg block executes. Any variables in the enclosing scope are + available for reading. 2. At the end of executing the block, any variables set within that scope are saved globally as build arguments, with their current values being @@ -408,10 +377,12 @@ like [], "", or -1, and after the declare_args block, call exec_script if the value is unset by the user. - - Because you cannot read the value of a variable defined in the same - block, if you need to make the default value of one arg depend - on the possibly-overridden value of another, write two separate - declare_args() blocks: + - Any code inside of the declare_args block will see the default values of + previous variables defined in the block rather than the user-overridden + value. This can be surprising because you will be used to seeing the + overridden value. If you need to make the default value of one arg + dependent on the possibly-overridden value of another, write two separate + declare_args blocks: declare_args() { enable_foo = true @@ -444,7 +415,6 @@ return Value(); Scope block_scope(scope); - block_scope.SetProperty(&kInDeclareArgsKey, &block_scope); block->Execute(&block_scope, err); if (err->has_error()) return Value();
diff --git a/tools/gn/functions.h b/tools/gn/functions.h index 401384acb..37519d8 100644 --- a/tools/gn/functions.h +++ b/tools/gn/functions.h
@@ -415,16 +415,6 @@ // Helper functions ----------------------------------------------------------- -// Validates that the scope that a value is defined in is not the scope -// of the current declare_args() call, if that's what we're in. It is -// illegal to read a value from inside the same declare_args() call, since -// the overrides will not have been applied yet (see `gn help declare_args` -// for more). -bool EnsureNotReadingFromSameDeclareArgs(const ParseNode* node, - const Scope* cur_scope, - const Scope* val_scope, - Err* err); - // Verifies that the current scope is not processing an import. If it is, it // will set the error, blame the given parse node for it, and return false. bool EnsureNotProcessingImport(const ParseNode* node, @@ -473,7 +463,7 @@ const FunctionCallNode* function, const std::string& name); -// Some types of blocks can't be nested inside other ones. For such cases, +// Some tyesp of blocks can't be nested inside other ones. For such cases, // instantiate this object upon entering the block and Enter() will fail if // there is already another non-nestable block on the stack. class NonNestableBlock {
diff --git a/tools/gn/functions_unittest.cc b/tools/gn/functions_unittest.cc index 949b844..7156747 100644 --- a/tools/gn/functions_unittest.cc +++ b/tools/gn/functions_unittest.cc
@@ -125,48 +125,3 @@ "rounding = [[1, 2], [3, 4], [5], [6]]\n", setup.print_output()); } - -TEST(Functions, DeclareArgs) { - TestWithScope setup; - Err err; - - // It is not legal to read the value of an argument declared in a - // declare_args() from inside the call, but outside the call and in - // a separate call should work. - - TestParseInput reading_from_same_call(R"( - declare_args() { - foo = true - bar = foo - })"); - reading_from_same_call.parsed()->Execute(setup.scope(), &err); - ASSERT_TRUE(err.has_error()); - - TestParseInput reading_from_outside_call(R"( - declare_args() { - foo = true - } - - bar = foo - assert(bar) - )"); - err = Err(); - reading_from_outside_call.parsed()->Execute(setup.scope(), &err); - ASSERT_FALSE(err.has_error()); - - TestParseInput reading_from_different_call(R"( - declare_args() { - foo = true - } - - declare_args() { - bar = foo - } - - assert(bar) - )"); - err = Err(); - TestWithScope setup2; - reading_from_different_call.parsed()->Execute(setup2.scope(), &err); - ASSERT_FALSE(err.has_error()); -}
diff --git a/tools/gn/parse_tree.cc b/tools/gn/parse_tree.cc index d1de9cbf..ecc438b 100644 --- a/tools/gn/parse_tree.cc +++ b/tools/gn/parse_tree.cc
@@ -487,18 +487,13 @@ } Value IdentifierNode::Execute(Scope* scope, Err* err) const { - const Scope* found_in_scope = nullptr; - const Value* value = scope->GetValueWithScope(value_.value(), true, - &found_in_scope); + const Value* value = scope->GetValue(value_.value(), true); Value result; if (!value) { *err = MakeErrorDescribing("Undefined identifier"); return result; } - if (!EnsureNotReadingFromSameDeclareArgs(this, scope, found_in_scope, err)) - return result; - result = *value; result.set_origin(this); return result;
diff --git a/tools/gn/scope.cc b/tools/gn/scope.cc index 650c64a..fbe73f44 100644 --- a/tools/gn/scope.cc +++ b/tools/gn/scope.cc
@@ -78,37 +78,25 @@ const Value* Scope::GetValue(const base::StringPiece& ident, bool counts_as_used) { - const Scope* found_in_scope = nullptr; - return GetValueWithScope(ident, counts_as_used, &found_in_scope); -} - -const Value* Scope::GetValueWithScope(const base::StringPiece& ident, - bool counts_as_used, - const Scope** found_in_scope) { // First check for programmatically-provided values. for (auto* provider : programmatic_providers_) { const Value* v = provider->GetProgrammaticValue(ident); - if (v) { - *found_in_scope = nullptr; + if (v) return v; - } } RecordMap::iterator found = values_.find(ident); if (found != values_.end()) { if (counts_as_used) found->second.used = true; - *found_in_scope = this; return &found->second.value; } // Search in the parent scope. if (const_containing_) - return const_containing_->GetValueWithScope(ident, found_in_scope); - if (mutable_containing_) { - return mutable_containing_->GetValueWithScope(ident, counts_as_used, - found_in_scope); - } + return const_containing_->GetValue(ident); + if (mutable_containing_) + return mutable_containing_->GetValue(ident, counts_as_used); return nullptr; } @@ -143,19 +131,11 @@ } const Value* Scope::GetValue(const base::StringPiece& ident) const { - const Scope *found_in_scope = nullptr; - return GetValueWithScope(ident, &found_in_scope); -} - -const Value* Scope::GetValueWithScope(const base::StringPiece& ident, - const Scope** found_in_scope) const { RecordMap::const_iterator found = values_.find(ident); - if (found != values_.end()) { - *found_in_scope = this; + if (found != values_.end()) return &found->second.value; - } if (containing()) - return containing()->GetValueWithScope(ident, found_in_scope); + return containing()->GetValue(ident); return nullptr; }
diff --git a/tools/gn/scope.h b/tools/gn/scope.h index 31bac626..e2c64e6 100644 --- a/tools/gn/scope.h +++ b/tools/gn/scope.h
@@ -109,7 +109,7 @@ const Settings* settings() const { return settings_; } - // See the const_/mutable_containing_ var declarations below. Yes, it's a + // See the const_/mutable_containing_ var declaraions below. Yes, it's a // bit weird that we can have a const pointer to the "mutable" one. Scope* mutable_containing() { return mutable_containing_; } const Scope* mutable_containing() const { return mutable_containing_; } @@ -134,18 +134,9 @@ // // counts_as_used should be set if the variable is being read in a way that // should count for unused variable checking. - // - // found_in_scope is set to the scope that contains the definition of the - // ident. If the value was provided programmatically (like host_cpu), - // found_in_scope will be set to null. const Value* GetValue(const base::StringPiece& ident, bool counts_as_used); const Value* GetValue(const base::StringPiece& ident) const; - const Value* GetValueWithScope(const base::StringPiece& ident, - const Scope** found_in_scope) const; - const Value* GetValueWithScope(const base::StringPiece& ident, - bool counts_as_used, - const Scope** found_in_scope); // Returns the requested value as a mutable one if possible. If the value // is not found in a mutable scope, then returns null. Note that the value
diff --git a/tools/gn/xcode_object.cc b/tools/gn/xcode_object.cc index dc5bfb8..039cb52 100644 --- a/tools/gn/xcode_object.cc +++ b/tools/gn/xcode_object.cc
@@ -404,7 +404,7 @@ } std::string PBXFileReference::Name() const { - return path_; + return name_; } void PBXFileReference::Print(std::ostream& out, unsigned indent) const { @@ -417,16 +417,17 @@ PrintProperty(out, rules, "explicitFileType", type_); PrintProperty(out, rules, "includeInIndex", 0u); } else { - base::StringPiece ext = FindExtension(&path_); + base::StringPiece ext = FindExtension(&name_); if (HasExplicitFileType(ext)) PrintProperty(out, rules, "explicitFileType", GetSourceType(ext)); else PrintProperty(out, rules, "lastKnownFileType", GetSourceType(ext)); } - if (name_ != path_ && !name_.empty()) + if (!name_.empty()) PrintProperty(out, rules, "name", name_); + DCHECK(!path_.empty()); PrintProperty(out, rules, "path", path_); PrintProperty(out, rules, "sourceTree", type_.empty() ? "<group>" : "BUILT_PRODUCTS_DIR"); @@ -471,36 +472,39 @@ return children_.back().get(); } -PBXFileReference* PBXGroup::AddSourceFile(const std::string& source_path) { +PBXFileReference* PBXGroup::AddSourceFile(const std::string& navigator_path, + const std::string& source_path) { + DCHECK(!navigator_path.empty()); DCHECK(!source_path.empty()); - std::string::size_type sep = source_path.find("/"); + std::string::size_type sep = navigator_path.find("/"); if (sep == std::string::npos) { children_.push_back(base::MakeUnique<PBXFileReference>( - std::string(), source_path, std::string())); + navigator_path, source_path, std::string())); return static_cast<PBXFileReference*>(children_.back().get()); } PBXGroup* group = nullptr; - base::StringPiece component(source_path.data(), sep); + base::StringPiece component(navigator_path.data(), sep); for (const auto& child : children_) { if (child->Class() != PBXGroupClass) continue; PBXGroup* child_as_group = static_cast<PBXGroup*>(child.get()); - if (child_as_group->path_ == component) { + if (child_as_group->name_ == component) { group = child_as_group; break; } } if (!group) { - children_.push_back(base::WrapUnique(new PBXGroup(component.as_string()))); + children_.push_back(base::WrapUnique( + new PBXGroup(component.as_string(), component.as_string()))); group = static_cast<PBXGroup*>(children_.back().get()); } DCHECK(group); - DCHECK(group->path_ == component); - return group->AddSourceFile(source_path.substr(sep + 1)); + DCHECK(group->name_ == component); + return group->AddSourceFile(navigator_path.substr(sep + 1), source_path); } PBXObjectClass PBXGroup::Class() const { @@ -530,7 +534,7 @@ PrintProperty(out, rules, "children", children_); if (!name_.empty()) PrintProperty(out, rules, "name", name_); - if (!path_.empty()) + if (is_source_ && !path_.empty()) PrintProperty(out, rules, "path", path_); PrintProperty(out, rules, "sourceTree", "<group>"); out << indent_str << "};\n"; @@ -598,6 +602,7 @@ main_group_.reset(new PBXGroup); sources_ = static_cast<PBXGroup*>( main_group_->AddChild(base::MakeUnique<PBXGroup>(source_path, "Source"))); + sources_->set_is_source(true); products_ = static_cast<PBXGroup*>(main_group_->AddChild( base::MakeUnique<PBXGroup>(std::string(), "Product"))); main_group_->AddChild(base::MakeUnique<PBXGroup>(std::string(), "Build")); @@ -607,8 +612,10 @@ PBXProject::~PBXProject() {} -void PBXProject::AddSourceFile(const std::string& source_path) { - PBXFileReference* file_reference = sources_->AddSourceFile(source_path); +void PBXProject::AddSourceFile(const std::string& navigator_path, + const std::string& source_path) { + PBXFileReference* file_reference = + sources_->AddSourceFile(navigator_path, source_path); base::StringPiece ext = FindExtension(&source_path); if (!IsSourceFileForIndexing(ext)) return;
diff --git a/tools/gn/xcode_object.h b/tools/gn/xcode_object.h index 2ad43cce..83a776a 100644 --- a/tools/gn/xcode_object.h +++ b/tools/gn/xcode_object.h
@@ -218,7 +218,10 @@ const std::string& path() const { return path_; } PBXObject* AddChild(std::unique_ptr<PBXObject> child); - PBXFileReference* AddSourceFile(const std::string& source_path); + PBXFileReference* AddSourceFile(const std::string& navigator_path, + const std::string& source_path); + bool is_source() { return is_source_; } + void set_is_source(const bool is_source) { is_source_ = is_source; } // PBXObject implementation. PBXObjectClass Class() const override; @@ -230,6 +233,7 @@ std::vector<std::unique_ptr<PBXObject>> children_; std::string name_; std::string path_; + bool is_source_ = false; DISALLOW_COPY_AND_ASSIGN(PBXGroup); }; @@ -271,7 +275,8 @@ const PBXAttributes& attributes); ~PBXProject() override; - void AddSourceFile(const std::string& source_path); + void AddSourceFile(const std::string& navigator_path, + const std::string& source_path); void AddAggregateTarget(const std::string& name, const std::string& shell_script); void AddNativeTarget(const std::string& name,
diff --git a/tools/gn/xcode_writer.cc b/tools/gn/xcode_writer.cc index 633a1c8..07b50e4b 100644 --- a/tools/gn/xcode_writer.cc +++ b/tools/gn/xcode_writer.cc
@@ -353,7 +353,7 @@ for (const SourceFile& source : sources) { std::string source_file = RebasePath(source.value(), source_dir, absolute_source_path); - sources_for_indexing->AddSourceFile(source_file); + sources_for_indexing->AddSourceFile(source_file, source_file); } projects_.push_back(std::move(sources_for_indexing));
diff --git a/tools/luci-go/linux64/isolate.sha1 b/tools/luci-go/linux64/isolate.sha1 index 61d45e2..d0b8f6c 100644 --- a/tools/luci-go/linux64/isolate.sha1 +++ b/tools/luci-go/linux64/isolate.sha1
@@ -1 +1 @@ -b7468b6e00ca43ca009b98e79bf4583311b483e6 +0bc14f6977e9c033abe1c2fe612128accdac4b1b
diff --git a/tools/luci-go/mac64/isolate.sha1 b/tools/luci-go/mac64/isolate.sha1 index fa24d6a..885db74 100644 --- a/tools/luci-go/mac64/isolate.sha1 +++ b/tools/luci-go/mac64/isolate.sha1
@@ -1 +1 @@ -9a893e89be9a4fc932ba04365ba0df5b81bda765 +a1b6aa3e545ee371ff1e488ac4a83fb5dce3c349
diff --git a/tools/luci-go/win64/isolate.exe.sha1 b/tools/luci-go/win64/isolate.exe.sha1 index 69e8c4bf..8ff73f6 100644 --- a/tools/luci-go/win64/isolate.exe.sha1 +++ b/tools/luci-go/win64/isolate.exe.sha1
@@ -1 +1 @@ -53de6456d5b1c15ed9151454008e6af26922b255 +4e4bcb96b7bd4828e625d523e9b9984e1fc499d5
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 0a3d9416..e192bf0 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -48,6 +48,19 @@ 'Android x86 Builder (dbg)': 'android_debug_static_bot_x86', }, + 'chromium.android.fyi': { + 'NDK Next MIPS Builder': + 'android_ndk_next_release_bot_minimal_symbols_mipsel', + 'NDK Next arm Builder': + 'android_ndk_next_release_bot_minimal_symbols', + 'NDK Next arm64 Builder': + 'android_ndk_next_release_bot_minimal_symbols_arm64', + 'NDK Next x64 Builder': + 'android_ndk_next_release_bot_minimal_symbols_x64', + 'NDK Next x86 Builder': + 'android_ndk_next_release_bot_minimal_symbols_x86', + }, + 'chromium.chrome': { 'Google Chrome ChromeOS': 'official_goma_chromeos', 'Google Chrome Linux x64': 'official_goma', @@ -130,6 +143,8 @@ 'CrWinGoma(dll)': 'shared_release_bot_x86', 'ClangToTAndroidASan': 'android_clang_tot_asan', 'ClangToTAndroid (dbg)': 'android_clang_tot_dbg', + 'ClangToTAndroid': 'android_clang_tot_release', + 'ClangToTAndroid64': 'android_clang_tot_release_arm64', 'ClangToTAndroid x64': 'android_clang_tot_x64', 'ClangToTLinux': 'clang_tot_linux_full_symbols_shared_release', 'ClangToTLinux (dbg)': 'clang_tot_shared_debug', @@ -311,8 +326,9 @@ 'chromium.perf': { 'Android Builder': 'official_goma_minimal_symbols_android', - 'Android Compile': 'official_goma_minimal_symbols_android', 'Android arm64 Builder': 'official_goma_minimal_symbols_android_arm64', + 'Android Compile': 'official_goma_minimal_symbols_android', + 'Android arm64 Compile': 'official_goma_minimal_symbols_android_arm64', 'Linux Builder': 'official_goma', 'Mac Builder': 'official_goma', 'Win Builder': 'official_goma_x86', @@ -693,6 +709,14 @@ 'android_without_codecs', 'clang_tot', 'shared', 'debug', ], + 'android_clang_tot_release': [ + 'android_without_codecs', 'clang_tot', 'release', + ], + + 'android_clang_tot_release_arm64': [ + 'android_without_codecs', 'clang_tot', 'release', 'arm64', + ], + 'android_clang_tot_x64': [ 'android_without_codecs', 'clang_tot', 'shared', 'x64', 'release', 'dcheck_always_on', @@ -826,6 +850,26 @@ 'android', 'debug_trybot', 'x86', ], + 'android_ndk_next_release_bot_minimal_symbols': [ + 'android', 'ndk_next', 'release_bot', 'minimal_symbols', + ], + + 'android_ndk_next_release_bot_minimal_symbols_arm64': [ + 'android', 'ndk_next', 'release_bot', 'minimal_symbols', 'arm64', + ], + + 'android_ndk_next_release_bot_minimal_symbols_mipsel': [ + 'android', 'ndk_next', 'release_bot', 'minimal_symbols', 'mipsel', + ], + + 'android_ndk_next_release_bot_minimal_symbols_x64': [ + 'android', 'ndk_next', 'release_bot', 'minimal_symbols', 'x64', + ], + + 'android_ndk_next_release_bot_minimal_symbols_x86': [ + 'android', 'ndk_next', 'release_bot', 'minimal_symbols', 'x86', + ], + 'android_release_bot_minimal_symbols': [ 'android', 'release_bot', 'minimal_symbols', ], @@ -1704,6 +1748,10 @@ 'gn_args': 'is_msan=true msan_track_origins=0 use_prebuilt_instrumented_libraries=true', }, + 'ndk_next': { + 'gn_args': 'android_ndk_version="r13b" android_ndk_major_version="13"', + }, + 'no_pch': { 'gn_args': 'enable_precompiled_headers=false', },
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index e856f24b..cb45ed01d 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -14944,10 +14944,23 @@ units="microseconds"> <owner>dtapuska@chromium.org</owner> <summary> - Time between when a forced non-blocking touchstart or first touchmove event - per scroll was generated and the event processed during fling. This - histogram tracks the benefit of forcing non-blocking events listeners during - fling. + Time between when a touchstart or first touchmove event per scroll was + generated and the event processed, for events which were forced non-blocking + since they occurred during fling. This histogram tracks the benefit of + forcing events non-blocking during fling. + </summary> +</histogram> + +<histogram + name="Event.PassiveListeners.ForcedNonBlockingLatencyDueToUnresponsiveMainThread" + units="microseconds"> + <owner>tdresser@chromium.org</owner> + <summary> + Time between when a touchstart or first touchmove event per scroll was + generated and the event processed, for events which were forced non-blocking + since they occurred while the main thread was unresponsive. This histogram + tracks the benefit of forcing events non-blocking when the main thread is + unresponsive. </summary> </histogram> @@ -25579,6 +25592,23 @@ </summary> </histogram> +<histogram name="Media.Video.FullscreenOrientationLock.LockResult" + enum="VideoFullscreenOrientationLockResult"> + <owner>mlamouri@chromium.org</owner> + <summary> + Result of the orientation lock attempt when a video enters fullscreen. + </summary> +</histogram> + +<histogram name="Media.Video.FullscreenOrientationLock.MetadataAvailability" + enum="VideoFullscreenOrientationLockMetadataAvailability"> + <owner>mlamouri@chromium.org</owner> + <summary> + Status of the metadata when attempting to lock the screen orientation for a + fullscreen video. + </summary> +</histogram> + <histogram name="Media.Video.KeyFrameDistance" units="ms"> <owner>avayvod@chromium.org</owner> <owner>dalecurtis@chromium.org</owner> @@ -38472,6 +38502,16 @@ </summary> </histogram> +<histogram name="NewTabPage.ContentSuggestions.TimeSinceLastBackgroundFetch" + units="ms"> + <owner>markusheintz@chromium.org</owner> + <summary> + Android: The time since the last successful background fetch of remote + content suggestions. Recorded when the user looks at content suggestions on + the NTP. + </summary> +</histogram> + <histogram name="NewTabPage.ContentSuggestions.UsageTimeLocal"> <owner>markusheintz@chromium.org</owner> <summary> @@ -39907,6 +39947,17 @@ </summary> </histogram> +<histogram name="NQE.CellularSignalStrengthDifference" units="dBm"> + <owner>tbansal@chromium.org</owner> + <owner>bengr@chromium.org</owner> + <summary> + Difference between the minimum and the maximum received signal strength + since the last connection change event. Recorded only on cellular + connections on Android platform when the cellular signal strength was + available. Recorded right before a connection change event. + </summary> +</histogram> + <histogram name="NQE.Correlation.ResourceLoadTime.0Kb_128Kb"> <owner>tbansal@chromium.org</owner> <owner>bengr@chromium.org</owner> @@ -43952,6 +44003,10 @@ </histogram> <histogram name="PasswordManager.SignInPromoCountTilClick"> + <obsolete> + Deprecated as of 12/16/16. New statistic is + PasswordManager.SignInPromoCountTil*. + </obsolete> <owner>vasilii@chromium.org</owner> <summary> The number of times the Sign In promo in the password bubble was shown @@ -43959,6 +44014,22 @@ </summary> </histogram> +<histogram name="PasswordManager.SignInPromoCountTilNoThanks"> + <owner>vasilii@chromium.org</owner> + <summary> + The number of times the Sign In promo in the password bubble was shown + before user clicked on "No thanks". + </summary> +</histogram> + +<histogram name="PasswordManager.SignInPromoCountTilSignIn"> + <owner>vasilii@chromium.org</owner> + <summary> + The number of times the Sign In promo in the password bubble was shown + before user clicked on "Sign in". + </summary> +</histogram> + <histogram name="PasswordManager.SignInPromoDismissalCount"> <owner>vasilii@chromium.org</owner> <summary> @@ -51396,7 +51467,7 @@ <summary>Final status of the download of a reading list entry.</summary> </histogram> -<histogram name="ReadingList.FirstReadAgeOnDeletion" units="minutes"> +<histogram name="ReadingList.FirstReadAgeOnDeletion" units="hours"> <owner>gambard@chromium.org</owner> <summary> Time since the first read of the reading list entry getting deleted. 0 if it @@ -63065,6 +63136,14 @@ </summary> </histogram> +<histogram name="Startup.BlockForCrashpadHandlerStartupTime" units="ms"> + <owner>crashpad-dev@chromium.org</owner> + <summary> + The amount of time that elapsed during in + crash_report::BlockUntilHandlerStarted(). + </summary> +</histogram> + <histogram name="Startup.BringToForegroundReason" enum="BooleanBringToForegroundReason"> <owner>johnme@chromium.org</owner> @@ -63164,6 +63243,9 @@ </histogram> <histogram name="Startup.BrowserMessageLoopStartTimeFromMainEntry" units="ms"> + <obsolete> + Deprecated 12/2016. crbug.com/634408 + </obsolete> <owner>fdoray@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -63171,12 +63253,15 @@ stat is only recorded after 7 minutes of OS uptime to try to mitigate the variance resulting from Chrome being autostarted. Replaced with Startup.BrowserMessageLoopStartTimeFromMainEntry2 which is recorded all the - time. TODO(fdoray): Deprecate this once M54 hits stable. crbug.com/634408 + time. </summary> </histogram> <histogram name="Startup.BrowserMessageLoopStartTimeFromMainEntry.FirstRun" units="ms"> + <obsolete> + Deprecated 12/2016. crbug.com/634408 + </obsolete> <owner>fdoray@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -63184,8 +63269,7 @@ run. This stat is only recorded after 7 minutes of OS uptime to try to mitigate the variance resulting from Chrome being autostarted. Replaced with Startup.BrowserMessageLoopStartTimeFromMainEntry.FirstRun2 which is recorded - all the time. TODO(fdoray): Deprecate this once M54 hits stable. - crbug.com/634408 + all the time. </summary> </histogram> @@ -63506,6 +63590,9 @@ </histogram> <histogram name="Startup.LoadTime.ExeMainToDllMain"> + <obsolete> + Deprecated 12/2016. crbug.com/634408 + </obsolete> <owner>fdoray@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -63513,7 +63600,6 @@ stat is only recorded after 7 minutes of OS uptime to try to mitigate the variance resulting from Chrome being autostarted. Replaced with Startup.LoadTime.ExeMainToDllMain2 which is recorded all the time. - TODO(fdoray): Deprecate this once M54 hits stable. crbug.com/634408 </summary> </histogram> @@ -63526,6 +63612,9 @@ </histogram> <histogram name="Startup.LoadTime.ProcessCreateToDllMain"> + <obsolete> + Deprecated 12/2016. crbug.com/634408 + </obsolete> <owner>fdoray@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -63533,7 +63622,6 @@ recorded after 7 minutes of OS uptime to try to mitigate the variance resulting from Chrome being autostarted. Replaced with Startup.LoadTime.ProcessCreateToDllMain2 which is recorded all the time. - TODO(fdoray): Deprecate this once M54 hits stable. crbug.com/634408 </summary> </histogram> @@ -63544,6 +63632,9 @@ </histogram> <histogram name="Startup.LoadTime.ProcessCreateToExeMain"> + <obsolete> + Deprecated 12/2016. crbug.com/634408 + </obsolete> <owner>fdoray@chromium.org</owner> <owner>gab@chromium.org</owner> <summary> @@ -63551,7 +63642,7 @@ chrome.exe. This stat is only recorded after 7 minutes of OS uptime to try to mitigate the variance resulting from Chrome being autostarted. Replaced with Startup.LoadTime.ProcessCreateToExeMain2 which is recorded all the - time. TODO(fdoray): Deprecate this once M54 hits stable. crbug.com/634408 + time. </summary> </histogram> @@ -73991,6 +74082,14 @@ </summary> </histogram> +<histogram name="WebRTC.Video.NumberOfPauseEvents" units="pause events"> + <owner>asapersson@chromium.org</owner> + <summary> + The number of times a video stream has been paused/resumed during a call. + Recorded when a stream is removed. + </summary> +</histogram> + <histogram name="WebRTC.Video.OnewayDelayInMs" units="ms"> <owner>asapersson@chromium.org</owner> <summary> @@ -74017,6 +74116,14 @@ </summary> </histogram> +<histogram name="WebRTC.Video.PausedTimeInPercent" units="%"> + <owner>asapersson@chromium.org</owner> + <summary> + Percentage of time that the video has been paused for a sent video stream. + Recorded when a stream is removed. + </summary> +</histogram> + <histogram name="WebRTC.Video.PliPacketsReceivedPerMinute" units="packets/minute"> <owner>asapersson@chromium.org</owner> @@ -74936,6 +75043,9 @@ <histogram name="WinJumplist.DetailedFolderMoveResults" enum="JumplistIconsDetailedFolderMoveCategory"> + <obsolete> + Obsolete 12/13/2016 as we are no long recording this metric. + </obsolete> <owner>chengx@chromium.org</owner> <summary> This metric is recorded when folder JumpListIcons is moved (can be rename or @@ -74948,6 +75058,21 @@ </summary> </histogram> +<histogram name="WinJumplist.DetailedFolderResults" + enum="JumplistIconsDetailedFolderOperationCategory"> + <owner>chengx@chromium.org</owner> + <summary> + This metric is recorded when folders JumpListIcons and JumpListIconsOld get + updated. These two folders are updated when tabs are closed, mostly visited + URLs get updated, etc. These two folders are updated as follows 1) + JumpListIconsOld with its content get deleted; 2) if step 1 succeeds, + JumpListIcons is moved, 3) if any of the previous steps fails, JumpListIcons + is deleted, 4) A new JumpListIcons folder is created. The status of these 4 + file operations are put together and recorded in this metric. The failure of + any of these file operations is suspected to be related to a known issue. + </summary> +</histogram> + <histogram name="WinJumplist.FolderMoveResults" enum="JumplistIconsFolderMoveCategory"> <obsolete> @@ -74962,11 +75087,15 @@ folder move operation. Before the move operation, there is another step that JumpListIconsOld folder is deleted. The status of these steps are put together and recorded in this metric. The failure of any of these steps is - suspected to be related to a known issue. + suspected to be related to a known issue listed below. + https://bugs.chromium.org/p/chromium/issues/detail?id=179576 </summary> </histogram> <histogram name="WinJumplist.FolderResults" enum="JumplisticonsfolderCategory"> + <obsolete> + Obselete 12/13/2016, as we are now recording DetailedFolderResults. + </obsolete> <owner>chengx@chromium.org</owner> <summary> This metric is recorded when folders JumpListIcons and JumpListIconsOld get @@ -83698,7 +83827,8 @@ <int value="2" label="Suppressed"/> <int value="3" label="Cancelable and not canceled"/> <int value="4" label="Cancelable and canceled"/> - <int value="5" label="Forced Non-Blocking"/> + <int value="5" label="Forced Non-Blocking Due to Fling"/> + <int value="6" label="Forced Non-Blocking Due to Unresponsive Main Thread"/> </enum> <enum name="EventTimestampValidity" type="int"> @@ -86667,10 +86797,10 @@ <int value="649" label="AudioContextDecodeAudioData"/> <int value="650" label="AudioContextResume"/> <int value="651" label="AudioContextSuspend"/> - <int value="652" label="AudioContext"/> - <int value="653" label="OfflineAudioContext"/> - <int value="654" label="PrefixedAudioContext"/> - <int value="655" label="PrefixedOfflineAudioContext"/> + <int value="652" label="OBSOLETE_AudioContext"/> + <int value="653" label="OBSOLETE_OfflineAudioContext"/> + <int value="654" label="OBSOLETE_PrefixedAudioContext"/> + <int value="655" label="OBSOLETE_PrefixedOfflineAudioContext"/> <int value="656" label="AddEventListenerNoArguments"/> <int value="657" label="AddEventListenerOneArgument"/> <int value="658" label="RemoveEventListenerNoArguments"/> @@ -87750,6 +87880,9 @@ <int value="1696" label="FullscreenAllowedByOrientationChange"/> <int value="1697" label="ServiceWorkerRespondToNavigationRequestWithRedirectedResponse"/> + <int value="1698" label="V8AudioContext_Constructor"/> + <int value="1699" label="V8OfflineAudioContext_Constructor"/> + <int value="1700" label="AppInstalledEventAddListener"/> </enum> <enum name="FetchRequestMode" type="int"> @@ -91934,6 +92067,46 @@ SourceDirRead Fail - DelFile Fail - DelSourceDir Fail"/> </enum> +<enum name="JumplistIconsDetailedFolderOperationCategory" type="int"> + <int value="0" + label="Del Dest Succeed - Mov Succeed - Del Src Succeed - Create Src + Succeed"/> + <int value="1" + label="Del Dest Fail - Mov Succeed - Del Src Succeed - Create Src + Succeed"/> + <int value="2" + label="Del Dest Succeed - Mov Fail - Del Src Succeed - Create Src + Succeed"/> + <int value="3" + label="Del Dest Fail - Mov Fail - Del Src Succeed - Create Src Succeed"/> + <int value="4" + label="Del Dest Succeed - Mov Succeed - Del Src Fail - Create Src + Succeed"/> + <int value="5" + label="Del Dest Fail - Mov Succeed - Del Src Fail - Create Src Succeed"/> + <int value="6" + label="Del Dest Succeed - Mov Fail - Del Src Fail - Create Src Succeed"/> + <int value="7" + label="Del Dest Fail - Mov Fail - Del Src Fail - Create Src Succeed"/> + <int value="8" + label="Del Dest Succeed - Mov Succeed - Del Src Succeed - Create Src + Fail"/> + <int value="9" + label="Del Dest Fail - Mov Succeed - Del Src Succeed - Create Src Fail"/> + <int value="10" + label="Del Dest Succeed - Mov Fail - Del Src Succeed - Create Src Fail"/> + <int value="11" + label="Del Dest Fail - Mov Fail - Del Src Succeed - Create Src Fail"/> + <int value="12" + label="Del Dest Succeed - Mov Succeed - Del Src Fail - Create Src Fail"/> + <int value="13" + label="Del Dest Fail - Mov Succeed - Del Src Fail - Create Src Fail"/> + <int value="14" + label="Del Dest Succeed - Mov Fail - Del Src Fail - Create Src Fail"/> + <int value="15" + label="Del Dest Fail - Mov Fail - Del Src Fail - Create Src Fail"/> +</enum> + <enum name="JumplisticonsfolderCategory" type="int"> <int value="0" label="Del Succeed - Mov Succeed - Create Succeed"/> <int value="1" label="Del Fail - Mov Succeed - Create Succeed"/> @@ -93361,6 +93534,7 @@ <int value="-622685174" label="enable-pdf-material-ui"/> <int value="-620030047" label="CrosCompUpdates:disabled"/> <int value="-617452890" label="media-router"/> + <int value="-612480090" label="FasterLocationReload:enabled"/> <int value="-610411643" label="enable-printer-app-search"/> <int value="-606898702" label="MaterialDesignSettings:disabled"/> <int value="-604814313" label="enable-pinch"/> @@ -93377,6 +93551,7 @@ <int value="-536289234" label="ssl-interstitial-v2-colorful"/> <int value="-535208779" label="enable-native-cups"/> <int value="-531810064" label="saveas-menu-label"/> + <int value="-528927088" label="AutofillCreditCardPopupLayout:disabled"/> <int value="-519960638" label="enable-site-engagement-service"/> <int value="-518104091" label="NewAudioRenderingMixingStrategy:enabled"/> <int value="-516845951" label="enable-embedded-extension-options"/> @@ -93461,6 +93636,7 @@ <int value="-152677714" label="AsmJsToWebAssembly:enabled"/> <int value="-147283486" label="enable-network-portal-notification"/> <int value="-146552997" label="enable-affiliation-based-matching"/> + <int value="-144134779" label="AndroidPayIntegrationV2:disabled"/> <int value="-138773929" label="PassiveDocumentEventListeners:enabled"/> <int value="-122492389" label="enable-browser-task-scheduler"/> <int value="-119055644" label="GenericSensor:enabled"/> @@ -93524,6 +93700,7 @@ <int value="157318016" label="AutomaticTabDiscarding:enabled"/> <int value="178337215" label="enable-md-history"/> <int value="180074362" label="memory-pressure-thresholds"/> + <int value="189728101" label="FasterLocationReload:disabled"/> <int value="194573877" label="MacViewsNativeDialogs:disabled"/> <int value="194895489" label="passive-listeners-default"/> <int value="201343576" label="enable-password-change-support:enabled"/> @@ -93609,6 +93786,7 @@ <int value="603326800" label="UsePasswordSeparatedSigninFlow:enabled"/> <int value="605150752" label="WebUSB:disabled"/> <int value="606288133" label="enable-print-preview-register-promos"/> + <int value="606512202" label="AutofillCreditCardPopupLayout:enabled"/> <int value="609112512" label="touch-selection-strategy"/> <int value="610545308" label="enable-potentially-annoying-security-features"/> <int value="625273056" label="disable-boot-animation"/> @@ -93693,6 +93871,7 @@ label="disable-hide-inactive-stacked-tab-close-buttons"/> <int value="1022992701" label="enable-origin-chip-always"/> <int value="1033597574" label="disable-layer-squashing"/> + <int value="1036068554" label="enable-android-pay-integration-v2"/> <int value="1050048304" label="enable-font-cache-scaling"/> <int value="1050321458" label="new-profile-management"/> <int value="1054910800" label="enable-timezone-tracking-option"/> @@ -93905,6 +94084,7 @@ <int value="1955677113" label="trace-export-events-to-etw"/> <int value="1958387645" label="ScanCardsInWebPayments:enabled"/> <int value="1961425320" label="force-qtkit"/> + <int value="1964816410" label="AndroidPayIntegrationV2:enabled"/> <int value="1966730288" label="disable-threaded-compositing"/> <int value="1969604362" label="enable-pinch-virtual-viewport"/> <int value="1980011075" label="debug-packed-apps"/> @@ -105798,6 +105978,7 @@ <int value="6" label="Extensions"/> <int value="7" label="Open Tabs"/> <int value="8" label="Apps"/> + <int value="11" label="Reading List"/> </enum> <enum name="UserType" type="int"> @@ -106152,6 +106333,18 @@ <int value="9" label="UYVY"/> </enum> +<enum name="VideoFullscreenOrientationLockMetadataAvailability" type="int"> + <int value="0" label="Available"/> + <int value="1" label="Missing"/> + <int value="2" label="Received (after Missing)"/> +</enum> + +<enum name="VideoFullscreenOrientationLockResult" type="int"> + <int value="0" label="Already locked, no attempt"/> + <int value="1" label="Portrait"/> + <int value="2" label="Landscape"/> +</enum> + <enum name="VideoPixelFormat" type="int"> <obsolete> Deprecated as of 05/2015. Substituted by VideoFormat. @@ -110233,6 +110426,7 @@ <affected-histogram name="ChromeGeneratedCustomTab.IntentToFirstCommitNavigationTime2"/> <affected-histogram name="CustomTabs.IntentToFirstCommitNavigationTime2"/> + <affected-histogram name="Startup.FirstCommitNavigationTime2"/> </histogram_suffixes> <histogram_suffixes name="InterProcessTimeTicksConversionType"> @@ -114674,6 +114868,7 @@ <suffix name="Original"/> <suffix name="Experimental"/> <affected-histogram name="SoftwareReporter.FoundUwSReadError"/> + <affected-histogram name="SoftwareReporter.LogsUploadEnabled"/> <affected-histogram name="SoftwareReporter.LogsUploadResult"/> <affected-histogram name="SoftwareReporter.LogsUploadResultRegistryError"/> <affected-histogram name="SoftwareReporter.MajorVersion"/>
diff --git a/tools/metrics/rappor/rappor.xml b/tools/metrics/rappor/rappor.xml index fc42d46..927580b 100644 --- a/tools/metrics/rappor/rappor.xml +++ b/tools/metrics/rappor/rappor.xml
@@ -2159,8 +2159,8 @@ <owner>dominickn@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> - The domain+registry of a URL that triggered a safe-browsing UWS - interstitial. + **DEPRECATED as of M57. The domain+registry of a URL that triggered a + safe-browsing UWS interstitial. </summary> <string-field name="domain"> <summary> @@ -2186,8 +2186,8 @@ </summary> <string-field name="domain"> <summary> - The domain+registry of a URL that triggered a safe-browsing malware - interstitial. + **DEPRECATED as of M57. The domain+registry of a URL that triggered a + safe-browsing malware interstitial. </summary> </string-field> <flags-field name="flags"> @@ -2249,8 +2249,8 @@ <owner>dominickn@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> - The domain+registry of a URL that triggered a safe-browsing phishing - interstitial. + **DEPRECATED as of M57. The domain+registry of a URL that triggered a + safe-browsing phishing interstitial. </summary> <string-field name="domain"> <summary> @@ -2300,7 +2300,8 @@ <owner>dominickn@chromium.org</owner> <owner>nparker@chromium.org</owner> <summary> - The domain+registry of a URL that triggered an SSL interstitial. + **DEPRECATED as of M57. The domain+registry of a URL that triggered an SSL + interstitial. </summary> <string-field name="domain"> <summary>
diff --git a/tools/perf/core/stacktrace_unittest.py b/tools/perf/core/stacktrace_unittest.py index 51b1e8a..a9d2744c 100644 --- a/tools/perf/core/stacktrace_unittest.py +++ b/tools/perf/core/stacktrace_unittest.py
@@ -36,7 +36,8 @@ def testCrashMinimalSymbols(self): with self.assertRaises(exceptions.DevtoolsTargetCrashException) as c: self._tab.Navigate('chrome://crash', timeout=5) - self.assertIn('OnNavigate', '\n'.join(c.exception.stack_trace)) + self.assertIn('PrepareRenderViewForNavigation', + '\n'.join(c.exception.stack_trace)) # The breakpad file specific test only apply to platforms which use the # breakpad symbol format. This also must be tested in isolation because it can
diff --git a/tools/perf/generate_perf_json.py b/tools/perf/generate_perf_json.py index 14869ee..29783f0 100755 --- a/tools/perf/generate_perf_json.py +++ b/tools/perf/generate_perf_json.py
@@ -380,18 +380,6 @@ } ]) waterfall = add_tester( - waterfall, 'Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', - swarming=[ - { - 'gpu': '10de:08a4', - 'os': 'Mac-10.10', - 'device_ids': [ - 'build24-b1', 'build25-b1', - 'build26-b1', 'build27-b1', 'build28-b1' - ] - } - ]) - waterfall = add_tester( waterfall, 'Mac Pro 10.11 Perf', 'chromium-rel-mac11-pro', 'mac', swarming=[ @@ -609,7 +597,6 @@ LEGACY_DEVICE_AFFIINITY_ALGORITHM = [ 'Win Zenbook Perf', 'Win 10 High-DPI Perf', - 'Mac HDD Perf', ] def current_benchmarks(use_whitelist):
diff --git a/tools/perf/page_sets/page_cycler_story.py b/tools/perf/page_sets/page_cycler_story.py index f3bf387f..a5fabf1 100644 --- a/tools/perf/page_sets/page_cycler_story.py +++ b/tools/perf/page_sets/page_cycler_story.py
@@ -6,7 +6,10 @@ from telemetry.page import cache_temperature as cache_temperature_module from telemetry.page import shared_page_state + _TTI_WAIT_TIME = 10 +_NAVIGATION_TIMEOUT = 180 +_WEB_CONTENTS_TIMEOUT = 180 class PageCyclerStory(page.Page): @@ -19,6 +22,13 @@ cache_temperature=cache_temperature, **kwargs) + def RunNavigateSteps(self, action_runner): + url = self.file_path_url_with_scheme if self.is_file else self.url + action_runner.Navigate(url, + self.script_to_evaluate_on_commit, + timeout_in_seconds=_NAVIGATION_TIMEOUT) + def RunPageInteractions(self, action_runner): - action_runner.tab.WaitForDocumentReadyStateToBeComplete() + action_runner.tab.WaitForDocumentReadyStateToBeComplete( + _WEB_CONTENTS_TIMEOUT) action_runner.Wait(_TTI_WAIT_TIME)
diff --git a/tools/resource_prefetch_predictor/generate_database.py b/tools/resource_prefetch_predictor/generate_test_data.py similarity index 72% rename from tools/resource_prefetch_predictor/generate_database.py rename to tools/resource_prefetch_predictor/generate_test_data.py index 60dfd5f..39f8c35 100755 --- a/tools/resource_prefetch_predictor/generate_database.py +++ b/tools/resource_prefetch_predictor/generate_test_data.py
@@ -6,6 +6,7 @@ """Loads a set of web pages several times on a device, and extracts the predictor database. +Also generates a WPR archive for another page. """ import argparse @@ -24,13 +25,14 @@ import devil_chromium sys.path.append(os.path.join(_SRC_PATH, 'tools', 'android', 'loading')) +import device_setup from options import OPTIONS import page_track import prefetch_predictor_common -_PAGE_LOAD_TIMEOUT = 20 +_PAGE_LOAD_TIMEOUT = 40 def _CreateArgumentParser(): @@ -43,14 +45,16 @@ '(one per line). URLs can be repeated.') parser.add_argument('--output_filename', help='File to store the database in.') + parser.add_argument('--test_url', help='URL to record an archive of.') + parser.add_argument('--wpr_archive', help='WPR archive path.') parser.add_argument('--url_repeat', help=('Number of times each URL in the input ' - 'file is loaded.'), - default=3) + 'file is loaded.'), default=3) return parser -def _Go(chrome_controller, urls_filename, output_filename, repeats): +def _GenerateDatabase(chrome_controller, urls_filename, output_filename, + repeats): urls = [] with open(urls_filename) as f: urls = [line.strip() for line in f.readlines()] @@ -71,6 +75,16 @@ output_filename) +def _GenerateWprArchive(device, url, archive_path): + with device_setup.RemoteWprHost(device, archive_path, record=True) as wpr: + chrome_controller = prefetch_predictor_common.Setup( + device, wpr.chrome_args) + with chrome_controller.Open() as connection: + page_track.PageTrack(connection) # Registers the listeners. + connection.MonitorUrl(url, timeout_seconds=_PAGE_LOAD_TIMEOUT, + stop_delay_multiplier=1.5) + + def main(): devil_chromium.Initialize() logging.basicConfig(level=logging.INFO) @@ -86,8 +100,9 @@ chrome_controller = prefetch_predictor_common.Setup( device, ['--speculative-resource-prefetching=learning']) - _Go(chrome_controller, args.urls_filename, args.output_filename, - int(args.url_repeat)) + _GenerateDatabase(chrome_controller, args.urls_filename, + args.output_filename, int(args.url_repeat)) + _GenerateWprArchive(device, args.test_url, args.wpr_archive) if __name__ == '__main__':
diff --git a/tools/resource_prefetch_predictor/prefetch_benchmark.py b/tools/resource_prefetch_predictor/prefetch_benchmark.py index 518af04..b92d4bf7 100755 --- a/tools/resource_prefetch_predictor/prefetch_benchmark.py +++ b/tools/resource_prefetch_predictor/prefetch_benchmark.py
@@ -9,6 +9,7 @@ import argparse import logging import os +import random import sys import time @@ -21,6 +22,7 @@ import device_setup sys.path.append(os.path.join(_SRC_PATH, 'tools', 'android', 'loading')) +import controller from options import OPTIONS sys.path.append(os.path.join(_SRC_PATH, 'build', 'android')) @@ -46,10 +48,16 @@ help=('File containing the predictor database, as ' 'obtained from generate_database.py.')) parser.add_argument('--url', help='URL to load.') - parser.add_argument('--prefetch_delay_ms', - help='Prefetch delay in ms. -1 to disable prefetch.') + parser.add_argument('--prefetch_delays_ms', + help='List of prefetch delays in ms. -1 to disable ' + 'prefetch. Runs will randomly select one delay in the ' + 'list.') parser.add_argument('--output_filename', help='CSV file to append the result to.') + parser.add_argument('--network_condition', + help='Network condition for emulation.') + parser.add_argument('--wpr_archive', help='WPR archive path.') + parser.add_argument('--once', help='Only run once.', action='store_true') return parser @@ -88,20 +96,36 @@ device.RunShellCommand(command, as_root=True) -def _Go(device, url, prefetch_delay_ms): +def _RunOnce(device, database_filename, url, prefetch_delay_ms, + output_filename, wpr_archive, network_condition): + _Setup(device, database_filename) + disable_prefetch = prefetch_delay_ms == -1 # Startup tracing to ease debugging. chrome_args = (customtabs_benchmark.CHROME_ARGS + ['--trace-startup', '--trace-startup-duration=20']) if not disable_prefetch: chrome_args.append(_EXTERNAL_PREFETCH_FLAG) - prefetch_mode = 'disabled' if disable_prefetch else 'speculative_prefetch' - result = customtabs_benchmark.RunOnce( - device, url, warmup=True, speculation_mode=prefetch_mode, - delay_to_may_launch_url=2000, - delay_to_launch_url=prefetch_delay_ms, cold=False, - chrome_args=chrome_args, reset_chrome_state=False) - return customtabs_benchmark.ParseResult(result) + + chrome_controller = controller.RemoteChromeController(device) + device.ForceStop(OPTIONS.ChromePackage().package) + chrome_controller.AddChromeArguments(chrome_args) + + with device_setup.RemoteWprHost( + device, wpr_archive, record=False, + network_condition_name=network_condition) as wpr: + logging.info('WPR arguments: ' + ' '.join(wpr.chrome_args)) + chrome_args += wpr.chrome_args + prefetch_mode = 'disabled' if disable_prefetch else 'speculative_prefetch' + result = customtabs_benchmark.RunOnce( + device, url, warmup=True, speculation_mode=prefetch_mode, + delay_to_may_launch_url=2000, + delay_to_launch_url=prefetch_delay_ms, cold=False, + chrome_args=chrome_args, reset_chrome_state=False) + data_point = customtabs_benchmark.ParseResult(result) + + with open(output_filename, 'a') as f: + f.write(','.join(str(x) for x in data_point) + '\n') def main(): @@ -111,16 +135,27 @@ parser = _CreateArgumentParser() args = parser.parse_args() OPTIONS.SetParsedArgs(args) + + if os.path.exists(args.output_filename): + logging.error('Output file %s already exists.' % args.output_filename) + sys.exit(1) + device = prefetch_predictor_common.FindDevice(args.device) if device is None: logging.error('Could not find device: %s.', args.device) sys.exit(1) - _Setup(device, args.database) - result = _Go(device, args.url, int(args.prefetch_delay_ms)) - print result - with open(args.output_filename, 'a') as f: - f.write(','.join(str(x) for x in result) + '\n') + delays = [int(x) for x in args.prefetch_delays_ms.split(',')] + + with open(args.output_filename, 'w') as f: + f.write(','.join(customtabs_benchmark.RESULT_FIELDS) + '\n') + + while True: + delay = delays[random.randint(0, len(delays) - 1)] + _RunOnce(device, args.database, args.url, delay, args.output_filename, + args.wpr_archive, args.network_condition) + if args.once: + return if __name__ == '__main__':