diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-17 13:57:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-07-19 13:44:40 +0000 |
commit | 6ec7b8da05d21a3878bd21c691b41e675d74bb1c (patch) | |
tree | b87f250bc19413750b9bb9cdbf2da20ef5014820 /chromium/v8/tools | |
parent | ec02ee4181c49b61fce1c8fb99292dbb8139cc90 (diff) | |
download | qtwebengine-chromium-6ec7b8da05d21a3878bd21c691b41e675d74bb1c.tar.gz |
BASELINE: Update Chromium to 60.0.3112.70
Change-Id: I9911c2280a014d4632f254857876a395d4baed2d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/v8/tools')
44 files changed, 967 insertions, 597 deletions
diff --git a/chromium/v8/tools/dev/gm.py b/chromium/v8/tools/dev/gm.py index 482f6e036a1..96b9c3816b9 100755 --- a/chromium/v8/tools/dev/gm.py +++ b/chromium/v8/tools/dev/gm.py @@ -37,7 +37,7 @@ MODES = ["release", "debug", "optdebug"] # Modes that get built/run when you don't specify any. DEFAULT_MODES = ["release", "debug"] # Build targets that can be manually specified. -TARGETS = ["d8", "cctest", "unittests", "v8_fuzzers"] +TARGETS = ["d8", "cctest", "unittests", "v8_fuzzers", "mkgrokdump"] # Build targets that get built when you don't specify any (and specified tests # don't imply any other targets). DEFAULT_TARGETS = ["d8"] @@ -106,7 +106,6 @@ v8_enable_verify_heap = true """.replace("{GOMA}", USE_GOMA) DEBUG_ARGS_TEMPLATE = """\ -gdb_index = true is_component_build = true is_debug = true symbol_level = 2 @@ -118,7 +117,6 @@ v8_optimized_debug = false """.replace("{GOMA}", USE_GOMA) OPTDEBUG_ARGS_TEMPLATE = """\ -gdb_index = false is_component_build = true is_debug = true symbol_level = 1 @@ -144,11 +142,23 @@ def _Call(cmd, silent=False): if not silent: print("# %s" % cmd) return subprocess.call(cmd, shell=True) +def _Which(cmd): + for path in os.environ["PATH"].split(os.pathsep): + if os.path.exists(os.path.join(path, cmd)): + return os.path.join(path, cmd) + return None + def _Write(filename, content): print("# echo > %s << EOF\n%sEOF" % (filename, content)) with open(filename, "w") as f: f.write(content) +def _Notify(summary, body): + if _Which('notify-send') is not None: + _Call("notify-send '{}' '{}'".format(summary, body), silent=True) + else: + print("{} - {}".format(summary, body)) + def GetPath(arch, mode): subdir = "%s.%s" % (arch, mode) return os.path.join(OUTDIR, subdir) @@ -166,7 +176,7 @@ class Config(object): def GetTargetCpu(self): cpu = "x86" - if self.arch.endswith("64") or self.arch == "s390x": + if "64" in self.arch or self.arch == "s390x": cpu = "x64" return "target_cpu = \"%s\"" % cpu @@ -242,7 +252,11 @@ class ArgumentParser(object): targets = [] actions = [] tests = [] - words = argstring.split('.') + # Specifying a single unit test looks like "unittests/Foo.Bar". + if argstring.startswith("unittests/"): + words = [argstring] + else: + words = argstring.split('.') if len(words) == 1: word = words[0] if word in ACTIONS: @@ -304,11 +318,9 @@ def Main(argv): for c in configs: return_code += configs[c].RunTests() if return_code == 0: - _Call("notify-send 'Done!' 'V8 compilation finished successfully.'", - silent=True) + _Notify('Done!', 'V8 compilation finished successfully.') else: - _Call("notify-send 'Error!' 'V8 compilation finished with errors.'", - silent=True) + _Notify('Error!', 'V8 compilation finished with errors.') return return_code if __name__ == "__main__": diff --git a/chromium/v8/tools/disasm.py b/chromium/v8/tools/disasm.py index f409cb003e8..a91d0dbff4d 100644 --- a/chromium/v8/tools/disasm.py +++ b/chromium/v8/tools/disasm.py @@ -38,8 +38,10 @@ OBJDUMP_BIN = "/usr/bin/objdump" if not os.path.exists(OBJDUMP_BIN): OBJDUMP_BIN = "objdump" - -_COMMON_DISASM_OPTIONS = ["-M", "intel-mnemonic", "-C"] +# -M intel-mnemonic selects Intel syntax. +# -C demangles. +# -z disables skipping over sections of zeroes. +_COMMON_DISASM_OPTIONS = ["-M", "intel-mnemonic", "-C", "-z"] _DISASM_HEADER_RE = re.compile(r"[a-f0-9]+\s+<.*:$") _DISASM_LINE_RE = re.compile(r"\s*([a-f0-9]+):\s*(\S.*)") diff --git a/chromium/v8/tools/eval_gc_time.sh b/chromium/v8/tools/eval_gc_time.sh index 140165da438..70786041d7e 100755 --- a/chromium/v8/tools/eval_gc_time.sh +++ b/chromium/v8/tools/eval_gc_time.sh @@ -86,7 +86,6 @@ INTERESTING_NEW_GEN_KEYS="\ old_new \ code \ semispace \ - object_groups \ " INTERESTING_OLD_GEN_KEYS="\ diff --git a/chromium/v8/tools/foozzie/v8_foozzie.py b/chromium/v8/tools/foozzie/v8_foozzie.py index 96ed2a85013..6f585fdf8aa 100755 --- a/chromium/v8/tools/foozzie/v8_foozzie.py +++ b/chromium/v8/tools/foozzie/v8_foozzie.py @@ -22,20 +22,29 @@ import v8_suppressions CONFIGS = dict( default=[], fullcode=[ - '--nocrankshaft', + '--noopt', '--turbo-filter=~', ], ignition=[ '--ignition', '--turbo-filter=~', '--hydrogen-filter=~', - '--nocrankshaft', + '--noopt', + ], + ignition_asm=[ + '--ignition', + '--turbo-filter=~', + '--hydrogen-filter=~', + '--noopt', + '--validate-asm', + '--stress-validate-asm', + '--suppress-asm-messages', ], ignition_eager=[ '--ignition', '--turbo-filter=~', '--hydrogen-filter=~', - '--nocrankshaft', + '--noopt', '--no-lazy', '--no-lazy-inner-functions', ], diff --git a/chromium/v8/tools/foozzie/v8_foozzie_test.py b/chromium/v8/tools/foozzie/v8_foozzie_test.py index c46aba679ef..ffe18a88d5d 100644 --- a/chromium/v8/tools/foozzie/v8_foozzie_test.py +++ b/chromium/v8/tools/foozzie/v8_foozzie_test.py @@ -18,7 +18,7 @@ class UnitTest(unittest.TestCase): def testDiff(self): # TODO(machenbach): Mock out suppression configuration. suppress = v8_suppressions.get_suppression( - 'x64', 'fullcode', 'x64', 'default') + 'x64', 'ignition', 'x64', 'ignition_turbo') one = '' two = '' diff = None, None @@ -29,15 +29,12 @@ class UnitTest(unittest.TestCase): diff = None, None self.assertEquals(diff, suppress.diff(one, two)) - # Ignore line before caret, caret position, stack trace char numbers - # error message and validator output. + # Ignore line before caret, caret position and error message. one = """ undefined weird stuff ^ -Validation of asm.js module failed: foo bar somefile.js: TypeError: undefined is not a function -stack line :15: foo undefined """ two = """ @@ -45,8 +42,6 @@ undefined other weird stuff ^ somefile.js: TypeError: baz is not a function -stack line :2: foo -Validation of asm.js module failed: baz undefined """ diff = None, None diff --git a/chromium/v8/tools/foozzie/v8_suppressions.py b/chromium/v8/tools/foozzie/v8_suppressions.py index b39973b5de3..a84cee62961 100644 --- a/chromium/v8/tools/foozzie/v8_suppressions.py +++ b/chromium/v8/tools/foozzie/v8_suppressions.py @@ -46,23 +46,9 @@ IGNORE_SOURCES = { '/v8/test/mjsunit/regress/regress-2989.js', ], - 'crbug.com/681088': [ - '/v8/test/mjsunit/asm/asm-validation.js', - '/v8/test/mjsunit/asm/b5528-comma.js', - '/v8/test/mjsunit/asm/pointer-masking.js', - '/v8/test/mjsunit/compiler/regress-443744.js', - '/v8/test/mjsunit/regress/regress-599719.js', - '/v8/test/mjsunit/regress/wasm/regression-647649.js', - '/v8/test/mjsunit/wasm/asm-wasm.js', - '/v8/test/mjsunit/wasm/asm-wasm-deopt.js', - '/v8/test/mjsunit/wasm/asm-wasm-heap.js', - '/v8/test/mjsunit/wasm/asm-wasm-literals.js', - '/v8/test/mjsunit/wasm/asm-wasm-stack.js', - ], - - 'crbug.com/681241': [ - '/v8/test/mjsunit/regress/regress-617526.js', - '/v8/test/mjsunit/regress/wasm/regression-02862.js', + 'crbug.com/718739': [ + '/v8/test/mjsunit/regress/regress-105.js', + '/v8/test/mjsunit/regress/regress-crbug-599714.js', ], 'crbug.com/688159': [ @@ -81,16 +67,9 @@ IGNORE_SOURCES = { } # Ignore by test case pattern. Map from bug->regexp. -# Regular expressions are assumed to be compiled. We use regexp.match. -# Make sure the code doesn't match in the preamble portion of the test case -# (i.e. in the modified inlined mjsunit.js). You can reference the comment -# between the two parts like so: -# 'crbug.com/666308': -# re.compile(r'.*End stripped down and modified version.*' -# r'\.prototype.*instanceof.*.*', re.S) -# TODO(machenbach): Insert a JS sentinel between the two parts, because -# comments are stripped during minimization. +# Regular expressions are assumed to be compiled. We use regexp.search. IGNORE_TEST_CASES = { + 'crbug.com/718739': re.compile(r'\.caller'), } # Ignore by output pattern. Map from config->bug->regexp. Config '' is used @@ -107,17 +86,9 @@ IGNORE_OUTPUT = { re.compile(r'RangeError(?!: byte length)', re.S), 'crbug.com/667678': re.compile(r'\[native code\]', re.S), - 'crbug.com/681806': - re.compile(r'WebAssembly\.Instance', re.S), - 'crbug.com/681088': - re.compile(r'TypeError: Cannot read property \w+ of undefined', re.S), 'crbug.com/689877': re.compile(r'^.*SyntaxError: .*Stack overflow$', re.M), }, - 'validate_asm': { - 'validate_asm': - re.compile(r'TypeError'), - }, } # Lines matching any of the following regular expressions will be ignored @@ -143,10 +114,6 @@ ALLOWED_LINE_DIFFS = [ r'^.* is not a function(.*)$', r'^(.*) is not a .*$', - # crbug.com/662840 - r"^.*(?:Trying to access ')?(\w*)(?:(?:' through proxy)|" - r"(?: is not defined))$", - # crbug.com/680064. This subsumes one of the above expressions. r'^(.*)TypeError: .* function$', @@ -308,8 +275,17 @@ class V8Suppression(Suppression): ) def ignore_by_content(self, testcase): + # Strip off test case preamble. + try: + lines = testcase.splitlines() + lines = lines[lines.index('print("js-mutation: start generated test case");'):] + content = '\n'.join(lines) + except ValueError: + # Search the whole test case if preamble can't be found. E.g. older + # already minimized test cases might have dropped the delimiter line. + content = testcase for bug, exp in IGNORE_TEST_CASES.iteritems(): - if exp.match(testcase): + if exp.search(content): return bug return False diff --git a/chromium/v8/tools/gcmole/gcmole.lua b/chromium/v8/tools/gcmole/gcmole.lua index 42cb2e370bd..9172fe208cc 100644 --- a/chromium/v8/tools/gcmole/gcmole.lua +++ b/chromium/v8/tools/gcmole/gcmole.lua @@ -109,7 +109,7 @@ local function MakeClangCommandLine( .. " -Xclang -triple -Xclang " .. triple .. " -D" .. arch_define .. " -DENABLE_DEBUGGER_SUPPORT" - .. " -DV8_I18N_SUPPORT" + .. " -DV8_INTL_SUPPORT" .. " -I./" .. " -Iinclude/" .. " -Ithird_party/icu/source/common" diff --git a/chromium/v8/tools/gdbinit b/chromium/v8/tools/gdbinit index c78baa238ea..2d7d254ca4a 100644 --- a/chromium/v8/tools/gdbinit +++ b/chromium/v8/tools/gdbinit @@ -123,5 +123,30 @@ Print stack trace with assertion scopes Usage: bta end +# Search for a pointer inside all valid pages. +define space_find + set $space = $arg0 + set $current_page = $space->anchor()->next_page() + while ($current_page != $space->anchor()) + printf "# Searching in %p - %p\n", $current_page->area_start(), $current_page->area_end()-1 + find $current_page->area_start(), $current_page->area_end()-1, $arg1 + set $current_page = $current_page->next_page() + end +end + +define heap_find + set $heap = v8::internal::Isolate::Current()->heap() + printf "# Searching for %p in old_space ===============================\n", $arg0 + space_find $heap->old_space() ($arg0) + printf "# Searching for %p in map_space ===============================\n", $arg0 + space_find $heap->map_space() $arg0 + printf "# Searching for %p in code_space ===============================\n", $arg0 + space_find $heap->code_space() $arg0 +end +document heap_find +Find the location of a given address in V8 pages. +Usage: heap_find address +end + set disassembly-flavor intel set disable-randomization off diff --git a/chromium/v8/tools/gen-postmortem-metadata.py b/chromium/v8/tools/gen-postmortem-metadata.py index 2e903d71b15..e793a918652 100644 --- a/chromium/v8/tools/gen-postmortem-metadata.py +++ b/chromium/v8/tools/gen-postmortem-metadata.py @@ -99,6 +99,22 @@ consts_misc = [ 'value': 'kAccessor' }, { 'name': 'prop_kind_mask', 'value': 'PropertyDetails::KindField::kMask' }, + { 'name': 'prop_location_Descriptor', + 'value': 'kDescriptor' }, + { 'name': 'prop_location_Field', + 'value': 'kField' }, + { 'name': 'prop_location_mask', + 'value': 'PropertyDetails::LocationField::kMask' }, + { 'name': 'prop_location_shift', + 'value': 'PropertyDetails::LocationField::kShift' }, + { 'name': 'prop_attributes_NONE', 'value': 'NONE' }, + { 'name': 'prop_attributes_READ_ONLY', 'value': 'READ_ONLY' }, + { 'name': 'prop_attributes_DONT_ENUM', 'value': 'DONT_ENUM' }, + { 'name': 'prop_attributes_DONT_DELETE', 'value': 'DONT_DELETE' }, + { 'name': 'prop_attributes_mask', + 'value': 'PropertyDetails::AttributesField::kMask' }, + { 'name': 'prop_attributes_shift', + 'value': 'PropertyDetails::AttributesField::kShift' }, { 'name': 'prop_index_mask', 'value': 'PropertyDetails::FieldIndexField::kMask' }, { 'name': 'prop_index_shift', @@ -319,15 +335,9 @@ def get_base_class(klass): return get_base_class(k['parent']); # -# Loads class hierarchy and type information from "objects.h". +# Loads class hierarchy and type information from "objects.h" etc. # def load_objects(): - objfilename = sys.argv[2]; - objfile = open(objfilename, 'r'); - in_insttype = False; - - typestr = ''; - # # Construct a dictionary for the classes we're sure should be present. # @@ -335,11 +345,29 @@ def load_objects(): for klass in expected_classes: checktypes[klass] = True; + + for filename in sys.argv[2:]: + if not filename.endswith("-inl.h"): + load_objects_from_file(filename, checktypes) + + if (len(checktypes) > 0): + for klass in checktypes: + print('error: expected class \"%s\" not found' % klass); + + sys.exit(1); + + +def load_objects_from_file(objfilename, checktypes): + objfile = open(objfilename, 'r'); + in_insttype = False; + + typestr = ''; + # - # Iterate objects.h line-by-line to collect type and class information. - # For types, we accumulate a string representing the entire InstanceType - # enum definition and parse it later because it's easier to do so - # without the embedded newlines. + # Iterate the header file line-by-line to collect type and class + # information. For types, we accumulate a string representing the entire + # InstanceType enum definition and parse it later because it's easier to + # do so without the embedded newlines. # for line in objfile: if (line.startswith('enum InstanceType {')): @@ -466,13 +494,6 @@ def load_objects(): if (cctype in checktypes): del checktypes[cctype]; - if (len(checktypes) > 0): - for klass in checktypes: - print('error: expected class \"%s\" not found' % klass); - - sys.exit(1); - - # # For a given macro call, pick apart the arguments and return an object # describing the corresponding output constant. See load_fields(). @@ -493,7 +514,7 @@ def parse_field(call): if (kind == 'ACCESSORS' or kind == 'ACCESSORS_GCSAFE'): klass = args[0]; field = args[1]; - dtype = args[2]; + dtype = args[2].replace('<', '_').replace('>', '_') offset = args[3]; return ({ @@ -512,11 +533,19 @@ def parse_field(call): }); # -# Load field offset information from objects-inl.h. +# Load field offset information from objects-inl.h etc. # def load_fields(): - inlfilename = sys.argv[3]; - inlfile = open(inlfilename, 'r'); + for filename in sys.argv[2:]: + if filename.endswith("-inl.h"): + load_fields_from_file(filename) + + for body in extras_accessors: + fields.append(parse_field('ACCESSORS(%s)' % body)); + + +def load_fields_from_file(filename): + inlfile = open(filename, 'r'); # # Each class's fields and the corresponding offsets are described in the @@ -568,9 +597,6 @@ def load_fields(): fields.append(parse_field(current)); current = ''; - for body in extras_accessors: - fields.append(parse_field('ACCESSORS(%s)' % body)); - # # Emit a block of constants. # diff --git a/chromium/v8/tools/get_byteorder.py b/chromium/v8/tools/get_byteorder.py deleted file mode 100755 index 598948b42ab..00000000000 --- a/chromium/v8/tools/get_byteorder.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2017 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. - -"""Get Byteorder of host architecture""" - - -import sys - -def main(): - print sys.byteorder - return 0 - -if __name__ == '__main__': - sys.exit(main()) diff --git a/chromium/v8/tools/grokdump.py b/chromium/v8/tools/grokdump.py index 4a3cc7c6f50..dd944f8ab4a 100755 --- a/chromium/v8/tools/grokdump.py +++ b/chromium/v8/tools/grokdump.py @@ -1952,9 +1952,12 @@ class InspectionPadawan(object): return None def FrameMarkerName(self, value): - if 0 < value <= len(FRAME_MARKERS): - return "Possibly %s frame marker" % FRAME_MARKERS[value-1] - return "" + # The frame marker is Smi-tagged but not Smi encoded and 0 is not a valid + # frame type. + value = (value >> 1) - 1 + if 0 <= value < len(FRAME_MARKERS): + return "Possibly %s frame marker" % FRAME_MARKERS[value] + return None def IsFrameMarker(self, slot, address): if not slot: return False @@ -1964,18 +1967,17 @@ class InspectionPadawan(object): next_address = self.reader.ReadUIntPtr(slot + self.reader.PointerSize()) return self.reader.IsExceptionStackAddress(next_address) - def FormatSmi(self, address, slot=None): + def FormatSmi(self, address): value = self.heap.SmiUntag(address) - marker = "" - if self.IsFrameMarker(slot, address): - marker = self.FrameMarkerName(value) # On 32-bit systems almost everything looks like a Smi. - if not self.reader.Is64() or value == 0: return marker - return "Smi(%d) %s" % (value, marker) + if not self.reader.Is64() or value == 0: return None + return "Smi(%d)" % value def SenseObject(self, address, slot=None): + if self.IsFrameMarker(slot, address): + return self.FrameMarkerName(address) if self.heap.IsSmi(address): - return self.FormatSmi(address, slot) + return self.FormatSmi(address) if not self.heap.IsTaggedAddress(address): return None tagged_address = address if self.IsInKnownOldSpace(tagged_address): diff --git a/chromium/v8/tools/ic-processor.js b/chromium/v8/tools/ic-processor.js index 41bd336c9aa..6623b69ed55 100644 --- a/chromium/v8/tools/ic-processor.js +++ b/chromium/v8/tools/ic-processor.js @@ -168,7 +168,7 @@ IcProcessor.prototype.formatName = function(entry) { var re = /(.*):[0-9]+:[0-9]+$/; var array = re.exec(name); if (!array) return name; - return array[1]; + return entry.getState() + array[1]; } IcProcessor.prototype.processPropertyIC = function ( diff --git a/chromium/v8/tools/ignition/linux_perf_report.py b/chromium/v8/tools/ignition/linux_perf_report.py index 4e0b8844eae..d2327ca6b89 100755 --- a/chromium/v8/tools/ignition/linux_perf_report.py +++ b/chromium/v8/tools/ignition/linux_perf_report.py @@ -25,7 +25,7 @@ examples: # samples and other non-Ignition samples. # $ tools/run-perf.sh out/x64.release/d8 \\ - --ignition --noturbo --nocrankshaft run.js + --ignition --noturbo --noopt run.js $ tools/ignition/linux_perf_report.py --flamegraph -o out.collapsed $ flamegraph.pl --colors js out.collapsed > out.svg @@ -45,7 +45,7 @@ examples: # See the hottest bytecodes on Octane benchmark, by number of samples. # $ tools/run-perf.sh out/x64.release/d8 \\ - --ignition --noturbo --nocrankshaft octane/run.js + --ignition --noturbo --noopt octane/run.js $ tools/ignition/linux_perf_report.py """ diff --git a/chromium/v8/tools/link_clicker.extension/README.txt b/chromium/v8/tools/link_clicker.extension/README.txt new file mode 100644 index 00000000000..35e88b15ef1 --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/README.txt @@ -0,0 +1,12 @@ +This extension can be used to repro infrequent crashers on an unclear url-set +for a given domain. It follows a random link that matches a predefined pattern, +imitating something like real user interaction on a page. + +Usage: +1. Open chrome://extensions +2. Enable developer mode +3. Click "Load unpacked extension" +4. Click the orange link-clicker extension button in the toolbar +5. Set the parameters and click "Enable" to start following links on all tabs + open in the current window. Beware, this extension will follow arbitrary + links. You probably don't want to be logged in with any important account. diff --git a/chromium/v8/tools/link_clicker.extension/background.js b/chromium/v8/tools/link_clicker.extension/background.js new file mode 100644 index 00000000000..43470cb3129 --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/background.js @@ -0,0 +1,74 @@ +// Copyright 2017 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. + +(function linkClickerBackgroundScript() { + + // time in ms. + let minInterval = 1*1000; + let maxInterval = 20*1000; + let pattern = /.*/; + let enabled = false; + + let animateIconIntervalId; + + // =========================================================================== + + chrome.runtime.onMessage.addListener(function(msg, sender, response) { + let result; + if (msg.type == 'update') result = updateFromMessage(msg); + if (msg.type == 'get') result = getValues(); + response(result); + }); + + // =========================================================================== + function updateFromMessage(msg) { + console.log(msg); + minInterval = Number(msg.minInterval) + maxInterval = Number(msg.maxInterval); + if (maxInterval < minInterval) { + let tmpMin = Math.min(minInterval, maxInterval); + maxInterval = Math.max(minInterval, maxInterval); + minInterval = tmpMin; + } + pattern = new RegExp(msg.pattern); + enabled = Boolean(msg.enabled); + updateTabs(); + scheduleIconAnimation(); + return getValues(); + } + + function getValues() { + return { + type: 'update', + minInterval: minInterval, + maxInterval: maxInterval, + pattern: pattern.source, + enabled: enabled + } + } + + function updateTabs() { + chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { + let message = getValues(); + for (let i = 0; i < tabs.length; ++i) { + chrome.tabs.sendMessage(tabs[i].id, message); + } + }); + } + + let animationIndex = 0; + function animateIcon() { + animationIndex = (animationIndex + 1) % 4; + chrome.browserAction.setBadgeText( { text: ".".repeat(animationIndex) } ); + } + + function scheduleIconAnimation() { + chrome.browserAction.setBadgeText( { text: "" } ); + clearInterval(animateIconIntervalId); + if (enabled) { + animateIconIntervalId = setInterval(animateIcon, 500); + } + } + +})(); diff --git a/chromium/v8/tools/link_clicker.extension/content.js b/chromium/v8/tools/link_clicker.extension/content.js new file mode 100644 index 00000000000..4ab825e01e7 --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/content.js @@ -0,0 +1,66 @@ +// Copyright 2017 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. + +(function linkClickerContentScript() { + // time in ms + let minInterval; + let maxInterval; + let pattern; + let enabled; + let timeoutId; + + // Initialize variables. + chrome.runtime.sendMessage({type:'get'}, function(msg) { + if (msg.type == 'update') updateFromMessage(msg); + }); + + chrome.runtime.onMessage.addListener( + function(msg, sender, sendResponse) { + if (msg.type == 'update') updateFromMessage(msg); + }); + + function findAllLinks() { + let links = document.links; + let results = new Set(); + for (let i = 0; i < links.length; i++) { + let href = links[i].href; + if (!href) continue; + if (href && href.match(pattern)) results.add(href); + } + return Array.from(results); + } + + function updateFromMessage(msg) { + console.log(msg); + minInterval = Number(msg.minInterval) + maxInterval = Number(msg.maxInterval); + pattern = new RegExp(msg.pattern); + enabled = Boolean(msg.enabled); + if (enabled) schedule(); + } + + function followLink() { + if (!enabled) return; + let links = findAllLinks(); + if (links.length <= 5) { + // navigate back if the page has not enough links + window.history.back() + console.log("navigate back"); + } else { + let link = links[Math.round(Math.random() * (links.length-1))]; + console.log(link); + window.location.href = link; + // Schedule in case we just followed an anchor. + schedule(); + } + } + + function schedule() { + clearTimeout(timeoutId); + let delta = maxInterval - minInterval; + let duration = minInterval + (Math.random() * delta); + console.log(duration); + timeoutId = setTimeout(followLink, duration); + } +})(); diff --git a/chromium/v8/tools/link_clicker.extension/icon.png b/chromium/v8/tools/link_clicker.extension/icon.png Binary files differnew file mode 100644 index 00000000000..1ce0ca3ac94 --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/icon.png diff --git a/chromium/v8/tools/link_clicker.extension/manifest.json b/chromium/v8/tools/link_clicker.extension/manifest.json new file mode 100644 index 00000000000..8ca8579b6bb --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/manifest.json @@ -0,0 +1,21 @@ +{ + "name": "A browser action with a popup that automatically clicks links matching a regexp", + "description": "Follow links", + "version": "1.0", + "permissions": [ + "tabs", "http://*/*", "https://*/*" + ], + "background": { "scripts": ["background.js"] }, + "browser_action": { + "default_title": "Follow links.", + "default_icon": "icon.png", + "default_popup": "popup.html" + }, + "content_scripts": [ + { + "matches": ["http://*/*", "https://*/*"], + "js": ["content.js"] + } + ], + "manifest_version": 2 +} diff --git a/chromium/v8/tools/link_clicker.extension/popup.html b/chromium/v8/tools/link_clicker.extension/popup.html new file mode 100644 index 00000000000..cce9566acc3 --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/popup.html @@ -0,0 +1,50 @@ +<!doctype html> +<!-- +Copyright 2017 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. +--> +<html> + <head> + <style> + body { + overflow: hidden; + padding: 5px; + width: 310px; + } + input, textarea, select, button { + width : 300px; + margin: 0; + box-sizing: border-box; + } + label { + clear: both; + } + </style> + <script src="popup.js"></script> + </head> + <body> + <form> + <p> + <label>Min click-interval <span id="minIntervalValue"></span>: + <input type="range" id="minInterval" min="1000" max="60000"> + </label> + </p> + <p> + <label> Max click-interval <span id="maxIntervalValue"></span>: + <input type="range" id="maxInterval" min="1000" max="60000"> + </label> + </p> + <p> + <label>Link regexp: + <input type="input" id="pattern" > + </label> + </p> + <p> + <label>Enable: + <input type="checkbox" id="enabled" > + </label> + </p> + </form> + </body> +</html> diff --git a/chromium/v8/tools/link_clicker.extension/popup.js b/chromium/v8/tools/link_clicker.extension/popup.js new file mode 100644 index 00000000000..865a9480eb2 --- /dev/null +++ b/chromium/v8/tools/link_clicker.extension/popup.js @@ -0,0 +1,53 @@ +// Copyright 2017 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. + +function $(id) { + return document.querySelector(id); +} + +// =========================================================================== +document.addEventListener('DOMContentLoaded', function () { + installFormChangeHandler() +}); + + +function installFormChangeHandler() { + initForm(); + let inputs = document.getElementsByTagName("input"); + for (let i = 0; i < inputs.length; i++){ + inputs[i].onchange = onFormChange; + } +} + +function initForm() { + chrome.runtime.sendMessage({type:'get'}, function(response) { + updateFromMessage(response); + }); +} +// =========================================================================== + +function updateFromMessage(msg) { + $("#minInterval").value = msg.minInterval; + $("#maxInterval").value = msg.maxInterval; + $("#pattern").value = msg.pattern; + $("#enabled").checked = msg.enabled; + $("#minIntervalValue").innerText = msg.minInterval+"ms"; + $("#maxIntervalValue").innerText = msg.maxInterval+"ms"; +} + +function onFormChange() { + let minInterval = $("#minInterval").value; + let maxInterval = $("#maxInterval").value; + + let message = { + type: 'update', + minInterval: minInterval, + maxInterval: maxInterval, + pattern: $("#pattern").value, + enabled: $("#enabled").checked + } + chrome.runtime.sendMessage(message, function(response) { + updateFromMessage(response); + }); +} diff --git a/chromium/v8/tools/memory/lsan/suppressions.txt b/chromium/v8/tools/memory/lsan/suppressions.txt index 36e59ecd510..f5c73935beb 100644 --- a/chromium/v8/tools/memory/lsan/suppressions.txt +++ b/chromium/v8/tools/memory/lsan/suppressions.txt @@ -14,6 +14,3 @@ leak:v8::internal::compiler::JumpThreading::ApplyForwarding # mjsunit leak:v8::internal::FuncNameInferrer::FuncNameInferrer leak:v8::internal::JSArrayBuffer::SetupAllocatingData - -# unittests -leak:v8::internal::Isolate::FindOrAllocatePerThreadDataForThisThread diff --git a/chromium/v8/tools/perf_tests/chromium_revision b/chromium/v8/tools/perf_tests/chromium_revision deleted file mode 100644 index 0cdcc110f84..00000000000 --- a/chromium/v8/tools/perf_tests/chromium_revision +++ /dev/null @@ -1 +0,0 @@ -210122 diff --git a/chromium/v8/tools/plot-timer-events b/chromium/v8/tools/plot-timer-events index da2e823c14d..b65937cfe6d 100755 --- a/chromium/v8/tools/plot-timer-events +++ b/chromium/v8/tools/plot-timer-events @@ -51,7 +51,7 @@ if test "$contains" -eq 0; then calibration_log=calibration.log calibration_script="for (var i = 0; i < 1000000; i++) print();" - $d8_exec --nocrankshaft --prof --logfile $calibration_log \ + $d8_exec --noopt --prof --logfile $calibration_log \ --log-timer-events -e "$calibration_script" > /dev/null t_1_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ | tail -n1 | awk -F, '{print $3}'` @@ -59,7 +59,7 @@ if test "$contains" -eq 0; then | tail -n1 | awk -F, '{print $3}'` n_1=`grep "timer-event\|tick" $calibration_log | wc -l` - $d8_exec --nocrankshaft --prof --logfile $calibration_log \ + $d8_exec --noopt --prof --logfile $calibration_log \ --log-internal-timer-events -e "$calibration_script" > /dev/null t_2_start=`grep "timer-event-start,\"V8.Execute\"" $calibration_log \ | tail -n1 | awk -F, '{print $3}'` diff --git a/chromium/v8/tools/presubmit.py b/chromium/v8/tools/presubmit.py index c6561476f94..c95936037b2 100755 --- a/chromium/v8/tools/presubmit.py +++ b/chromium/v8/tools/presubmit.py @@ -70,7 +70,7 @@ LINT_RULES = """ LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing') FLAGS_LINE = re.compile("//\s*Flags:.*--([A-z0-9-])+_[A-z0-9].*\n") ASSERT_OPTIMIZED_PATTERN = re.compile("assertOptimized") -FLAGS_ENABLE_OPT = re.compile("//\s*Flags:.*--(crankshaft|turbo)[^-].*\n") +FLAGS_ENABLE_OPT = re.compile("//\s*Flags:.*--(opt|turbo)[^-].*\n") ASSERT_UNOPTIMIZED_PATTERN = re.compile("assertUnoptimized") FLAGS_NO_ALWAYS_OPT = re.compile("//\s*Flags:.*--no-?always-opt.*\n") @@ -193,7 +193,7 @@ class SourceFileProcessor(object): def IgnoreDir(self, name): return (name.startswith('.') or name in ('buildtools', 'data', 'gmock', 'gtest', 'kraken', - 'octane', 'sunspider')) + 'octane', 'sunspider', 'traces-arm64')) def IgnoreFile(self, name): return name.startswith('.') @@ -221,7 +221,7 @@ class CppLintProcessor(SourceFileProcessor): return (super(CppLintProcessor, self).IgnoreDir(name) or (name == 'third_party')) - IGNORE_LINT = ['flag-definitions.h'] + IGNORE_LINT = ['export-template.h', 'flag-definitions.h'] def IgnoreFile(self, name): return (super(CppLintProcessor, self).IgnoreFile(name) @@ -413,7 +413,7 @@ class SourceProcessor(SourceFileProcessor): if not "mjsunit/mjsunit.js" in name: if ASSERT_OPTIMIZED_PATTERN.search(contents) and \ not FLAGS_ENABLE_OPT.search(contents): - print "%s Flag --crankshaft or --turbo should be set " \ + print "%s Flag --opt or --turbo should be set " \ "if assertOptimized() is used" % name result = False if ASSERT_UNOPTIMIZED_PATTERN.search(contents) and \ diff --git a/chromium/v8/tools/profile.js b/chromium/v8/tools/profile.js index de9c42c5b11..21d9d22a5e3 100644 --- a/chromium/v8/tools/profile.js +++ b/chromium/v8/tools/profile.js @@ -509,11 +509,18 @@ Profile.DynamicFuncCodeEntry = function(size, type, func, state) { Profile.DynamicFuncCodeEntry.STATE_PREFIX = ["", "~", "*"]; /** + * Returns state. + */ +Profile.DynamicFuncCodeEntry.prototype.getState = function() { + return Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state]; +}; + +/** * Returns node name. */ Profile.DynamicFuncCodeEntry.prototype.getName = function() { var name = this.func.getName(); - return this.type + ': ' + Profile.DynamicFuncCodeEntry.STATE_PREFIX[this.state] + name; + return this.type + ': ' + this.getState() + name; }; diff --git a/chromium/v8/tools/release/backport_node.py b/chromium/v8/tools/release/backport_node.py new file mode 100755 index 00000000000..862da82b1e8 --- /dev/null +++ b/chromium/v8/tools/release/backport_node.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python +# Copyright 2017 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. + +""" +Use this script to cherry-pick a V8 commit to backport to a Node.js checkout. + +Requirements: + - Node.js checkout to backport to. + - V8 checkout that contains the commit to cherry-pick. + +Usage: + $ backport_node.py <path_to_v8> <path_to_node> <commit-hash> + + This will apply the commit to <path_to_node>/deps/v8 and create a commit in + the Node.js checkout, increment patch level, and copy over the original + commit message. + +Optional flags: + --no-review Run `gclient sync` on the V8 checkout before updating. +""" + +import argparse +import os +import subprocess +import re +import sys + +from common_includes import * + +TARGET_SUBDIR = os.path.join("deps", "v8") +VERSION_FILE = os.path.join("include", "v8-version.h") +VERSION_PATTERN = r'(?<=#define V8_PATCH_LEVEL )\d+' + +def Clean(options): + print ">> Cleaning target directory." + subprocess.check_call(["git", "clean", "-fd"], + cwd = os.path.join(options.node_path, TARGET_SUBDIR)) + +def CherryPick(options): + print ">> Apply patch." + patch = subprocess.Popen(["git", "diff-tree", "-p", options.commit], + stdout=subprocess.PIPE, cwd=options.v8_path) + patch.wait() + try: + subprocess.check_output(["git", "apply", "-3", "--directory=%s" % TARGET_SUBDIR], + stdin=patch.stdout, cwd=options.node_path) + except: + print ">> In another shell, please resolve patch conflicts" + print ">> and `git add` affected files." + print ">> Finally continue by entering RESOLVED." + while raw_input("[RESOLVED]") != "RESOLVED": + print ">> You need to type RESOLVED" + +def UpdateVersion(options): + print ">> Increment patch level." + version_file = os.path.join(options.node_path, TARGET_SUBDIR, VERSION_FILE) + text = FileToText(version_file) + def increment(match): + patch = int(match.group(0)) + return str(patch + 1) + text = re.sub(VERSION_PATTERN, increment, text, flags=re.MULTILINE) + TextToFile(text, version_file) + +def CreateCommit(options): + print ">> Creating commit." + # Find short hash from source. + shorthash = subprocess.check_output( + ["git", "rev-parse", "--short", options.commit], + cwd=options.v8_path).strip() + + # Commit message + title = "deps: backport %s from upstream V8" % shorthash + body = subprocess.check_output( + ["git", "log", options.commit, "-1", "--format=%B"], + cwd=options.v8_path).strip() + body = '\n'.join(" " + line for line in body.splitlines()) + + message = title + "\n\nOriginal commit message:\n\n" + body + + # Create commit at target. + review_message = "" if options.no_review else "-e" + git_commands = [ + ["git", "checkout", "-b", "backport_%s" % shorthash], # new branch + ["git", "add", TARGET_SUBDIR], # add files + ["git", "commit", "-m", message, review_message] # new commit + ] + for command in git_commands: + subprocess.check_call(command, cwd=options.node_path) + +def ParseOptions(args): + parser = argparse.ArgumentParser(description="Backport V8 commit to Node.js") + parser.add_argument("v8_path", help="Path to V8 checkout") + parser.add_argument("node_path", help="Path to Node.js checkout") + parser.add_argument("commit", help="Commit to backport") + parser.add_argument("--no-review", action="store_true", + help="Skip editing commit message") + options = parser.parse_args(args) + options.v8_path = os.path.abspath(options.v8_path) + assert os.path.isdir(options.v8_path) + options.node_path = os.path.abspath(options.node_path) + assert os.path.isdir(options.node_path) + return options + +def Main(args): + options = ParseOptions(args) + Clean(options) + try: + CherryPick(options) + UpdateVersion(options) + CreateCommit(options) + except: + print ">> Failed. Resetting." + subprocess.check_output(["git", "reset", "--hard"], cwd=options.node_path) + raise + +if __name__ == "__main__": + Main(sys.argv[1:]) diff --git a/chromium/v8/tools/release/git_recipes.py b/chromium/v8/tools/release/git_recipes.py index e688ecb9535..ce65b973ac3 100644 --- a/chromium/v8/tools/release/git_recipes.py +++ b/chromium/v8/tools/release/git_recipes.py @@ -32,7 +32,7 @@ SHA1_RE = re.compile('^[a-fA-F0-9]{40}$') ROLL_DEPS_GIT_SVN_ID_RE = re.compile('^git-svn-id: .*@([0-9]+) .*$') # Regular expression that matches a single commit footer line. -COMMIT_FOOTER_ENTRY_RE = re.compile(r'([^:]+):\s+(.+)') +COMMIT_FOOTER_ENTRY_RE = re.compile(r'([^:]+):\s*(.*)') # Footer metadata key for commit position. COMMIT_POSITION_FOOTER_KEY = 'Cr-Commit-Position' @@ -67,9 +67,9 @@ def GetCommitMessageFooterMap(message): for line in lines: m = COMMIT_FOOTER_ENTRY_RE.match(line) if not m: - # If any single line isn't valid, the entire footer is invalid. - footers.clear() - return footers + # If any single line isn't valid, continue anyway for compatibility with + # Gerrit (which itself uses JGit for this). + continue footers[m.group(1)] = m.group(2).strip() return footers diff --git a/chromium/v8/tools/release/test_backport_node.py b/chromium/v8/tools/release/test_backport_node.py new file mode 100755 index 00000000000..a2be9cf33d8 --- /dev/null +++ b/chromium/v8/tools/release/test_backport_node.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python +# Copyright 2017 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 os +import shutil +import subprocess +import sys +import tempfile +import unittest + +from common_includes import FileToText +import backport_node + +# Base paths. +BASE_DIR = os.path.dirname(os.path.abspath(__file__)) +TEST_DATA = os.path.join(BASE_DIR, 'testdata') + +def gitify(path): + files = os.listdir(path) + subprocess.check_call(['git', 'init'], cwd=path) + subprocess.check_call(['git', 'add'] + files, cwd=path) + subprocess.check_call(['git', 'commit', '-m', 'Initial'], cwd=path) + +class TestUpdateNode(unittest.TestCase): + def setUp(self): + self.workdir = tempfile.mkdtemp(prefix='tmp_test_node_') + + def tearDown(self): + shutil.rmtree(self.workdir) + + def testUpdate(self): + v8_cwd = os.path.join(self.workdir, 'v8') + node_cwd = os.path.join(self.workdir, 'node') + + # Set up V8 test fixture. + shutil.copytree(src=os.path.join(TEST_DATA, 'v8'), dst=v8_cwd) + gitify(v8_cwd) + + # Set up node test fixture. + shutil.copytree(src=os.path.join(TEST_DATA, 'node'), dst=node_cwd) + gitify(os.path.join(node_cwd)) + + # Add a patch. + with open(os.path.join(v8_cwd, 'v8_foo'), 'w') as f: + f.write('zonk') + subprocess.check_call(['git', 'add', 'v8_foo'], cwd=v8_cwd) + subprocess.check_call(['git', 'commit', '-m', "Title\n\nBody"], cwd=v8_cwd) + commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=v8_cwd).strip() + + # Run update script. + backport_node.Main([v8_cwd, node_cwd, commit, "--no-review"]) + + # Check message. + message = subprocess.check_output(['git', 'log', '-1', '--format=%B'], cwd=node_cwd) + self.assertIn('Original commit message:\n\n Title\n\n Body', message) + + # Check patch. + gitlog = subprocess.check_output( + ['git', 'diff', 'master', '--cached', '--', 'deps/v8/v8_foo'], + cwd=node_cwd, + ) + self.assertIn('+zonk', gitlog.strip()) + + # Check version. + version_file = os.path.join(node_cwd, "deps", "v8", "include", "v8-version.h") + self.assertIn('#define V8_PATCH_LEVEL 4322', FileToText(version_file)) + +if __name__ == "__main__": + unittest.main() diff --git a/chromium/v8/tools/release/update_node.py b/chromium/v8/tools/release/update_node.py index e05f71234da..de6bb06838b 100755 --- a/chromium/v8/tools/release/update_node.py +++ b/chromium/v8/tools/release/update_node.py @@ -3,6 +3,26 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +""" +Use this script to update V8 in a Node.js checkout. + +Requirements: + - Node.js checkout in which V8 should be updated. + - V8 checkout at the commit to which Node.js should be updated. + +Usage: + $ update_node.py <path_to_v8> <path_to_node> + + This will synchronize the content of <path_to_node>/deps/v8 with <path_to_v8>, + and a few V8 dependencies require in Node.js. It will also update .gitignore + appropriately. + +Optional flags: + --gclient Run `gclient sync` on the V8 checkout before updating. + --commit Create commit with the updated V8 in the Node.js checkout. + --with-patch Also include currently staged files in the V8 checkout. +""" + import argparse import os import shutil @@ -52,7 +72,8 @@ def CommitPatch(options): """ print ">> Comitting patch" subprocess.check_call( - ["git", "commit", "--allow-empty", "-m", "placeholder-commit"], + ["git", "-c", "user.name=fake", "-c", "user.email=fake@chromium.org", + "commit", "--allow-empty", "-m", "placeholder-commit"], cwd=options.v8_path, ) diff --git a/chromium/v8/tools/run-tests.py b/chromium/v8/tools/run-tests.py index 0b1675b75e6..1ba0380be20 100755 --- a/chromium/v8/tools/run-tests.py +++ b/chromium/v8/tools/run-tests.py @@ -68,8 +68,10 @@ TEST_MAP = { "debugger", "mjsunit", "cctest", + "wasm-spec-tests", "inspector", "webkit", + "mkgrokdump", "fuzzer", "message", "preparser", @@ -81,7 +83,9 @@ TEST_MAP = { "debugger", "mjsunit", "cctest", + "wasm-spec-tests", "inspector", + "mkgrokdump", "fuzzer", "message", "preparser", @@ -265,7 +269,7 @@ def BuildOptions(): default=False, action="store_true") result.add_option("--extra-flags", help="Additional flags to pass to each test command", - default="") + action="append", default=[]) result.add_option("--isolates", help="Whether to test isolates", default=False, action="store_true") result.add_option("-j", help="The number of parallel tasks to run", @@ -419,6 +423,7 @@ def SetupEnvironment(options): 'coverage=1', 'coverage_dir=%s' % options.sancov_dir, symbolizer, + "allow_user_segv_handler=1", ]) if options.cfi_vptr: @@ -532,7 +537,7 @@ def ProcessOptions(options): "running tests locally.") options.no_network = True options.command_prefix = shlex.split(options.command_prefix) - options.extra_flags = shlex.split(options.extra_flags) + options.extra_flags = sum(map(shlex.split, options.extra_flags), []) if options.gc_stress: options.extra_flags += GC_STRESS_FLAGS @@ -781,7 +786,7 @@ def Execute(arch, mode, args, options, suites): # target_arch != v8_target_arch in the dumped build config. simulator_run = not options.dont_skip_simulator_slow_tests and \ arch in ['arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', \ - 'ppc', 'ppc64'] and \ + 'ppc', 'ppc64', 's390', 's390x'] and \ ARCH_GUESS and arch != ARCH_GUESS # Find available test suites and read test cases from them. variables = { diff --git a/chromium/v8/tools/run_perf.py b/chromium/v8/tools/run_perf.py index 59669c6bbca..e6ec9cb38bc 100755 --- a/chromium/v8/tools/run_perf.py +++ b/chromium/v8/tools/run_perf.py @@ -1000,6 +1000,12 @@ def Main(args): "'powersave' for more stable results, or 'performance' " "for shorter completion time of suite, with potentially " "more noise in results.") + parser.add_option("--filter", + help="Only run the benchmarks beginning with this string. " + "For example: " + "--filter=JSTests/TypedArrays/ will run only TypedArray " + "benchmarks from the JSTests suite.", + default="") (options, args) = parser.parse_args(args) @@ -1092,9 +1098,12 @@ def Main(args): def NodeCB(node): platform.PreTests(node, path) - # Traverse graph/trace tree and interate over all runnables. + # Traverse graph/trace tree and iterate over all runnables. for runnable in FlattenRunnables(root, NodeCB): - print ">>> Running suite: %s" % "/".join(runnable.graphs) + runnable_name = "/".join(runnable.graphs) + if not runnable_name.startswith(options.filter): + continue + print ">>> Running suite: %s" % runnable_name def Runner(): """Output generator that reruns several times.""" diff --git a/chromium/v8/tools/testrunner/local/execution.py b/chromium/v8/tools/testrunner/local/execution.py index d5b519aadbd..dc55129a147 100644 --- a/chromium/v8/tools/testrunner/local/execution.py +++ b/chromium/v8/tools/testrunner/local/execution.py @@ -62,17 +62,18 @@ ProcessContext = collections.namedtuple( "process_context", ["suites", "context"]) -def MakeProcessContext(context): +def MakeProcessContext(context, suite_names): """Generate a process-local context. This reloads all suites per process and stores the global context. Args: context: The global context from the test runner. + suite_names (list of str): Suite names as loaded by the parent process. + Load the same suites in each subprocess. """ - suite_paths = utils.GetSuitePaths(TEST_DIR) suites = {} - for root in suite_paths: + for root in suite_names: # Don't reinitialize global state as this is concurrently called from # different processes. suite = testsuite.TestSuite.LoadTestSuite( @@ -198,7 +199,8 @@ class Runner(object): self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode) self.perf_failures = False self.printed_allocations = False - self.tests = [ t for s in suites for t in s.tests ] + self.tests = [t for s in suites for t in s.tests] + self.suite_names = [s.name for s in suites] # Always pre-sort by status file, slowest tests first. slow_key = lambda t: statusfile.IsSlow(t.outcomes) @@ -353,7 +355,7 @@ class Runner(object): fn=RunTest, gen=gen_tests(), process_context_fn=MakeProcessContext, - process_context_args=[self.context], + process_context_args=[self.context, self.suite_names], ) for result in it: if result.heartbeat: diff --git a/chromium/v8/tools/testrunner/local/testsuite.py b/chromium/v8/tools/testrunner/local/testsuite.py index f7fa19b20a0..68f39d6b4a6 100644 --- a/chromium/v8/tools/testrunner/local/testsuite.py +++ b/chromium/v8/tools/testrunner/local/testsuite.py @@ -71,7 +71,7 @@ class TestSuite(object): f = None try: (f, pathname, description) = imp.find_module("testcfg", [root]) - module = imp.load_module("testcfg", f, pathname, description) + module = imp.load_module(name + "_testcfg", f, pathname, description) return module.GetSuite(name, root) except ImportError: # Use default if no testcfg is present. diff --git a/chromium/v8/tools/testrunner/local/variants.py b/chromium/v8/tools/testrunner/local/variants.py index 2ad00cff2ab..0dba0d9579e 100644 --- a/chromium/v8/tools/testrunner/local/variants.py +++ b/chromium/v8/tools/testrunner/local/variants.py @@ -10,11 +10,12 @@ ALL_VARIANT_FLAGS = { "turbofan_opt": [["--turbo", "--always-opt"]], "noturbofan": [["--no-turbo"]], "noturbofan_stress": [["--no-turbo", "--stress-opt", "--always-opt"]], - "fullcode": [["--nocrankshaft", "--no-turbo"]], - # No optimization actually means no profile guided optimization - - # %OptimizeFunctionOnNextCall still works. - "nooptimization": [["--nocrankshaft"]], - "asm_wasm": [["--validate-asm", "--fast-validate-asm", "--stress-validate-asm", "--suppress-asm-messages"]], + "fullcode": [["--noopt", "--no-turbo"]], + # No optimization means disable all optimizations. OptimizeFunctionOnNextCall + # would not force optimization too. It turns into a Nop. Please see + # https://chromium-review.googlesource.com/c/452620/ for more discussion. + "nooptimization": [["--noopt"]], + "asm_wasm": [["--validate-asm", "--stress-validate-asm", "--suppress-asm-messages"]], "wasm_traps": [["--wasm_guard_pages", "--wasm_trap_handler", "--invoke-weak-callbacks"]], } @@ -25,11 +26,12 @@ FAST_VARIANT_FLAGS = { "turbofan": [["--turbo"]], "noturbofan": [["--no-turbo"]], "noturbofan_stress": [["--no-turbo", "--stress-opt"]], - "fullcode": [["--nocrankshaft", "--no-turbo"]], - # No optimization actually means no profile guided optimization - - # %OptimizeFunctionOnNextCall still works. - "nooptimization": [["--nocrankshaft"]], - "asm_wasm": [["--validate-asm", "--fast-validate-asm", "--stress-validate-asm", "--suppress-asm-messages"]], + "fullcode": [["--noopt", "--no-turbo"]], + # No optimization means disable all optimizations. OptimizeFunctionOnNextCall + # would not force optimization too. It turns into a Nop. Please see + # https://chromium-review.googlesource.com/c/452620/ for more discussion. + "nooptimization": [["--noopt"]], + "asm_wasm": [["--validate-asm", "--stress-validate-asm", "--suppress-asm-messages"]], "wasm_traps": [["--wasm_guard_pages", "--wasm_trap_handler", "--invoke-weak-callbacks"]], } diff --git a/chromium/v8/tools/testrunner/testrunner.isolate b/chromium/v8/tools/testrunner/testrunner.isolate index bfc9318adfb..545d888871b 100644 --- a/chromium/v8/tools/testrunner/testrunner.isolate +++ b/chromium/v8/tools/testrunner/testrunner.isolate @@ -12,7 +12,7 @@ ], }, 'conditions': [ - ['coverage==1 and sanitizer_coverage=="bb"', { + ['coverage==1 and sanitizer_coverage=="bb,trace-pc-guard"', { 'variables': { 'files': [ '../sanitizers/sancov_merger.py', diff --git a/chromium/v8/tools/try_perf.py b/chromium/v8/tools/try_perf.py index b9dac9ca3f2..98d3b067e1f 100755 --- a/chromium/v8/tools/try_perf.py +++ b/chromium/v8/tools/try_perf.py @@ -91,7 +91,7 @@ def main(): # Ensure depot_tools are updated. subprocess.check_output( - 'gclient', shell=True, stderr=subprocess.STDOUT, cwd=V8_BASE) + 'update_depot_tools', shell=True, stderr=subprocess.STDOUT, cwd=V8_BASE) cmd = ['git cl try -m internal.client.v8'] cmd += ['-b %s' % bot for bot in options.bots] diff --git a/chromium/v8/tools/turbolizer/disassembly-view.js b/chromium/v8/tools/turbolizer/disassembly-view.js index a2a534cd7f2..ecee04988cc 100644 --- a/chromium/v8/tools/turbolizer/disassembly-view.js +++ b/chromium/v8/tools/turbolizer/disassembly-view.js @@ -87,7 +87,7 @@ class DisassemblyView extends TextView { [/^.*/, UNCLASSIFIED_STYLE, -1] ], [ - [/^\s+\d+\s+[0-9a-f]+\s+/, NUMBER_STYLE, 2], + [/^\s+[0-9a-f]+\s+[0-9a-f]+\s+/, NUMBER_STYLE, 2], [/^.*/, null, -1] ], [ diff --git a/chromium/v8/tools/v8-info.sh b/chromium/v8/tools/v8-info.sh deleted file mode 100755 index 838d92a0011..00000000000 --- a/chromium/v8/tools/v8-info.sh +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/bash -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -########## Global variable definitions - -BASE_URL="https://code.google.com/p/v8/source/list" -VERSION="include/v8-version.h" -MAJOR="V8_MAJOR_VERSION" -MINOR="V8_MINOR_VERSION" -BUILD="V8_BUILD_NUMBER" -PATCH="V8_PATCH_LEVEL" - -V8="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" - -########## Function definitions - -cd $V8 - -usage() { -cat << EOF -usage: $0 OPTIONS - -Fetches V8 revision information from a git-svn checkout. - -OPTIONS: - -h Show this message. - - -i Print revision info for all branches matching the V8 version. - Example usage: $0 -i 3.19.10$ - Output format: [Git hash] [SVN revision] [V8 version] - - -v Print the V8 version tag for a trunk SVN revision. - Example usage: $0 -v 14981 - Output format: [V8 version] - - -m Print all patches that were merged to the specified V8 branch. - Example usage: $0 -m 3.18 - Output format: [V8 version] [SVN revision] [SVN patch merged]*. - - -p Print all patches merged to a specific V8 point-release. - Example usage: $0 -p 3.19.12.1 - Output format: [SVN patch merged]* - - -u Print a link to all SVN revisions between two V8 revision tags. - Example usage: $0 -u 3.19.10:3.19.11 -EOF -} - -tags() { - git for-each-ref --format="%(objectname) %(refname:short)" refs/remotes/svn -} - -tag_revision() { - cut -d" " -f1 -} - -tag_log() { - git log --format="%h %ci %ce %s" -1 $1 -} - -v8_hash() { - tags | grep "svn/tags/$1$" | tag_revision -} - -point_merges() { - echo $1 | grep -o "r[0-9]\+" -} - -hash_to_svn() { - git svn log -1 --oneline $1 | cut -d" " -f1 -} - -tag_version() { - tags | grep svn/tags/$1 | while read tag; do - id=$(echo $tag | grep -o "[^/]*$") - rev=$(echo $tag | tag_revision) - svn=$(hash_to_svn $rev) - echo $rev $svn $id - done -} - -svn_rev() { - git svn find-rev $2 svn/$1 -} - -v8_rev() { - cd $(git rev-parse --show-toplevel) - rev=$(git show $1:$VERSION \ - | grep "#define" \ - | grep "$MAJOR\|$MINOR\|$BUILD\|$PATCH" \ - | grep -o "[0-9]\+$" \ - | tr "\\n" ".") - echo ${rev%?} -} - -merges_to_branch() { - git cherry -v svn/trunk svn/$1 | while read merge; do - h=$(echo $merge | cut -d" " -f2) - svn=$(svn_rev $1 $h) - merges=$(echo $merge | grep -o "r[0-9]\+") - rev=$(v8_rev $h) - echo $rev r$svn $merges - done -} - -url_for() { - first=$(svn_rev trunk $(v8_hash $(echo $1 | cut -d":" -f1))) - last=$(svn_rev trunk $(v8_hash $(echo $1 | cut -d":" -f2))) - num=$[ $last - $first] - echo "$BASE_URL?num=$num&start=$last" -} - -########## Option parsing - -while getopts ":hi:v:m:p:u:" OPTION ; do - case $OPTION in - h) usage - exit 0 - ;; - i) tag_version $OPTARG - ;; - v) v8_rev $(svn_rev trunk r$OPTARG) - ;; - m) merges_to_branch $OPTARG - ;; - p) echo $(point_merges "$(tag_log $(v8_hash $OPTARG)^1)") - ;; - u) url_for $OPTARG - ;; - ?) echo "Illegal option: -$OPTARG" - usage - exit 1 - ;; - esac -done diff --git a/chromium/v8/tools/v8heapconst.py b/chromium/v8/tools/v8heapconst.py index d43291abe82..d2d6ae9266c 100644 --- a/chromium/v8/tools/v8heapconst.py +++ b/chromium/v8/tools/v8heapconst.py @@ -2,6 +2,9 @@ # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. +# This file is automatically generated by mkgrokdump and should not +# be modified manually. + # List of known V8 instance types. INSTANCE_TYPES = { 0: "INTERNALIZED_STRING_TYPE", @@ -51,97 +54,100 @@ INSTANCE_TYPES = { 150: "ACCESSOR_PAIR_TYPE", 151: "ACCESS_CHECK_INFO_TYPE", 152: "INTERCEPTOR_INFO_TYPE", - 153: "CALL_HANDLER_INFO_TYPE", - 154: "FUNCTION_TEMPLATE_INFO_TYPE", - 155: "OBJECT_TEMPLATE_INFO_TYPE", - 156: "ALLOCATION_SITE_TYPE", - 157: "ALLOCATION_MEMENTO_TYPE", - 158: "SCRIPT_TYPE", - 159: "TYPE_FEEDBACK_INFO_TYPE", - 160: "ALIASED_ARGUMENTS_ENTRY_TYPE", - 161: "PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE", - 162: "PROMISE_REACTION_JOB_INFO_TYPE", - 163: "DEBUG_INFO_TYPE", - 164: "BREAK_POINT_INFO_TYPE", - 165: "PROTOTYPE_INFO_TYPE", - 166: "TUPLE2_TYPE", - 167: "TUPLE3_TYPE", - 168: "CONTEXT_EXTENSION_TYPE", - 169: "CONSTANT_ELEMENTS_PAIR_TYPE", - 170: "MODULE_TYPE", - 171: "MODULE_INFO_ENTRY_TYPE", - 172: "FIXED_ARRAY_TYPE", - 173: "TRANSITION_ARRAY_TYPE", - 174: "SHARED_FUNCTION_INFO_TYPE", - 175: "CELL_TYPE", - 176: "WEAK_CELL_TYPE", - 177: "PROPERTY_CELL_TYPE", - 178: "JS_PROXY_TYPE", - 179: "JS_GLOBAL_OBJECT_TYPE", - 180: "JS_GLOBAL_PROXY_TYPE", - 181: "JS_SPECIAL_API_OBJECT_TYPE", - 182: "JS_VALUE_TYPE", - 183: "JS_MESSAGE_OBJECT_TYPE", - 184: "JS_DATE_TYPE", - 185: "JS_API_OBJECT_TYPE", - 186: "JS_OBJECT_TYPE", - 187: "JS_ARGUMENTS_TYPE", - 188: "JS_CONTEXT_EXTENSION_OBJECT_TYPE", - 189: "JS_GENERATOR_OBJECT_TYPE", - 190: "JS_MODULE_NAMESPACE_TYPE", - 191: "JS_ARRAY_TYPE", - 192: "JS_ARRAY_BUFFER_TYPE", - 193: "JS_TYPED_ARRAY_TYPE", - 194: "JS_DATA_VIEW_TYPE", - 195: "JS_SET_TYPE", - 196: "JS_MAP_TYPE", - 197: "JS_SET_ITERATOR_TYPE", - 198: "JS_MAP_ITERATOR_TYPE", - 199: "JS_WEAK_MAP_TYPE", - 200: "JS_WEAK_SET_TYPE", - 201: "JS_PROMISE_CAPABILITY_TYPE", - 202: "JS_PROMISE_TYPE", - 203: "JS_REGEXP_TYPE", - 204: "JS_ERROR_TYPE", - 205: "JS_ASYNC_FROM_SYNC_ITERATOR_TYPE", - 206: "JS_STRING_ITERATOR_TYPE", - 207: "JS_TYPED_ARRAY_KEY_ITERATOR_TYPE", - 208: "JS_FAST_ARRAY_KEY_ITERATOR_TYPE", - 209: "JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE", - 210: "JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 211: "JS_INT8_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 212: "JS_UINT16_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 213: "JS_INT16_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 214: "JS_UINT32_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 215: "JS_INT32_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 216: "JS_FLOAT32_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 217: "JS_FLOAT64_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 218: "JS_UINT8_CLAMPED_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 219: "JS_FAST_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 220: "JS_FAST_HOLEY_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 221: "JS_FAST_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 222: "JS_FAST_HOLEY_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 223: "JS_FAST_DOUBLE_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 224: "JS_FAST_HOLEY_DOUBLE_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 225: "JS_GENERIC_ARRAY_KEY_VALUE_ITERATOR_TYPE", - 226: "JS_UINT8_ARRAY_VALUE_ITERATOR_TYPE", - 227: "JS_INT8_ARRAY_VALUE_ITERATOR_TYPE", - 228: "JS_UINT16_ARRAY_VALUE_ITERATOR_TYPE", - 229: "JS_INT16_ARRAY_VALUE_ITERATOR_TYPE", - 230: "JS_UINT32_ARRAY_VALUE_ITERATOR_TYPE", - 231: "JS_INT32_ARRAY_VALUE_ITERATOR_TYPE", - 232: "JS_FLOAT32_ARRAY_VALUE_ITERATOR_TYPE", - 233: "JS_FLOAT64_ARRAY_VALUE_ITERATOR_TYPE", - 234: "JS_UINT8_CLAMPED_ARRAY_VALUE_ITERATOR_TYPE", - 235: "JS_FAST_SMI_ARRAY_VALUE_ITERATOR_TYPE", - 236: "JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE", - 237: "JS_FAST_ARRAY_VALUE_ITERATOR_TYPE", - 238: "JS_FAST_HOLEY_ARRAY_VALUE_ITERATOR_TYPE", - 239: "JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE", - 240: "JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE", - 241: "JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE", - 242: "JS_BOUND_FUNCTION_TYPE", - 243: "JS_FUNCTION_TYPE", + 153: "FUNCTION_TEMPLATE_INFO_TYPE", + 154: "OBJECT_TEMPLATE_INFO_TYPE", + 155: "ALLOCATION_SITE_TYPE", + 156: "ALLOCATION_MEMENTO_TYPE", + 157: "SCRIPT_TYPE", + 158: "ALIASED_ARGUMENTS_ENTRY_TYPE", + 159: "PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE", + 160: "PROMISE_REACTION_JOB_INFO_TYPE", + 161: "DEBUG_INFO_TYPE", + 162: "STACK_FRAME_INFO_TYPE", + 163: "PROTOTYPE_INFO_TYPE", + 164: "TUPLE2_TYPE", + 165: "TUPLE3_TYPE", + 166: "CONTEXT_EXTENSION_TYPE", + 167: "MODULE_TYPE", + 168: "MODULE_INFO_ENTRY_TYPE", + 169: "ASYNC_GENERATOR_REQUEST_TYPE", + 170: "FIXED_ARRAY_TYPE", + 171: "TRANSITION_ARRAY_TYPE", + 172: "SHARED_FUNCTION_INFO_TYPE", + 173: "CELL_TYPE", + 174: "WEAK_CELL_TYPE", + 175: "PROPERTY_CELL_TYPE", + 176: "PADDING_TYPE_1", + 177: "PADDING_TYPE_2", + 178: "PADDING_TYPE_3", + 179: "PADDING_TYPE_4", + 180: "JS_PROXY_TYPE", + 181: "JS_GLOBAL_OBJECT_TYPE", + 182: "JS_GLOBAL_PROXY_TYPE", + 183: "JS_SPECIAL_API_OBJECT_TYPE", + 184: "JS_VALUE_TYPE", + 185: "JS_MESSAGE_OBJECT_TYPE", + 186: "JS_DATE_TYPE", + 187: "JS_API_OBJECT_TYPE", + 188: "JS_OBJECT_TYPE", + 189: "JS_ARGUMENTS_TYPE", + 190: "JS_CONTEXT_EXTENSION_OBJECT_TYPE", + 191: "JS_GENERATOR_OBJECT_TYPE", + 192: "JS_ASYNC_GENERATOR_OBJECT_TYPE", + 193: "JS_MODULE_NAMESPACE_TYPE", + 194: "JS_ARRAY_TYPE", + 195: "JS_ARRAY_BUFFER_TYPE", + 196: "JS_TYPED_ARRAY_TYPE", + 197: "JS_DATA_VIEW_TYPE", + 198: "JS_SET_TYPE", + 199: "JS_MAP_TYPE", + 200: "JS_SET_ITERATOR_TYPE", + 201: "JS_MAP_ITERATOR_TYPE", + 202: "JS_WEAK_MAP_TYPE", + 203: "JS_WEAK_SET_TYPE", + 204: "JS_PROMISE_CAPABILITY_TYPE", + 205: "JS_PROMISE_TYPE", + 206: "JS_REGEXP_TYPE", + 207: "JS_ERROR_TYPE", + 208: "JS_ASYNC_FROM_SYNC_ITERATOR_TYPE", + 209: "JS_STRING_ITERATOR_TYPE", + 210: "JS_TYPED_ARRAY_KEY_ITERATOR_TYPE", + 211: "JS_FAST_ARRAY_KEY_ITERATOR_TYPE", + 212: "JS_GENERIC_ARRAY_KEY_ITERATOR_TYPE", + 213: "JS_UINT8_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 214: "JS_INT8_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 215: "JS_UINT16_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 216: "JS_INT16_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 217: "JS_UINT32_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 218: "JS_INT32_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 219: "JS_FLOAT32_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 220: "JS_FLOAT64_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 221: "JS_UINT8_CLAMPED_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 222: "JS_FAST_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 223: "JS_FAST_HOLEY_SMI_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 224: "JS_FAST_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 225: "JS_FAST_HOLEY_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 226: "JS_FAST_DOUBLE_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 227: "JS_FAST_HOLEY_DOUBLE_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 228: "JS_GENERIC_ARRAY_KEY_VALUE_ITERATOR_TYPE", + 229: "JS_UINT8_ARRAY_VALUE_ITERATOR_TYPE", + 230: "JS_INT8_ARRAY_VALUE_ITERATOR_TYPE", + 231: "JS_UINT16_ARRAY_VALUE_ITERATOR_TYPE", + 232: "JS_INT16_ARRAY_VALUE_ITERATOR_TYPE", + 233: "JS_UINT32_ARRAY_VALUE_ITERATOR_TYPE", + 234: "JS_INT32_ARRAY_VALUE_ITERATOR_TYPE", + 235: "JS_FLOAT32_ARRAY_VALUE_ITERATOR_TYPE", + 236: "JS_FLOAT64_ARRAY_VALUE_ITERATOR_TYPE", + 237: "JS_UINT8_CLAMPED_ARRAY_VALUE_ITERATOR_TYPE", + 238: "JS_FAST_SMI_ARRAY_VALUE_ITERATOR_TYPE", + 239: "JS_FAST_HOLEY_SMI_ARRAY_VALUE_ITERATOR_TYPE", + 240: "JS_FAST_ARRAY_VALUE_ITERATOR_TYPE", + 241: "JS_FAST_HOLEY_ARRAY_VALUE_ITERATOR_TYPE", + 242: "JS_FAST_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE", + 243: "JS_FAST_HOLEY_DOUBLE_ARRAY_VALUE_ITERATOR_TYPE", + 244: "JS_GENERIC_ARRAY_VALUE_ITERATOR_TYPE", + 245: "JS_BOUND_FUNCTION_TYPE", + 246: "JS_FUNCTION_TYPE", } # List of known V8 maps. @@ -149,7 +155,7 @@ KNOWN_MAPS = { 0x02201: (137, "FreeSpaceMap"), 0x02259: (131, "MetaMap"), 0x022b1: (130, "NullMap"), - 0x02309: (172, "FixedArrayMap"), + 0x02309: (170, "FixedArrayMap"), 0x02361: (8, "OneByteInternalizedStringMap"), 0x023b9: (148, "OnePointerFillerMap"), 0x02411: (148, "TwoPointerFillerMap"), @@ -159,100 +165,98 @@ KNOWN_MAPS = { 0x02571: (130, "TheHoleMap"), 0x025c9: (130, "BooleanMap"), 0x02621: (135, "ByteArrayMap"), - 0x02679: (172, "FixedCOWArrayMap"), - 0x026d1: (172, "HashTableMap"), + 0x02679: (170, "FixedCOWArrayMap"), + 0x026d1: (170, "HashTableMap"), 0x02729: (128, "SymbolMap"), 0x02781: (72, "OneByteStringMap"), - 0x027d9: (172, "ScopeInfoMap"), - 0x02831: (174, "SharedFunctionInfoMap"), + 0x027d9: (170, "ScopeInfoMap"), + 0x02831: (172, "SharedFunctionInfoMap"), 0x02889: (132, "CodeMap"), - 0x028e1: (172, "FunctionContextMap"), - 0x02939: (175, "CellMap"), - 0x02991: (176, "WeakCellMap"), - 0x029e9: (177, "GlobalPropertyCellMap"), + 0x028e1: (170, "FunctionContextMap"), + 0x02939: (173, "CellMap"), + 0x02991: (174, "WeakCellMap"), + 0x029e9: (175, "GlobalPropertyCellMap"), 0x02a41: (134, "ForeignMap"), - 0x02a99: (173, "TransitionArrayMap"), + 0x02a99: (171, "TransitionArrayMap"), 0x02af1: (130, "ArgumentsMarkerMap"), - 0x02b49: (172, "NativeContextMap"), - 0x02ba1: (172, "ModuleContextMap"), - 0x02bf9: (172, "EvalContextMap"), - 0x02c51: (172, "ScriptContextMap"), - 0x02ca9: (172, "BlockContextMap"), - 0x02d01: (172, "CatchContextMap"), - 0x02d59: (172, "WithContextMap"), - 0x02db1: (147, "FixedDoubleArrayMap"), - 0x02e09: (133, "MutableHeapNumberMap"), - 0x02e61: (172, "OrderedHashTableMap"), - 0x02eb9: (172, "SloppyArgumentsElementsMap"), - 0x02f11: (183, "JSMessageObjectMap"), - 0x02f69: (136, "BytecodeArrayMap"), - 0x02fc1: (172, "ModuleInfoMap"), - 0x03019: (175, "NoClosuresCellMap"), - 0x03071: (175, "OneClosureCellMap"), - 0x030c9: (175, "ManyClosuresCellMap"), - 0x03121: (64, "StringMap"), - 0x03179: (73, "ConsOneByteStringMap"), - 0x031d1: (65, "ConsStringMap"), - 0x03229: (77, "ThinOneByteStringMap"), - 0x03281: (69, "ThinStringMap"), - 0x032d9: (67, "SlicedStringMap"), - 0x03331: (75, "SlicedOneByteStringMap"), - 0x03389: (66, "ExternalStringMap"), - 0x033e1: (82, "ExternalStringWithOneByteDataMap"), - 0x03439: (74, "ExternalOneByteStringMap"), - 0x03491: (98, "ShortExternalStringMap"), - 0x034e9: (114, "ShortExternalStringWithOneByteDataMap"), - 0x03541: (0, "InternalizedStringMap"), - 0x03599: (2, "ExternalInternalizedStringMap"), - 0x035f1: (18, "ExternalInternalizedStringWithOneByteDataMap"), - 0x03649: (10, "ExternalOneByteInternalizedStringMap"), - 0x036a1: (34, "ShortExternalInternalizedStringMap"), - 0x036f9: (50, "ShortExternalInternalizedStringWithOneByteDataMap"), - 0x03751: (42, "ShortExternalOneByteInternalizedStringMap"), - 0x037a9: (106, "ShortExternalOneByteStringMap"), - 0x03801: (172, "FeedbackVectorMap"), - 0x03859: (130, "ExceptionMap"), - 0x038b1: (130, "TerminationExceptionMap"), - 0x03909: (130, "OptimizedOutMap"), - 0x03961: (130, "StaleRegisterMap"), - 0x039b9: (172, "DebugEvaluateContextMap"), - 0x03a11: (172, "ScriptContextTableMap"), - 0x03a69: (172, "UnseededNumberDictionaryMap"), - 0x03ac1: (186, "ExternalMap"), - 0x03b19: (106, "NativeSourceStringMap"), - 0x03b71: (139, "FixedUint8ArrayMap"), - 0x03bc9: (138, "FixedInt8ArrayMap"), - 0x03c21: (141, "FixedUint16ArrayMap"), - 0x03c79: (140, "FixedInt16ArrayMap"), - 0x03cd1: (143, "FixedUint32ArrayMap"), - 0x03d29: (142, "FixedInt32ArrayMap"), - 0x03d81: (144, "FixedFloat32ArrayMap"), - 0x03dd9: (145, "FixedFloat64ArrayMap"), - 0x03e31: (146, "FixedUint8ClampedArrayMap"), - 0x03e89: (158, "ScriptMap"), + 0x02b49: (130, "ExceptionMap"), + 0x02ba1: (130, "TerminationExceptionMap"), + 0x02bf9: (130, "OptimizedOutMap"), + 0x02c51: (130, "StaleRegisterMap"), + 0x02ca9: (170, "NativeContextMap"), + 0x02d01: (170, "ModuleContextMap"), + 0x02d59: (170, "EvalContextMap"), + 0x02db1: (170, "ScriptContextMap"), + 0x02e09: (170, "BlockContextMap"), + 0x02e61: (170, "CatchContextMap"), + 0x02eb9: (170, "WithContextMap"), + 0x02f11: (147, "FixedDoubleArrayMap"), + 0x02f69: (133, "MutableHeapNumberMap"), + 0x02fc1: (170, "OrderedHashTableMap"), + 0x03019: (170, "SloppyArgumentsElementsMap"), + 0x03071: (185, "JSMessageObjectMap"), + 0x030c9: (136, "BytecodeArrayMap"), + 0x03121: (170, "ModuleInfoMap"), + 0x03179: (173, "NoClosuresCellMap"), + 0x031d1: (173, "OneClosureCellMap"), + 0x03229: (173, "ManyClosuresCellMap"), + 0x03281: (64, "StringMap"), + 0x032d9: (73, "ConsOneByteStringMap"), + 0x03331: (65, "ConsStringMap"), + 0x03389: (77, "ThinOneByteStringMap"), + 0x033e1: (69, "ThinStringMap"), + 0x03439: (67, "SlicedStringMap"), + 0x03491: (75, "SlicedOneByteStringMap"), + 0x034e9: (66, "ExternalStringMap"), + 0x03541: (82, "ExternalStringWithOneByteDataMap"), + 0x03599: (74, "ExternalOneByteStringMap"), + 0x035f1: (98, "ShortExternalStringMap"), + 0x03649: (114, "ShortExternalStringWithOneByteDataMap"), + 0x036a1: (0, "InternalizedStringMap"), + 0x036f9: (2, "ExternalInternalizedStringMap"), + 0x03751: (18, "ExternalInternalizedStringWithOneByteDataMap"), + 0x037a9: (10, "ExternalOneByteInternalizedStringMap"), + 0x03801: (34, "ShortExternalInternalizedStringMap"), + 0x03859: (50, "ShortExternalInternalizedStringWithOneByteDataMap"), + 0x038b1: (42, "ShortExternalOneByteInternalizedStringMap"), + 0x03909: (106, "ShortExternalOneByteStringMap"), + 0x03961: (139, "FixedUint8ArrayMap"), + 0x039b9: (138, "FixedInt8ArrayMap"), + 0x03a11: (141, "FixedUint16ArrayMap"), + 0x03a69: (140, "FixedInt16ArrayMap"), + 0x03ac1: (143, "FixedUint32ArrayMap"), + 0x03b19: (142, "FixedInt32ArrayMap"), + 0x03b71: (144, "FixedFloat32ArrayMap"), + 0x03bc9: (145, "FixedFloat64ArrayMap"), + 0x03c21: (146, "FixedUint8ClampedArrayMap"), + 0x03c79: (157, "ScriptMap"), + 0x03cd1: (170, "FeedbackVectorMap"), + 0x03d29: (170, "DebugEvaluateContextMap"), + 0x03d81: (170, "ScriptContextTableMap"), + 0x03dd9: (170, "UnseededNumberDictionaryMap"), + 0x03e31: (188, "ExternalMap"), + 0x03e89: (106, "NativeSourceStringMap"), 0x03ee1: (152, "InterceptorInfoMap"), - 0x03f39: (201, "JSPromiseCapabilityMap"), - 0x03f91: (149, "AccessorInfoMap"), - 0x03fe9: (150, "AccessorPairMap"), - 0x04041: (151, "AccessCheckInfoMap"), - 0x04099: (153, "CallHandlerInfoMap"), - 0x040f1: (154, "FunctionTemplateInfoMap"), - 0x04149: (155, "ObjectTemplateInfoMap"), - 0x041a1: (156, "AllocationSiteMap"), - 0x041f9: (157, "AllocationMementoMap"), - 0x04251: (159, "TypeFeedbackInfoMap"), - 0x042a9: (160, "AliasedArgumentsEntryMap"), - 0x04301: (161, "PromiseResolveThenableJobInfoMap"), - 0x04359: (162, "PromiseReactionJobInfoMap"), - 0x043b1: (163, "DebugInfoMap"), - 0x04409: (164, "BreakPointInfoMap"), - 0x04461: (165, "PrototypeInfoMap"), - 0x044b9: (166, "Tuple2Map"), - 0x04511: (167, "Tuple3Map"), - 0x04569: (168, "ContextExtensionMap"), - 0x045c1: (169, "ConstantElementsPairMap"), - 0x04619: (170, "ModuleMap"), - 0x04671: (171, "ModuleInfoEntryMap"), + 0x03f39: (156, "AllocationMementoMap"), + 0x03f91: (204, "JSPromiseCapabilityMap"), + 0x03fe9: (149, "AccessorInfoMap"), + 0x04041: (150, "AccessorPairMap"), + 0x04099: (151, "AccessCheckInfoMap"), + 0x040f1: (153, "FunctionTemplateInfoMap"), + 0x04149: (154, "ObjectTemplateInfoMap"), + 0x041a1: (155, "AllocationSiteMap"), + 0x041f9: (158, "AliasedArgumentsEntryMap"), + 0x04251: (159, "PromiseResolveThenableJobInfoMap"), + 0x042a9: (160, "PromiseReactionJobInfoMap"), + 0x04301: (161, "DebugInfoMap"), + 0x04359: (162, "StackFrameInfoMap"), + 0x043b1: (163, "PrototypeInfoMap"), + 0x04409: (164, "Tuple2Map"), + 0x04461: (165, "Tuple3Map"), + 0x044b9: (166, "ContextExtensionMap"), + 0x04511: (167, "ModuleMap"), + 0x04569: (168, "ModuleInfoEntryMap"), + 0x045c1: (169, "AsyncGeneratorRequestMap"), } # List of known V8 objects. @@ -268,56 +272,38 @@ KNOWN_OBJECTS = { ("OLD_SPACE", 0x023b1): "TrueValue", ("OLD_SPACE", 0x02421): "FalseValue", ("OLD_SPACE", 0x02471): "empty_string", - ("OLD_SPACE", 0x02489): "ArgumentsMarker", - ("OLD_SPACE", 0x024e1): "EmptyByteArray", - ("OLD_SPACE", 0x024f1): "EmptyWeakCell", - ("OLD_SPACE", 0x02509): "InfinityValue", - ("OLD_SPACE", 0x02519): "MinusZeroValue", - ("OLD_SPACE", 0x02529): "MinusInfinityValue", - ("OLD_SPACE", 0x04979): "EmptyScopeInfo", - ("OLD_SPACE", 0x04989): "Exception", - ("OLD_SPACE", 0x049e1): "TerminationException", - ("OLD_SPACE", 0x04a41): "OptimizedOut", - ("OLD_SPACE", 0x04a99): "StaleRegister", - ("OLD_SPACE", 0x04af1): "EmptyFixedUint8Array", - ("OLD_SPACE", 0x04b11): "EmptyFixedInt8Array", - ("OLD_SPACE", 0x04b31): "EmptyFixedUint16Array", - ("OLD_SPACE", 0x04b51): "EmptyFixedInt16Array", - ("OLD_SPACE", 0x04b71): "EmptyFixedUint32Array", - ("OLD_SPACE", 0x04b91): "EmptyFixedInt32Array", - ("OLD_SPACE", 0x04bb1): "EmptyFixedFloat32Array", - ("OLD_SPACE", 0x04bd1): "EmptyFixedFloat64Array", - ("OLD_SPACE", 0x04bf1): "EmptyFixedUint8ClampedArray", - ("OLD_SPACE", 0x04c11): "EmptyScript", - ("OLD_SPACE", 0x04c99): "UndefinedCell", - ("OLD_SPACE", 0x04ca9): "EmptySloppyArgumentsElements", - ("OLD_SPACE", 0x04cc9): "EmptySlowElementDictionary", - ("OLD_SPACE", 0x04d19): "EmptyPropertyCell", - ("OLD_SPACE", 0x04d39): "ArrayProtector", - ("OLD_SPACE", 0x04d59): "IsConcatSpreadableProtector", - ("OLD_SPACE", 0x04d69): "SpeciesProtector", - ("OLD_SPACE", 0x04d79): "StringLengthProtector", - ("OLD_SPACE", 0x04d99): "FastArrayIterationProtector", - ("OLD_SPACE", 0x04da9): "ArrayIteratorProtector", - ("OLD_SPACE", 0x04dc9): "ArrayBufferNeuteringProtector", - ("OLD_SPACE", 0x04de9): "NumberStringCache", - ("OLD_SPACE", 0x05df9): "SingleCharacterStringCache", - ("OLD_SPACE", 0x06669): "StringSplitCache", - ("OLD_SPACE", 0x06e79): "RegExpMultipleCache", - ("OLD_SPACE", 0x07689): "NativesSourceCache", - ("OLD_SPACE", 0x07931): "ExtraNativesSourceCache", - ("OLD_SPACE", 0x07969): "ExperimentalExtraNativesSourceCache", - ("OLD_SPACE", 0x07981): "EmptyPropertiesDictionary", - ("OLD_SPACE", 0x079d1): "ScriptList", - ("OLD_SPACE", 0x22019): "CodeStubs", - ("OLD_SPACE", 0x2f199): "WeakObjectToCodeTable", - ("OLD_SPACE", 0x2f3c1): "WeakNewSpaceObjectToCodeList", - ("OLD_SPACE", 0x2f451): "NoScriptSharedFunctionInfos", - ("OLD_SPACE", 0x4abd9): "MessageListeners", - ("OLD_SPACE", 0x4abf9): "NoOpInterceptorInfo", - ("OLD_SPACE", 0x531d1): "StringTable", - ("CODE_SPACE", 0x2cde1): "JsEntryCode", - ("CODE_SPACE", 0x31241): "JsConstructEntryCode", + ("OLD_SPACE", 0x02489): "EmptyScopeInfo", + ("OLD_SPACE", 0x02499): "ArgumentsMarker", + ("OLD_SPACE", 0x024f1): "Exception", + ("OLD_SPACE", 0x02549): "TerminationException", + ("OLD_SPACE", 0x025a9): "OptimizedOut", + ("OLD_SPACE", 0x02601): "StaleRegister", + ("OLD_SPACE", 0x02659): "EmptyByteArray", + ("OLD_SPACE", 0x02669): "EmptyFixedUint8Array", + ("OLD_SPACE", 0x02689): "EmptyFixedInt8Array", + ("OLD_SPACE", 0x026a9): "EmptyFixedUint16Array", + ("OLD_SPACE", 0x026c9): "EmptyFixedInt16Array", + ("OLD_SPACE", 0x026e9): "EmptyFixedUint32Array", + ("OLD_SPACE", 0x02709): "EmptyFixedInt32Array", + ("OLD_SPACE", 0x02729): "EmptyFixedFloat32Array", + ("OLD_SPACE", 0x02749): "EmptyFixedFloat64Array", + ("OLD_SPACE", 0x02769): "EmptyFixedUint8ClampedArray", + ("OLD_SPACE", 0x02789): "EmptyScript", + ("OLD_SPACE", 0x02811): "UndefinedCell", + ("OLD_SPACE", 0x02821): "EmptySloppyArgumentsElements", + ("OLD_SPACE", 0x02841): "EmptySlowElementDictionary", + ("OLD_SPACE", 0x02891): "EmptyPropertyCell", + ("OLD_SPACE", 0x028b1): "EmptyWeakCell", + ("OLD_SPACE", 0x028c9): "ArrayProtector", + ("OLD_SPACE", 0x028e9): "IsConcatSpreadableProtector", + ("OLD_SPACE", 0x028f9): "SpeciesProtector", + ("OLD_SPACE", 0x02909): "StringLengthProtector", + ("OLD_SPACE", 0x02929): "FastArrayIterationProtector", + ("OLD_SPACE", 0x02939): "ArrayIteratorProtector", + ("OLD_SPACE", 0x02959): "ArrayBufferNeuteringProtector", + ("OLD_SPACE", 0x02979): "InfinityValue", + ("OLD_SPACE", 0x02989): "MinusZeroValue", + ("OLD_SPACE", 0x02999): "MinusInfinityValue", } # List of known V8 Frame Markers. @@ -340,3 +326,5 @@ FRAME_MARKERS = ( "BUILTIN", "BUILTIN_EXIT", ) + +# This set of constants is generated from a shipping build. diff --git a/chromium/v8/tools/v8heapconst.py.tmpl b/chromium/v8/tools/v8heapconst.py.tmpl deleted file mode 100644 index a773f47c8b9..00000000000 --- a/chromium/v8/tools/v8heapconst.py.tmpl +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2013 the V8 project authors. All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This file is automatically generated from the V8 source and should not -# be modified manually, run 'make grokdump' instead to update this file. - diff --git a/chromium/v8/tools/verify_source_deps.py b/chromium/v8/tools/verify_source_deps.py index 6f804040cc6..e3a39c1d17c 100755 --- a/chromium/v8/tools/verify_source_deps.py +++ b/chromium/v8/tools/verify_source_deps.py @@ -31,6 +31,7 @@ GYP_FILES = [ os.path.join(V8_BASE, 'test', 'fuzzer', 'fuzzer.gyp'), os.path.join(V8_BASE, 'test', 'unittests', 'unittests.gyp'), os.path.join(V8_BASE, 'test', 'inspector', 'inspector.gyp'), + os.path.join(V8_BASE, 'test', 'mkgrokdump', 'mkgrokdump.gyp'), os.path.join(V8_BASE, 'testing', 'gmock.gyp'), os.path.join(V8_BASE, 'testing', 'gtest.gyp'), os.path.join(V8_BASE, 'tools', 'parser-shell.gyp'), @@ -49,11 +50,13 @@ ALL_GYP_PREFIXES = [ os.path.join('test', 'fuzzer'), os.path.join('test', 'unittests'), os.path.join('test', 'inspector'), + os.path.join('test', 'mkgrokdump'), ] GYP_UNSUPPORTED_FEATURES = [ 'gcmole', 'setup-isolate-deserialize.cc', + 'v8-version.h' ] GN_FILES = [ @@ -64,6 +67,7 @@ GN_FILES = [ os.path.join(V8_BASE, 'test', 'cctest', 'BUILD.gn'), os.path.join(V8_BASE, 'test', 'unittests', 'BUILD.gn'), os.path.join(V8_BASE, 'test', 'inspector', 'BUILD.gn'), + os.path.join(V8_BASE, 'test', 'mkgrokdump', 'BUILD.gn'), os.path.join(V8_BASE, 'tools', 'BUILD.gn'), ] @@ -77,6 +81,7 @@ GN_UNSUPPORTED_FEATURES = [ 'qnx', 'solaris', 'vtune', + 'v8-version.h', 'x87', ] @@ -88,6 +93,7 @@ ALL_GN_PREFIXES = [ os.path.join('test', 'cctest'), os.path.join('test', 'unittests'), os.path.join('test', 'inspector'), + os.path.join('test', 'mkgrokdump'), ] def pathsplit(path): diff --git a/chromium/v8/tools/update-wasm-fuzzers.sh b/chromium/v8/tools/wasm/update-wasm-fuzzers.sh index a58681f6826..ab9f84be287 100755 --- a/chromium/v8/tools/update-wasm-fuzzers.sh +++ b/chromium/v8/tools/wasm/update-wasm-fuzzers.sh @@ -5,52 +5,52 @@ set -e -TOOLS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd ${TOOLS_DIR}/.. +cd ${TOOLS_WASM_DIR}/../.. -rm -rf test/fuzzer/wasm -rm -rf test/fuzzer/wasm_asmjs +rm -rf test/fuzzer/wasm_corpus +rm -rf test/fuzzer/wasm_asmjs_corpus -make x64.release -j +tools/dev/gm.py x64.release all -mkdir -p test/fuzzer/wasm -mkdir -p test/fuzzer/wasm_asmjs +mkdir -p test/fuzzer/wasm_corpus +mkdir -p test/fuzzer/wasm_asmjs_corpus # asm.js ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/wasm/asm* + --dump-wasm-module-path=./test/fuzzer/wasm_asmjs_corpus/" mjsunit/wasm/asm* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/asm/* + --dump-wasm-module-path=./test/fuzzer/wasm_asmjs_corpus/" mjsunit/asm/* +# WASM ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm_asmjs/" mjsunit/regress/asm/* -# WASM + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" unittests ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" unittests + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" wasm-spec-tests/* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" mjsunit/wasm/* + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" mjsunit/wasm/* ./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \ --mode=release --no-presubmit --extra-flags="--dump-wasm-module \ - --dump-wasm-module-path=./test/fuzzer/wasm/" \ + --dump-wasm-module-path=./test/fuzzer/wasm_corpus/" \ $(cd test/; ls cctest/wasm/test-*.cc | \ sed -es/wasm\\///g | sed -es/[.]cc/\\/\\*/g) # Delete items over 20k. -for x in $(find ./test/fuzzer/wasm/ -type f -size +20k) +for x in $(find ./test/fuzzer/wasm_corpus/ -type f -size +20k) do rm $x done -for x in $(find ./test/fuzzer/wasm_asmjs/ -type f -size +20k) +for x in $(find ./test/fuzzer/wasm_asmjs_corpus/ -type f -size +20k) do rm $x done # Upload changes. cd test/fuzzer -upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm -upload_to_google_storage.py -a -b v8-wasm-asmjs-fuzzer wasm_asmjs +upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm_corpus +upload_to_google_storage.py -a -b v8-wasm-asmjs-fuzzer wasm_asmjs_corpus diff --git a/chromium/v8/tools/wasm/update-wasm-spec-tests.sh b/chromium/v8/tools/wasm/update-wasm-spec-tests.sh new file mode 100755 index 00000000000..be277e9ad73 --- /dev/null +++ b/chromium/v8/tools/wasm/update-wasm-spec-tests.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Copyright 2017 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. + +set -e + +TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +V8_DIR="${TOOLS_WASM_DIR}/../.." + +cd ${V8_DIR} + +mkdir -p ./test/wasm-spec-tests/tests/ +rm -rf ./test/wasm-spec-tests/tests/* + +./tools/dev/gm.py x64.release all + +cd ${V8_DIR}/test/wasm-js/interpreter +make + +cd ${V8_DIR}/test/wasm-js/test/core + +./run.py --wasm ${V8_DIR}/test/wasm-js/interpreter/wasm --js ${V8_DIR}/out/x64.release/d8 + +cp ${V8_DIR}/test/wasm-js/test/core/output/*.js ${V8_DIR}/test/wasm-spec-tests/tests + +cd ${V8_DIR}/test/wasm-spec-tests +upload_to_google_storage.py -a -b v8-wasm-spec-tests tests + + diff --git a/chromium/v8/tools/whitespace.txt b/chromium/v8/tools/whitespace.txt index 0c3c0d7feb1..4448e29f885 100644 --- a/chromium/v8/tools/whitespace.txt +++ b/chromium/v8/tools/whitespace.txt @@ -7,5 +7,5 @@ A Smi balks into a war and says: 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 bartender starts to shake the bottles..... +The bartender starts to shake the bottles........ . |