diff options
author | Michaël Zasso <targos@protonmail.com> | 2017-02-14 11:27:26 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2017-02-22 15:55:42 +0100 |
commit | 7a77daf24344db7942e34c962b0f1ee729ab7af5 (patch) | |
tree | e7cbe7bf4e2f4b802a8f5bc18336c546cd6a0d7f /deps/v8/tools | |
parent | 5f08871ee93ea739148cc49e0f7679e33c70295a (diff) | |
download | node-new-7a77daf24344db7942e34c962b0f1ee729ab7af5.tar.gz |
deps: update V8 to 5.6.326.55
PR-URL: https://github.com/nodejs/node/pull/10992
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps/v8/tools')
22 files changed, 253 insertions, 162 deletions
diff --git a/deps/v8/tools/callstats.html b/deps/v8/tools/callstats.html index cb2e0bea3e..b70d40c98a 100644 --- a/deps/v8/tools/callstats.html +++ b/deps/v8/tools/callstats.html @@ -1381,6 +1381,8 @@ code is governed by a BSD-style license that can be found in the LICENSE file. this.version = version; } add(entry) { + // Ignore accidentally added Group entries. + if (entry.name.startsWith(GroupedEntry.prefix)) return; entry.page = this; this.entryDict.set(entry.name, entry); var added = false; @@ -1559,7 +1561,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file. /StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*/, "#DC3912")); Group.add('compile', new Group('Compile', /.*Compile.*/, "#FFAA00")); Group.add('parse', new Group('Parse', /.*Parse.*/, "#FF6600")); - Group.add('callback', new Group('Callback', /.*Callback$/, "#109618")); + Group.add('callback', new Group('Callback', /.*Callback.*/, "#109618")); Group.add('api', new Group('API', /.*API.*/, "#990099")); Group.add('gc', new Group('GC', /GC|AllocateInTargetSpace/, "#0099C6")); Group.add('javascript', new Group('JavaScript', /JS_Execution/, "#DD4477")); @@ -1568,7 +1570,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file. class GroupedEntry extends Entry { constructor(group) { - super(0, 'Group-' + group.name, 0, 0, 0, 0, 0, 0); + super(0, GroupedEntry.prefix + group.name, 0, 0, 0, 0, 0, 0); this.group = group; this.entries = []; } @@ -1636,6 +1638,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file. return this.getVarianceForProperty('time') } } + GroupedEntry.prefix = 'Group-'; class UnclassifiedEntry extends GroupedEntry { constructor(page) { diff --git a/deps/v8/tools/dev/v8gen.py b/deps/v8/tools/dev/v8gen.py index f0fb74b709..b8a34e2af2 100755 --- a/deps/v8/tools/dev/v8gen.py +++ b/deps/v8/tools/dev/v8gen.py @@ -269,7 +269,7 @@ class GenerateGnArgs(object): # Artificially increment modification time as our modifications happen too # fast. This makes sure that gn is properly rebuilding the ninja files. mtime = os.path.getmtime(gn_args_path) + 1 - with open(gn_args_path, 'aw'): + with open(gn_args_path, 'a'): os.utime(gn_args_path, (mtime, mtime)) return True diff --git a/deps/v8/tools/external-reference-check.py b/deps/v8/tools/external-reference-check.py deleted file mode 100644 index be01dec1d0..0000000000 --- a/deps/v8/tools/external-reference-check.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 the V8 project authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import re -import os -import sys - -DECLARE_FILE = "src/assembler.h" -REGISTER_FILE = "src/external-reference-table.cc" -DECLARE_RE = re.compile("\s*static ExternalReference ([^(]+)\(") -REGISTER_RE = re.compile("\s*Add\(ExternalReference::([^(]+)\(") - -WORKSPACE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) - -# Ignore those. -BLACKLISTED = [ - "fixed_typed_array_base_data_offset", - "page_flags", - "math_exp_constants", - "math_exp_log_table", - "ForDeoptEntry", -] - -def Find(filename, re): - references = [] - with open(filename, "r") as f: - for line in f: - match = re.match(line) - if match: - references.append(match.group(1)) - return references - -def Main(): - declarations = Find(DECLARE_FILE, DECLARE_RE) - registrations = Find(REGISTER_FILE, REGISTER_RE) - difference = list(set(declarations) - set(registrations) - set(BLACKLISTED)) - for reference in difference: - print("Declared but not registered: ExternalReference::%s" % reference) - return len(difference) > 0 - -if __name__ == "__main__": - sys.exit(Main()) diff --git a/deps/v8/tools/gdbinit b/deps/v8/tools/gdbinit index 1eae053f2c..b696a8fc36 100644 --- a/deps/v8/tools/gdbinit +++ b/deps/v8/tools/gdbinit @@ -68,5 +68,32 @@ Skip the jitted stack on x64 to where we entered JS last. Usage: jss end +# Print stack trace with assertion scopes. +define bta +python +import re +frame_re = re.compile("^#(\d+)\s*(?:0x[a-f\d]+ in )?(.+) \(.+ at (.+)") +assert_re = re.compile("^\s*(\S+) = .+<v8::internal::Per\w+AssertType::(\w+)_ASSERT, (false|true)>") +btl = gdb.execute("backtrace full", to_string = True).splitlines() +for l in btl: + match = frame_re.match(l) + if match: + print("[%-2s] %-60s %-40s" % (match.group(1), match.group(2), match.group(3))) + match = assert_re.match(l) + if match: + if match.group(3) == "false": + prefix = "Disallow" + color = "\033[91m" + else: + prefix = "Allow" + color = "\033[92m" + print("%s -> %s %s (%s)\033[0m" % (color, prefix, match.group(2), match.group(1))) +end +end +document bta +Print stack trace with assertion scopes +Usage: bta +end + set disassembly-flavor intel set disable-randomization off diff --git a/deps/v8/tools/ic-explorer.html b/deps/v8/tools/ic-explorer.html index 42bbc20396..02214e3ee9 100644 --- a/deps/v8/tools/ic-explorer.html +++ b/deps/v8/tools/ic-explorer.html @@ -40,6 +40,11 @@ code is governed by a BSD-style license that can be found in the LICENSE file. "use strict" var entries = []; + var properties = ['type', 'category', 'file', 'filePosition', 'state', + 'key', 'isNative', 'map', 'propertiesMode', 'numberOfOwnProperties', + 'instanceType' + ] + class Entry { constructor(id, line) { this.id = id; @@ -50,8 +55,11 @@ code is governed by a BSD-style license that can be found in the LICENSE file. if (parts[0][0] !== "[") return; if (parts[1] === "patching") return; this.type = parts[0].substr(1); - this.category = "Other"; - this.map = undefined; + this.category = "unknown"; + this.map = "unknown"; + this.propertiesMode = "unknown"; + this.numberOfOwnProperties = 0; + this.instanceType = "unknown"; if (this.type.indexOf("Store") !== -1) { this.category = "Store"; } else if (this.type.indexOf("Load") !== -1) { @@ -70,13 +78,22 @@ code is governed by a BSD-style license that can be found in the LICENSE file. var offset = this.parsePositionAndFile(parts, 2); if (offset == -1) return this.state = parts[++offset]; - this.map = parts[offset + 1]; - if (this.map !== undefined && this.map.startsWith("map=")) { - this.map = this.map.substring(4); - offset++; - } else { - this.map = undefined; - } + var mapPart = parts[offset + 1]; + if (mapPart !== undefined && mapPart.startsWith("map=")) { + if (mapPart[4] == "(") { + if (mapPart.endsWith(")")) { + this.map = mapPart.substr(5, mapPart.length-6); + } else { + this.map = mapPart.substr(5); + } + offset++; + offset = this.parseMapProperties(parts, offset); + } else { + this.map = mapPart.substr(4); + offset++; + } + if (this.map == "(nil)") this.map = "unknown"; + } if (this.type !== "CompareIC") { // if there is no address we have a smi key var address = parts[++offset]; @@ -108,6 +125,17 @@ code is governed by a BSD-style license that can be found in the LICENSE file. this.isValid = true; } + parseMapProperties(parts, offset) { + var next = parts[++offset]; + if (!next.startsWith('dict')) return offset; + this.propertiesMode = + next.substr(5) == "0" ? "fast" : "slow"; + this.numberOfOwnProperties = parts[++offset].substr(4); + next = parts[++offset]; + this.instanceType = next.substr(5, next.length-6); + return offset; + } + parsePositionAndFile(parts, start) { // find the position of 'at' in the parts array. var offset = start; @@ -157,11 +185,6 @@ code is governed by a BSD-style license that can be found in the LICENSE file. } - - var properties = ['type', 'category', 'file', 'filePosition', 'state', - 'key', 'isNative', 'map' - ] - class Group { constructor(property, key, entry) { this.property = property; @@ -332,15 +355,32 @@ code is governed by a BSD-style license that can be found in the LICENSE file. select.add(option); } } + + function handleOnLoad() { + document.querySelector("#uploadInput").focus(); + } </script> </head> -<body> +<body onload="handleOnLoad()"> <h1> <span style="color: #00FF00">I</span> <span style="color: #FF00FF">C</span> <span style="color: #00FFFF">E</span> </h1> Your IC-Explorer. + + <div id="legend" style="padding-right: 200px"> + <div style="float:right; border-style: solid; border-width: 1px; padding:20px"> + 0 uninitialized<br> + . premonomorphic<br> + 1 monomorphic<br> + ^ recompute handler<br> + P polymorphic<br> + N megamorphic<br> + G generic + </div> + </div> + <h2>Usage</h2> Run your script with <code>--trace_ic</code> and upload on this page:<br/> <code>/path/to/d8 --trace_ic your_script.js > trace.txt</code> <h2>Data</h2> diff --git a/deps/v8/tools/ignition/linux_perf_report.py b/deps/v8/tools/ignition/linux_perf_report.py index eaf85b3f91..69db37cbae 100755 --- a/deps/v8/tools/ignition/linux_perf_report.py +++ b/deps/v8/tools/ignition/linux_perf_report.py @@ -52,6 +52,8 @@ examples: COMPILER_SYMBOLS_RE = re.compile( r"v8::internal::(?:\(anonymous namespace\)::)?Compile|v8::internal::Parser") +JIT_CODE_SYMBOLS_RE = re.compile( + r"(LazyCompile|Compile|Eval|Script):(\*|~)") def strip_function_parameters(symbol): @@ -70,7 +72,8 @@ def strip_function_parameters(symbol): return symbol[:-pos] -def collapsed_callchains_generator(perf_stream, show_all=False, +def collapsed_callchains_generator(perf_stream, hide_other=False, + hide_compiler=False, hide_jit=False, show_full_signatures=False): current_chain = [] skip_until_end_of_chain = False @@ -85,7 +88,8 @@ def collapsed_callchains_generator(perf_stream, show_all=False, # Empty line signals the end of the callchain. if not line: - if not skip_until_end_of_chain and current_chain and show_all: + if (not skip_until_end_of_chain and current_chain + and not hide_other): current_chain.append("[other]") yield current_chain # Reset parser status. @@ -101,14 +105,26 @@ def collapsed_callchains_generator(perf_stream, show_all=False, symbol = line.split(" ", 1)[1].split("+", 1)[0] if not show_full_signatures: symbol = strip_function_parameters(symbol) + + # Avoid chains of [unknown] + if (symbol == "[unknown]" and current_chain and + current_chain[-1] == "[unknown]"): + continue + current_chain.append(symbol) if symbol.startswith("BytecodeHandler:"): + current_chain.append("[interpreter]") yield current_chain skip_until_end_of_chain = True + elif JIT_CODE_SYMBOLS_RE.match(symbol): + if not hide_jit: + current_chain.append("[jit]") + yield current_chain + skip_until_end_of_chain = True elif symbol == "Stub:CEntryStub" and compiler_symbol_in_chain: - if show_all: - current_chain[-1] = "[compiler]" + if not hide_compiler: + current_chain.append("[compiler]") yield current_chain skip_until_end_of_chain = True elif COMPILER_SYMBOLS_RE.match(symbol): @@ -181,8 +197,18 @@ def parse_command_line(): dest="output_flamegraph" ) command_line_parser.add_argument( - "--show-all", "-a", - help="show samples outside Ignition bytecode handlers", + "--hide-other", + help="Hide other samples", + action="store_true" + ) + command_line_parser.add_argument( + "--hide-compiler", + help="Hide samples during compilation", + action="store_true" + ) + command_line_parser.add_argument( + "--hide-jit", + help="Hide samples from JIT code execution", action="store_true" ) command_line_parser.add_argument( @@ -210,8 +236,8 @@ def main(): stdout=subprocess.PIPE) callchains = collapsed_callchains_generator( - perf.stdout, program_options.show_all, - program_options.show_full_signatures) + perf.stdout, program_options.hide_other, program_options.hide_compiler, + program_options.hide_jit, program_options.show_full_signatures) if program_options.output_flamegraph: write_flamegraph_input_file(program_options.output_stream, callchains) diff --git a/deps/v8/tools/ignition/linux_perf_report_test.py b/deps/v8/tools/ignition/linux_perf_report_test.py index d9cef75dff..9d163c8adb 100644 --- a/deps/v8/tools/ignition/linux_perf_report_test.py +++ b/deps/v8/tools/ignition/linux_perf_report_test.py @@ -40,6 +40,9 @@ PERF_SCRIPT_OUTPUT = """ 11111111 Builtin:InterpreterEntryTrampoline 22222222 bar + 00000000 hello + 11111111 LazyCompile:~Foo + 11111111 Builtin:InterpreterEntryTrampoline 22222222 bar """ @@ -50,22 +53,26 @@ class LinuxPerfReportTest(unittest.TestCase): perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT) callchains = list(ipr.collapsed_callchains_generator(perf_stream)) self.assertListEqual(callchains, [ - ["foo", "BytecodeHandler:bar"], - ["foo", "BytecodeHandler:bar"], - ["beep", "BytecodeHandler:bar"], + ['firstSymbol', 'secondSymbol', '[other]'], + ["foo", "BytecodeHandler:bar", "[interpreter]"], + ["foo", "BytecodeHandler:bar", "[interpreter]"], + ["beep", "BytecodeHandler:bar", "[interpreter]"], + ["hello", "v8::internal::Compiler", "Stub:CEntryStub", "[compiler]"], + ["Lost", "[misattributed]"], + ["hello", "LazyCompile:~Foo", "[jit]"], ["[entry trampoline]"], ]) - def test_collapsed_callchains_generator_show_other(self): + def test_collapsed_callchains_generator_hide_other(self): perf_stream = StringIO.StringIO(PERF_SCRIPT_OUTPUT) callchains = list(ipr.collapsed_callchains_generator(perf_stream, - show_all=True)) + hide_other=True, + hide_compiler=True, + hide_jit=True)) self.assertListEqual(callchains, [ - ['firstSymbol', 'secondSymbol', '[other]'], - ["foo", "BytecodeHandler:bar"], - ["foo", "BytecodeHandler:bar"], - ["beep", "BytecodeHandler:bar"], - ["hello", "v8::internal::Compiler", "[compiler]"], + ["foo", "BytecodeHandler:bar", "[interpreter]"], + ["foo", "BytecodeHandler:bar", "[interpreter]"], + ["beep", "BytecodeHandler:bar", "[interpreter]"], ["Lost", "[misattributed]"], ["[entry trampoline]"], ]) @@ -125,7 +132,7 @@ class LinuxPerfReportTest(unittest.TestCase): """) callchains = list(ipr.collapsed_callchains_generator(perf_stream, False)) self.assertListEqual(callchains, [ - ["foo", "BytecodeHandler:first"], + ["foo", "BytecodeHandler:first", "[interpreter]"], ]) def test_compiler_symbols_regex(self): @@ -137,6 +144,15 @@ class LinuxPerfReportTest(unittest.TestCase): for compiler_symbol in compiler_symbols: self.assertTrue(ipr.COMPILER_SYMBOLS_RE.match(compiler_symbol)) + def test_jit_code_symbols_regex(self): + jit_code_symbols = [ + "LazyCompile:~Foo blah.js", + "Eval:*", + "Script:*Bar tmp.js", + ] + for jit_code_symbol in jit_code_symbols: + self.assertTrue(ipr.JIT_CODE_SYMBOLS_RE.match(jit_code_symbol)) + def test_strip_function_parameters(self): def should_match(signature, name): self.assertEqual(ipr.strip_function_parameters(signature), name) @@ -145,3 +161,6 @@ class LinuxPerfReportTest(unittest.TestCase): should_match("Foo(foomatic::(anonymous)::bar(baz))", "Foo"), should_match("v8::(anonymous ns)::bar<thing(with, parentheses)>(baz, poe)", "v8::(anonymous ns)::bar<thing(with, parentheses)>") + +if __name__ == '__main__': + unittest.main() diff --git a/deps/v8/tools/parser-shell.cc b/deps/v8/tools/parser-shell.cc index 43d2578165..0517bbf0e6 100644 --- a/deps/v8/tools/parser-shell.cc +++ b/deps/v8/tools/parser-shell.cc @@ -93,9 +93,8 @@ std::pair<v8::base::TimeDelta, v8::base::TimeDelta> RunBaselineParser( i::ScriptData* cached_data_impl = NULL; // First round of parsing (produce data to cache). { - Zone zone(reinterpret_cast<i::Isolate*>(isolate)->allocator()); + Zone zone(reinterpret_cast<i::Isolate*>(isolate)->allocator(), ZONE_NAME); ParseInfo info(&zone, script); - info.set_global(); info.set_cached_data(&cached_data_impl); info.set_compile_options(v8::ScriptCompiler::kProduceParserCache); v8::base::ElapsedTimer timer; @@ -111,9 +110,8 @@ std::pair<v8::base::TimeDelta, v8::base::TimeDelta> RunBaselineParser( } // Second round of parsing (consume cached data). { - Zone zone(reinterpret_cast<i::Isolate*>(isolate)->allocator()); + Zone zone(reinterpret_cast<i::Isolate*>(isolate)->allocator(), ZONE_NAME); ParseInfo info(&zone, script); - info.set_global(); info.set_cached_data(&cached_data_impl); info.set_compile_options(v8::ScriptCompiler::kConsumeParserCache); v8::base::ElapsedTimer timer; diff --git a/deps/v8/tools/parser-shell.gyp b/deps/v8/tools/parser-shell.gyp index 4ef1a82d71..9b94888edf 100644 --- a/deps/v8/tools/parser-shell.gyp +++ b/deps/v8/tools/parser-shell.gyp @@ -37,6 +37,7 @@ 'type': 'executable', 'dependencies': [ '../src/v8.gyp:v8', + '../src/v8.gyp:v8_libbase', '../src/v8.gyp:v8_libplatform', ], 'conditions': [ diff --git a/deps/v8/tools/presubmit.py b/deps/v8/tools/presubmit.py index 3be9caf061..f9ae2bdea4 100755 --- a/deps/v8/tools/presubmit.py +++ b/deps/v8/tools/presubmit.py @@ -396,13 +396,6 @@ class SourceProcessor(SourceFileProcessor): print "Total violating files: %s" % violations return success - -def CheckExternalReferenceRegistration(workspace): - code = subprocess.call( - [sys.executable, join(workspace, "tools", "external-reference-check.py")]) - return code == 0 - - def _CheckStatusFileForDuplicateKeys(filepath): comma_space_bracket = re.compile(", *]") lines = [] @@ -503,7 +496,6 @@ def Main(): print "Running copyright header, trailing whitespaces and " \ "two empty lines between declarations check..." success &= SourceProcessor().Run(workspace) - success &= CheckExternalReferenceRegistration(workspace) success &= CheckStatusFiles(workspace) if success: return 0 diff --git a/deps/v8/tools/profviz/composer.js b/deps/v8/tools/profviz/composer.js index 108911de69..ce625addca 100644 --- a/deps/v8/tools/profviz/composer.js +++ b/deps/v8/tools/profviz/composer.js @@ -106,8 +106,6 @@ function PlotScriptComposer(kResX, kResY, error_output) { new TimerEvent("recompile async", "#CC4499", false, 1), 'V8.CompileEvalMicroSeconds': new TimerEvent("compile eval", "#CC4400", true, 0), - 'V8.IcMiss': - new TimerEvent("ic miss", "#CC9900", false, 0), 'V8.ParseMicroSeconds': new TimerEvent("parse", "#00CC00", true, 0), 'V8.PreParseMicroSeconds': diff --git a/deps/v8/tools/profviz/stdio.js b/deps/v8/tools/profviz/stdio.js index 5a8311dfb2..8ba12e3ce7 100644 --- a/deps/v8/tools/profviz/stdio.js +++ b/deps/v8/tools/profviz/stdio.js @@ -30,10 +30,10 @@ var distortion_per_entry = 0; var range_start_override = undefined; var range_end_override = undefined; -if (!processor.parse()) processor.printUsageAndExit();; +if (!processor.parse()) processor.printUsageAndExit(); var result = processor.result(); var distortion = parseInt(result.distortion); -if (isNaN(distortion)) processor.printUsageAndExit();; +if (isNaN(distortion)) processor.printUsageAndExit(); // Convert picoseconds to milliseconds. distortion_per_entry = distortion / 1000000; var rangelimits = result.range.split(","); @@ -43,7 +43,7 @@ if (!isNaN(range_start)) range_start_override = range_start; if (!isNaN(range_end)) range_end_override = range_end; var kResX = 1600; -var kResY = 700; +var kResY = 600; function log_error(text) { print(text); quit(1); diff --git a/deps/v8/tools/release/auto_roll.py b/deps/v8/tools/release/auto_roll.py index c1a99e8d11..d1a3f48cf8 100755 --- a/deps/v8/tools/release/auto_roll.py +++ b/deps/v8/tools/release/auto_roll.py @@ -20,7 +20,7 @@ Please close rolling in case of a roll revert: https://v8-roll.appspot.com/ This only works with a Google account. -CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel""") +CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel""") class Preparation(Step): MESSAGE = "Preparation." diff --git a/deps/v8/tools/release/test_scripts.py b/deps/v8/tools/release/test_scripts.py index ab92e89f3a..a344376628 100644 --- a/deps/v8/tools/release/test_scripts.py +++ b/deps/v8/tools/release/test_scripts.py @@ -1044,7 +1044,7 @@ Please close rolling in case of a roll revert: https://v8-roll.appspot.com/ This only works with a Google account. -CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel +CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel TBR=reviewer@chromium.org""" diff --git a/deps/v8/tools/run-tests.py b/deps/v8/tools/run-tests.py index f248dff5cc..e94f59939f 100755 --- a/deps/v8/tools/run-tests.py +++ b/deps/v8/tools/run-tests.py @@ -67,6 +67,8 @@ TEST_MAP = { "bot_default": [ "mjsunit", "cctest", + "debugger", + "inspector", "webkit", "fuzzer", "message", @@ -78,6 +80,8 @@ TEST_MAP = { "default": [ "mjsunit", "cctest", + "debugger", + "inspector", "fuzzer", "message", "preparser", @@ -88,6 +92,8 @@ TEST_MAP = { "optimize_for_size": [ "mjsunit", "cctest", + "debugger", + "inspector", "webkit", "intl", ], @@ -255,6 +261,9 @@ def BuildOptions(): result.add_option("--download-data-only", help="Deprecated", default=False, action="store_true") + result.add_option("--enable-inspector", + help="Indicates a build with inspector support", + default=False, action="store_true") result.add_option("--extra-flags", help="Additional flags to pass to each test command", default="") @@ -447,8 +456,13 @@ def ProcessOptions(options): print(">>> Latest GN build found is %s" % latest_config) options.outdir = os.path.join(DEFAULT_OUT_GN, latest_config) - build_config_path = os.path.join( - BASE_DIR, options.outdir, "v8_build_config.json") + if options.buildbot: + build_config_path = os.path.join( + BASE_DIR, options.outdir, options.mode, "v8_build_config.json") + else: + build_config_path = os.path.join( + BASE_DIR, options.outdir, "v8_build_config.json") + if os.path.exists(build_config_path): try: with open(build_config_path) as f: @@ -459,6 +473,10 @@ def ProcessOptions(options): return False options.auto_detect = True + # In auto-detect mode the outdir is always where we found the build config. + # This ensures that we'll also take the build products from there. + options.outdir = os.path.dirname(build_config_path) + options.arch_and_mode = None options.arch = build_config["v8_target_cpu"] if options.arch == 'x86': @@ -466,6 +484,7 @@ def ProcessOptions(options): options.arch = 'ia32' options.asan = build_config["is_asan"] options.dcheck_always_on = build_config["dcheck_always_on"] + options.enable_inspector = build_config["v8_enable_inspector"] options.mode = 'debug' if build_config["is_debug"] else 'release' options.msan = build_config["is_msan"] options.no_i18n = not build_config["v8_enable_i18n_support"] @@ -592,6 +611,13 @@ def ProcessOptions(options): if options.no_i18n: TEST_MAP["bot_default"].remove("intl") TEST_MAP["default"].remove("intl") + if not options.enable_inspector: + TEST_MAP["default"].remove("inspector") + TEST_MAP["bot_default"].remove("inspector") + TEST_MAP["optimize_for_size"].remove("inspector") + TEST_MAP["default"].remove("debugger") + TEST_MAP["bot_default"].remove("debugger") + TEST_MAP["optimize_for_size"].remove("debugger") return True @@ -702,15 +728,15 @@ def Execute(arch, mode, args, options, suites): shell_dir = options.shell_dir if not shell_dir: - if options.buildbot: + if options.auto_detect: + # If an output dir with a build was passed, test directly in that + # directory. + shell_dir = os.path.join(BASE_DIR, options.outdir) + elif options.buildbot: # TODO(machenbach): Get rid of different output folder location on # buildbot. Currently this is capitalized Release and Debug. shell_dir = os.path.join(BASE_DIR, options.outdir, mode) mode = BuildbotToV8Mode(mode) - elif options.auto_detect: - # If an output dir with a build was passed, test directly in that - # directory. - shell_dir = os.path.join(BASE_DIR, options.outdir) else: shell_dir = os.path.join( BASE_DIR, @@ -733,14 +759,8 @@ def Execute(arch, mode, args, options, suites): # Predictable mode is slower. options.timeout *= 2 - # TODO(machenbach): Remove temporary verbose output on windows after - # debugging driver-hung-up on XP. - verbose_output = ( - options.verbose or - utils.IsWindows() and options.progress == "verbose" - ) ctx = context.Context(arch, MODES[mode]["execution_mode"], shell_dir, - mode_flags, verbose_output, + mode_flags, options.verbose, options.timeout, options.isolates, options.command_prefix, @@ -851,7 +871,7 @@ def Execute(arch, mode, args, options, suites): run_networked = not options.no_network if not run_networked: - if verbose_output: + if options.verbose: print("Network distribution disabled, running tests locally.") elif utils.GuessOS() != "linux": print("Network distribution is only supported on Linux, sorry!") diff --git a/deps/v8/tools/sanitizers/sancov_merger.py b/deps/v8/tools/sanitizers/sancov_merger.py index a4cfec1b0c..867f8b4258 100755 --- a/deps/v8/tools/sanitizers/sancov_merger.py +++ b/deps/v8/tools/sanitizers/sancov_merger.py @@ -7,7 +7,7 @@ When merging test runner output, the sancov files are expected to be located in one directory with the file-name pattern: -<executable name>.test.<id>.sancov +<executable name>.test.<id>.<attempt>.sancov For each executable, this script writes a new file: <executable name>.result.sancov @@ -48,7 +48,7 @@ CPUS = cpu_count() # Regexp to find sancov file as output by the v8 test runner. Also grabs the # executable name in group 1. -SANCOV_FILE_RE = re.compile(r'^(.*)\.test\.\d+\.sancov$') +SANCOV_FILE_RE = re.compile(r'^(.*)\.test\.\d+\.\d+\.sancov$') # Regexp to find sancov result files as returned from swarming. SANCOV_RESULTS_FILE_RE = re.compile(r'^.*\.result\.sancov$') diff --git a/deps/v8/tools/sanitizers/sancov_merger_test.py b/deps/v8/tools/sanitizers/sancov_merger_test.py index 93b89eb8a7..899c716a5a 100644 --- a/deps/v8/tools/sanitizers/sancov_merger_test.py +++ b/deps/v8/tools/sanitizers/sancov_merger_test.py @@ -11,19 +11,19 @@ import sancov_merger # executable name -> file list. FILE_MAP = { 'd8': [ - 'd8.test.1.sancov', - 'd8.test.2.sancov', - 'd8.test.3.sancov', - 'd8.test.4.sancov', - 'd8.test.5.sancov', - 'd8.test.6.sancov', - 'd8.test.7.sancov', + 'd8.test.1.1.sancov', + 'd8.test.2.1.sancov', + 'd8.test.3.1.sancov', + 'd8.test.4.1.sancov', + 'd8.test.5.1.sancov', + 'd8.test.5.2.sancov', + 'd8.test.6.1.sancov', ], 'cctest': [ - 'cctest.test.1.sancov', - 'cctest.test.2.sancov', - 'cctest.test.3.sancov', - 'cctest.test.4.sancov', + 'cctest.test.1.1.sancov', + 'cctest.test.2.1.sancov', + 'cctest.test.3.1.sancov', + 'cctest.test.4.1.sancov', ], } @@ -32,42 +32,42 @@ FILE_MAP = { # (flag, path, executable name, intermediate result index, file list). EXPECTED_INPUTS_2 = [ (False, '/some/path', 'cctest', 0, [ - 'cctest.test.1.sancov', - 'cctest.test.2.sancov']), + 'cctest.test.1.1.sancov', + 'cctest.test.2.1.sancov']), (False, '/some/path', 'cctest', 1, [ - 'cctest.test.3.sancov', - 'cctest.test.4.sancov']), + 'cctest.test.3.1.sancov', + 'cctest.test.4.1.sancov']), (False, '/some/path', 'd8', 0, [ - 'd8.test.1.sancov', - 'd8.test.2.sancov', - 'd8.test.3.sancov', - 'd8.test.4.sancov']), + 'd8.test.1.1.sancov', + 'd8.test.2.1.sancov', + 'd8.test.3.1.sancov', + 'd8.test.4.1.sancov']), (False, '/some/path', 'd8', 1, [ - 'd8.test.5.sancov', - 'd8.test.6.sancov', - 'd8.test.7.sancov']), + 'd8.test.5.1.sancov', + 'd8.test.5.2.sancov', + 'd8.test.6.1.sancov']), ] # The same for 4 cpus. EXPECTED_INPUTS_4 = [ (True, '/some/path', 'cctest', 0, [ - 'cctest.test.1.sancov', - 'cctest.test.2.sancov']), + 'cctest.test.1.1.sancov', + 'cctest.test.2.1.sancov']), (True, '/some/path', 'cctest', 1, [ - 'cctest.test.3.sancov', - 'cctest.test.4.sancov']), + 'cctest.test.3.1.sancov', + 'cctest.test.4.1.sancov']), (True, '/some/path', 'd8', 0, [ - 'd8.test.1.sancov', - 'd8.test.2.sancov']), + 'd8.test.1.1.sancov', + 'd8.test.2.1.sancov']), (True, '/some/path', 'd8', 1, [ - 'd8.test.3.sancov', - 'd8.test.4.sancov']), + 'd8.test.3.1.sancov', + 'd8.test.4.1.sancov']), (True, '/some/path', 'd8', 2, [ - 'd8.test.5.sancov', - 'd8.test.6.sancov']), + 'd8.test.5.1.sancov', + 'd8.test.5.2.sancov']), (True, '/some/path', 'd8', 3, [ - 'd8.test.7.sancov'])] + 'd8.test.6.1.sancov'])] class MergerTests(unittest.TestCase): diff --git a/deps/v8/tools/testrunner/local/execution.py b/deps/v8/tools/testrunner/local/execution.py index f3d11a8b5c..4cb9e45a03 100644 --- a/deps/v8/tools/testrunner/local/execution.py +++ b/deps/v8/tools/testrunner/local/execution.py @@ -149,8 +149,9 @@ class TestJob(Job): Rename files with PIDs to files with unique test IDs, because the number of tests might be higher than pid_max. E.g.: - d8.1234.sancov -> d8.test.1.sancov, where 1234 was the process' PID - and 1 is the test ID. + d8.1234.sancov -> d8.test.42.1.sancov, where 1234 was the process' PID, + 42 is the test ID and 1 is the attempt (the same test might be rerun on + failures). """ if context.sancov_dir and output.pid is not None: sancov_file = os.path.join( @@ -160,7 +161,10 @@ class TestJob(Job): if os.path.exists(sancov_file): parts = sancov_file.split(".") new_sancov_file = ".".join( - parts[:-2] + ["test", str(self.test.id)] + parts[-1:]) + parts[:-2] + + ["test", str(self.test.id), str(self.test.run)] + + parts[-1:] + ) assert not os.path.exists(new_sancov_file) os.rename(sancov_file, new_sancov_file) diff --git a/deps/v8/tools/testrunner/testrunner.isolate b/deps/v8/tools/testrunner/testrunner.isolate index 1e8e9dccb9..533ef68c8f 100644 --- a/deps/v8/tools/testrunner/testrunner.isolate +++ b/deps/v8/tools/testrunner/testrunner.isolate @@ -20,5 +20,12 @@ ], }, }], + ['is_gn==1', { + 'variables': { + 'files': [ + '<(PRODUCT_DIR)/v8_build_config.json', + ], + }, + }], ], } diff --git a/deps/v8/tools/turbolizer/schedule-view.js b/deps/v8/tools/turbolizer/schedule-view.js index 2cd49c991f..ef4789211d 100644 --- a/deps/v8/tools/turbolizer/schedule-view.js +++ b/deps/v8/tools/turbolizer/schedule-view.js @@ -77,7 +77,7 @@ class ScheduleView extends TextView { // Parse opcode including [] [ [/^[A-Za-z0-9_]+(\[.*\])?$/, NODE_STYLE, -1], - [/^[A-Za-z0-9_]+(\[.*\])?/, NODE_STYLE, 3] + [/^[A-Za-z0-9_]+(\[(\[.*?\]|.)*?\])?/, NODE_STYLE, 3] ], // Parse optional parameters [ diff --git a/deps/v8/tools/update-wasm-fuzzers.sh b/deps/v8/tools/update-wasm-fuzzers.sh index 3652829c8d..a58681f682 100755 --- a/deps/v8/tools/update-wasm-fuzzers.sh +++ b/deps/v8/tools/update-wasm-fuzzers.sh @@ -12,30 +12,30 @@ cd ${TOOLS_DIR}/.. rm -rf test/fuzzer/wasm rm -rf test/fuzzer/wasm_asmjs -make x64.debug -j +make x64.release -j mkdir -p test/fuzzer/wasm mkdir -p test/fuzzer/wasm_asmjs # asm.js ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ - --mode=debug --no-presubmit --extra-flags="--dump-wasm-module \ + --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/wasm/asm* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ - --mode=debug --no-presubmit --extra-flags="--dump-wasm-module \ + --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/asm/* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ - --mode=debug --no-presubmit --extra-flags="--dump-wasm-module \ + --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/regress/asm/* # WASM ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ - --mode=debug --no-presubmit --extra-flags="--dump-wasm-module \ + --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ --dump-wasm-module-path=./test/fuzzer/wasm/" unittests ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ - --mode=debug --no-presubmit --extra-flags="--dump-wasm-module \ + --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ --dump-wasm-module-path=./test/fuzzer/wasm/" mjsunit/wasm/* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ - --mode=debug --no-presubmit --extra-flags="--dump-wasm-module \ + --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ --dump-wasm-module-path=./test/fuzzer/wasm/" \ $(cd test/; ls cctest/wasm/test-*.cc | \ sed -es/wasm\\///g | sed -es/[.]cc/\\/\\*/g) diff --git a/deps/v8/tools/whitespace.txt b/deps/v8/tools/whitespace.txt index 2229d87d53..0f4384f4e3 100644 --- a/deps/v8/tools/whitespace.txt +++ b/deps/v8/tools/whitespace.txt @@ -6,4 +6,4 @@ A Smi balks into a war and says: "I'm so deoptimized today!" The doubles heard this and started to unbox. The Smi looked at them when a crazy v8-autoroll account showed up...... -The autoroller bought a round of Himbeerbrause. Suddenly ... +The autoroller bought a round of Himbeerbrause. Suddenly ....... |