summaryrefslogtreecommitdiff
path: root/deps/v8/tools
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-12-04 08:20:37 +0100
committerMichaël Zasso <targos@protonmail.com>2018-12-06 15:23:33 +0100
commit9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3 (patch)
tree2b0c843168dafb939d8df8a15b2aa72b76dee51d /deps/v8/tools
parentb8fbe69db1292307adb2c2b2e0d5ef48c4ab2faf (diff)
downloadandroid-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.gz
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.tar.bz2
android-node-v8-9b4bf7de6c9a7c25f116c7a502384c20b5cfaea3.zip
deps: update V8 to 7.1.302.28
PR-URL: https://github.com/nodejs/node/pull/23423 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/v8/tools')
-rw-r--r--deps/v8/tools/BUILD.gn4
-rwxr-xr-xdeps/v8/tools/bigint-tester.py4
-rw-r--r--deps/v8/tools/blink_tests/TestExpectations2
-rw-r--r--deps/v8/tools/callstats.html7
-rwxr-xr-xdeps/v8/tools/callstats.py37
-rw-r--r--deps/v8/tools/gen-postmortem-metadata.py9
-rwxr-xr-xdeps/v8/tools/generate-header-include-checks.py1
-rwxr-xr-xdeps/v8/tools/grokdump.py6
-rw-r--r--deps/v8/tools/heap-stats/categories.js8
-rwxr-xr-xdeps/v8/tools/node/fetch_deps.py3
-rwxr-xr-xdeps/v8/tools/node/update_node.py13
-rwxr-xr-xdeps/v8/tools/perf-to-html.py381
-rw-r--r--deps/v8/tools/profile.js16
-rw-r--r--deps/v8/tools/profview/index.html6
-rw-r--r--deps/v8/tools/profview/profile-utils.js62
-rw-r--r--deps/v8/tools/profview/profview.css53
-rw-r--r--deps/v8/tools/profview/profview.js277
-rwxr-xr-xdeps/v8/tools/release/create_release.py2
-rwxr-xr-xdeps/v8/tools/release/filter_build_files.py2
-rw-r--r--deps/v8/tools/release/git_recipes.py8
-rwxr-xr-xdeps/v8/tools/release/test_scripts.py2
-rwxr-xr-xdeps/v8/tools/run-clang-tidy.py420
-rwxr-xr-xdeps/v8/tools/run_perf.py4
-rw-r--r--deps/v8/tools/sanitizers/tsan_suppressions.txt4
-rw-r--r--deps/v8/tools/test262-results-parser.js41
-rw-r--r--deps/v8/tools/testrunner/base_runner.py15
-rw-r--r--deps/v8/tools/testrunner/local/android.py7
-rw-r--r--deps/v8/tools/testrunner/local/command.py2
-rw-r--r--deps/v8/tools/testrunner/local/pool.py3
-rwxr-xr-xdeps/v8/tools/testrunner/num_fuzzer.py2
-rw-r--r--deps/v8/tools/testrunner/objects/predictable.py3
-rw-r--r--deps/v8/tools/testrunner/objects/testcase.py90
-rwxr-xr-xdeps/v8/tools/testrunner/standard_runner.py2
-rw-r--r--deps/v8/tools/testrunner/testproc/progress.py7
-rwxr-xr-xdeps/v8/tools/torque/format-torque.py61
-rw-r--r--deps/v8/tools/torque/vscode-torque/syntaxes/torque.tmLanguage.json4
-rwxr-xr-xdeps/v8/tools/try_perf.py2
-rw-r--r--deps/v8/tools/turbolizer/README.md4
-rw-r--r--deps/v8/tools/turbolizer/rollup.config.js5
-rw-r--r--deps/v8/tools/turbolizer/src/graphmultiview.ts5
-rw-r--r--deps/v8/tools/turbolizer/src/sequence-view.ts235
-rw-r--r--deps/v8/tools/turbolizer/src/source-resolver.ts13
-rw-r--r--deps/v8/tools/turbolizer/turbo-visualizer.css62
-rwxr-xr-xdeps/v8/tools/unittests/run_tests_test.py23
-rw-r--r--deps/v8/tools/unittests/testdata/expected_test_results1.json24
-rw-r--r--deps/v8/tools/unittests/testdata/testroot1/test/sweet/sweet.status1
-rw-r--r--deps/v8/tools/unittests/testdata/testroot1/test/sweet/testcfg.py8
-rwxr-xr-xdeps/v8/tools/v8_presubmit.py83
-rw-r--r--deps/v8/tools/v8heapconst.py463
-rw-r--r--deps/v8/tools/whitespace.txt4
50 files changed, 1747 insertions, 753 deletions
diff --git a/deps/v8/tools/BUILD.gn b/deps/v8/tools/BUILD.gn
index 05c382e2f6..3ae98078f1 100644
--- a/deps/v8/tools/BUILD.gn
+++ b/deps/v8/tools/BUILD.gn
@@ -30,11 +30,11 @@ group("v8_android_test_runner_deps") {
if (is_android && !build_with_chromium) {
data_deps = [
- "../build/android:test_runner_py",
+ "//build/android:test_runner_py",
]
data = [
# This is used by android.py, but not included by test_runner_py above.
- "../third_party/catapult/devil/devil/android/perf/",
+ "//third_party/catapult/devil/devil/android/perf/",
]
}
}
diff --git a/deps/v8/tools/bigint-tester.py b/deps/v8/tools/bigint-tester.py
index d48d2546f9..2deab883fa 100755
--- a/deps/v8/tools/bigint-tester.py
+++ b/deps/v8/tools/bigint-tester.py
@@ -30,8 +30,6 @@ TEST_HEADER = """\
// found in the LICENSE file.
// Generated by %s.
-
-// Flags: --harmony-bigint
""" % sys.argv[0]
TEST_BODY = """
@@ -109,7 +107,7 @@ class TestGenerator(object):
with open(path, "w") as f:
f.write(self.EmitData(count))
f.write(self.EmitTestBody())
- return subprocess.call("%s --harmony-bigint %s" % (binary, path),
+ return subprocess.call("%s %s" % (binary, path),
shell=True)
finally:
os.close(fd)
diff --git a/deps/v8/tools/blink_tests/TestExpectations b/deps/v8/tools/blink_tests/TestExpectations
index 3655c5c93a..e6cc3d274f 100644
--- a/deps/v8/tools/blink_tests/TestExpectations
+++ b/deps/v8/tools/blink_tests/TestExpectations
@@ -3,3 +3,5 @@
# Turn off Slimming Paint tests on linux.
[ Linux ] virtual/slimmingpaint/ [ Skip ]
+# Several failures since https://crrev.com/c/1196547
+crbug.com/879604 external/wpt/cookies/samesite/ [ Skip ]
diff --git a/deps/v8/tools/callstats.html b/deps/v8/tools/callstats.html
index 2618b50b71..2afd0602d8 100644
--- a/deps/v8/tools/callstats.html
+++ b/deps/v8/tools/callstats.html
@@ -1507,6 +1507,7 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
this.groups = [
this.total,
Group.groups.get('ic').entry(),
+ Group.groups.get('optimize-background').entry(),
Group.groups.get('optimize').entry(),
Group.groups.get('compile-background').entry(),
Group.groups.get('compile').entry(),
@@ -1715,14 +1716,16 @@ code is governed by a BSD-style license that can be found in the LICENSE file.
}
Group.add('total', new Group('Total', /.*Total.*/, '#BBB'));
Group.add('ic', new Group('IC', /.*IC_.*/, "#3366CC"));
+ Group.add('optimize-background', new Group('Optimize-Background',
+ /(.*OptimizeConcurrent.*)|RecompileConcurrent.*/, "#702000"));
Group.add('optimize', new Group('Optimize',
/StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*/, "#DC3912"));
Group.add('compile-background', new Group('Compile-Background',
- /(.*CompileBackground.*)/, "#b9a720"));
+ /(.*CompileBackground.*)/, "#b08000"));
Group.add('compile', new Group('Compile',
/(^Compile.*)|(.*_Compile.*)/, "#FFAA00"));
Group.add('parse-background',
- new Group('Parse-Background', /.*ParseBackground.*/, "#af744d"));
+ new Group('Parse-Background', /.*ParseBackground.*/, "#c05000"));
Group.add('parse', new Group('Parse', /.*Parse.*/, "#FF6600"));
Group.add('callback', new Group('Blink C++', /.*Callback.*/, "#109618"));
Group.add('api', new Group('API', /.*API.*/, "#990099"));
diff --git a/deps/v8/tools/callstats.py b/deps/v8/tools/callstats.py
index 4ee4e83c02..91f8637acd 100755
--- a/deps/v8/tools/callstats.py
+++ b/deps/v8/tools/callstats.py
@@ -180,7 +180,7 @@ def run_site(site, domain, args, timeout=None):
user_data_dir = args.user_data_dir
else:
user_data_dir = tempfile.mkdtemp(prefix="chr_")
- js_flags = "--runtime-call-stats --noconcurrent-recompilation"
+ js_flags = "--runtime-call-stats"
if args.replay_wpr: js_flags += " --allow-natives-syntax"
if args.js_flags: js_flags += " " + args.js_flags
chrome_flags = get_chrome_flags(js_flags, user_data_dir)
@@ -218,7 +218,7 @@ def run_site(site, domain, args, timeout=None):
# Abort after too many retries, no point in ever increasing the
# timeout.
print("TOO MANY EMPTY RESULTS ABORTING RUN")
- break
+ return
timeout += 2 ** retries_since_good_run
retries_since_good_run += 1
print("EMPTY RESULT, REPEATING RUN ({})".format(
@@ -240,6 +240,8 @@ def read_sites_file(args):
if item['timeout'] > args.timeout: item['timeout'] = args.timeout
sites.append(item)
except ValueError:
+ args.error("Warning: Could not read sites file as JSON, falling back to "
+ "primitive file")
with open(args.sites_file, "rt") as f:
for line in f:
line = line.strip()
@@ -349,11 +351,22 @@ def statistics(data):
'stddev': stddev, 'min': low, 'max': high, 'ci': ci }
+def add_category_total(entries, groups, category_prefix):
+ group_data = { 'time': 0, 'count': 0 }
+ for group_name, regexp in groups:
+ if not group_name.startswith('Group-' + category_prefix): continue
+ group_data['time'] += entries[group_name]['time']
+ group_data['count'] += entries[group_name]['count']
+ entries['Group-' + category_prefix + '-Total'] = group_data
+
+
def read_stats(path, domain, args):
groups = [];
if args.aggregate:
groups = [
('Group-IC', re.compile(".*IC_.*")),
+ ('Group-OptimizeBackground',
+ re.compile(".*OptimizeConcurrent.*|RecompileConcurrent.*")),
('Group-Optimize',
re.compile("StackGuard|.*Optimize.*|.*Deoptimize.*|Recompile.*")),
('Group-CompileBackground', re.compile("(.*CompileBackground.*)")),
@@ -405,20 +418,10 @@ def read_stats(path, domain, args):
group_data['time'] += entries[group_name]['time']
group_data['count'] += entries[group_name]['count']
entries['Group-Total-V8'] = group_data
- # Calculate the Parse-Total group
- group_data = { 'time': 0, 'count': 0 }
- for group_name, regexp in groups:
- if not group_name.startswith('Group-Parse'): continue
- group_data['time'] += entries[group_name]['time']
- group_data['count'] += entries[group_name]['count']
- entries['Group-Parse-Total'] = group_data
- # Calculate the Compile-Total group
- group_data = { 'time': 0, 'count': 0 }
- for group_name, regexp in groups:
- if not group_name.startswith('Group-Compile'): continue
- group_data['time'] += entries[group_name]['time']
- group_data['count'] += entries[group_name]['count']
- entries['Group-Compile-Total'] = group_data
+ # Calculate the Parse-Total, Compile-Total and Optimize-Total groups
+ add_category_total(entries, groups, 'Parse')
+ add_category_total(entries, groups, 'Compile')
+ add_category_total(entries, groups, 'Optimize')
# Append the sums as single entries to domain.
for key in entries:
if key not in domain: domain[key] = { 'time_list': [], 'count_list': [] }
@@ -651,7 +654,7 @@ def main():
"-l", "--log-stderr", type=str, metavar="<path>",
help="specify where chrome's stderr should go (default: /dev/null)")
subparser.add_argument(
- "sites", type=str, metavar="<URL>", nargs="*",
+ "--sites", type=str, metavar="<URL>", nargs="*",
help="specify benchmark website")
add_replay_args(subparsers["run"])
diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py
index 9bc1dd66d5..b98a92d266 100644
--- a/deps/v8/tools/gen-postmortem-metadata.py
+++ b/deps/v8/tools/gen-postmortem-metadata.py
@@ -193,9 +193,9 @@ consts_misc = [
'value': 'ScopeInfo::kVariablePartIndex' },
{ 'name': 'jsarray_buffer_was_neutered_mask',
- 'value': 'JSArrayBuffer::WasNeutered::kMask' },
+ 'value': 'JSArrayBuffer::WasNeuteredBit::kMask' },
{ 'name': 'jsarray_buffer_was_neutered_shift',
- 'value': 'JSArrayBuffer::WasNeutered::kShift' },
+ 'value': 'JSArrayBuffer::WasNeuteredBit::kShift' },
{ 'name': 'context_idx_scope_info',
'value': 'Context::SCOPE_INFO_INDEX' },
@@ -250,7 +250,9 @@ extras_accessors = [
'FixedArray, data, uintptr_t, kHeaderSize',
'FixedTypedArrayBase, external_pointer, Object, kExternalPointerOffset',
'JSArrayBuffer, backing_store, Object, kBackingStoreOffset',
- 'JSArrayBufferView, byte_offset, Object, kByteOffsetOffset',
+ 'JSArrayBuffer, byte_length, size_t, kByteLengthOffset',
+ 'JSArrayBufferView, byte_length, size_t, kByteLengthOffset',
+ 'JSArrayBufferView, byte_offset, size_t, kByteOffsetOffset',
'JSTypedArray, length, Object, kLengthOffset',
'Map, instance_size_in_words, char, kInstanceSizeInWordsOffset',
'Map, inobject_properties_start_or_constructor_function_index, char, kInObjectPropertiesStartOrConstructorFunctionIndexOffset',
@@ -275,6 +277,7 @@ extras_accessors = [
'SlicedString, parent, String, kParentOffset',
'Code, instruction_start, uintptr_t, kHeaderSize',
'Code, instruction_size, int, kInstructionSizeOffset',
+ 'String, length, int32_t, kLengthOffset',
];
#
diff --git a/deps/v8/tools/generate-header-include-checks.py b/deps/v8/tools/generate-header-include-checks.py
index ca3b0079ca..7ff52dd740 100755
--- a/deps/v8/tools/generate-header-include-checks.py
+++ b/deps/v8/tools/generate-header-include-checks.py
@@ -34,7 +34,6 @@ AUTO_EXCLUDE = [
'src/compiler/js-context-specialization.h',
'src/compiler/raw-machine-assembler.h',
'src/dateparser-inl.h',
- 'src/heap/incremental-marking.h',
'src/ic/ic.h',
'src/lookup.h',
'src/parsing/parser.h',
diff --git a/deps/v8/tools/grokdump.py b/deps/v8/tools/grokdump.py
index 60215857c0..34689316af 100755
--- a/deps/v8/tools/grokdump.py
+++ b/deps/v8/tools/grokdump.py
@@ -1715,9 +1715,9 @@ class V8Heap(object):
"EXTERNAL_SYMBOL_TYPE": ExternalString,
"EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString,
"EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString,
- "SHORT_EXTERNAL_SYMBOL_TYPE": ExternalString,
- "SHORT_EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString,
- "SHORT_EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString,
+ "UNCACHED_EXTERNAL_SYMBOL_TYPE": ExternalString,
+ "UNCACHED_EXTERNAL_SYMBOL_WITH_ONE_BYTE_DATA_TYPE": ExternalString,
+ "UNCACHED_EXTERNAL_ONE_BYTE_SYMBOL_TYPE": ExternalString,
"STRING_TYPE": SeqString,
"ONE_BYTE_STRING_TYPE": SeqString,
"CONS_STRING_TYPE": ConsString,
diff --git a/deps/v8/tools/heap-stats/categories.js b/deps/v8/tools/heap-stats/categories.js
index 4ede5e9a45..63b99aae7e 100644
--- a/deps/v8/tools/heap-stats/categories.js
+++ b/deps/v8/tools/heap-stats/categories.js
@@ -70,10 +70,10 @@ const CATEGORIES = new Map([
'ONE_BYTE_STRING_TYPE',
'OTHER_CONTEXT_TYPE',
'PROPERTY_ARRAY_TYPE',
- 'SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE',
- 'SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
- 'SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE',
- 'SHORT_EXTERNAL_STRING_TYPE',
+ 'UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE',
+ 'UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE',
+ 'UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE',
+ 'UNCACHED_EXTERNAL_STRING_TYPE',
'SLICED_ONE_BYTE_STRING_TYPE',
'SLICED_STRING_TYPE',
'STRING_EXTERNAL_RESOURCE_ONE_BYTE_TYPE',
diff --git a/deps/v8/tools/node/fetch_deps.py b/deps/v8/tools/node/fetch_deps.py
index 26b9d6a72f..332c6e2d7d 100755
--- a/deps/v8/tools/node/fetch_deps.py
+++ b/deps/v8/tools/node/fetch_deps.py
@@ -32,12 +32,15 @@ GCLIENT_SOLUTION = [
"v8/test/mozilla/data" : None,
"v8/test/test262/data" : None,
"v8/test/test262/harness" : None,
+ "v8/third_party/android_ndk" : None,
"v8/third_party/android_tools" : None,
"v8/third_party/catapult" : None,
"v8/third_party/colorama/src" : None,
+ "v8/third_party/fuchsia-sdk" : None,
"v8/third_party/instrumented_libraries" : None,
"v8/tools/luci-go" : None,
"v8/tools/swarming_client" : None,
+ "v8/third_party/qemu-linux-x64" : None,
},
},
]
diff --git a/deps/v8/tools/node/update_node.py b/deps/v8/tools/node/update_node.py
index 759e9d5aac..fb3c2a0aec 100755
--- a/deps/v8/tools/node/update_node.py
+++ b/deps/v8/tools/node/update_node.py
@@ -34,17 +34,12 @@ import node_common
TARGET_SUBDIR = os.path.join("deps", "v8")
SUB_REPOSITORIES = [ ["base", "trace_event", "common"],
- ["third_party", "googletest", "src"],
- ["third_party", "jinja2"],
- ["third_party", "markupsafe"] ]
+ ["third_party", "googletest", "src"] ]
DELETE_FROM_GITIGNORE = [ "/base",
- "/third_party/googletest/src",
- "/third_party/jinja2",
- "/third_party/markupsafe" ]
+ "/third_party/googletest/src" ]
# Node.js requires only a single header file from gtest to build V8.
-# Both jinja2 and markupsafe are required to generate part of the inspector.
ADD_TO_GITIGNORE = [ "/third_party/googletest/*",
"!/third_party/googletest/BUILD.gn",
"!/third_party/googletest/src",
@@ -55,9 +50,7 @@ ADD_TO_GITIGNORE = [ "/third_party/googletest/*",
"/third_party/googletest/src/googletest/include/*",
"!/third_party/googletest/src/googletest/include/gtest",
"/third_party/googletest/src/googletest/include/gtest/*",
- "!/third_party/googletest/src/googletest/include/gtest/gtest_prod.h",
- "!/third_party/jinja2",
- "!/third_party/markupsafe" ]
+ "!/third_party/googletest/src/googletest/include/gtest/gtest_prod.h" ]
# Node.js owns deps/v8/gypfiles in their downstream repository.
FILES_TO_KEEP = [ "gypfiles" ]
diff --git a/deps/v8/tools/perf-to-html.py b/deps/v8/tools/perf-to-html.py
deleted file mode 100755
index e3979360a7..0000000000
--- a/deps/v8/tools/perf-to-html.py
+++ /dev/null
@@ -1,381 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2015 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.
-'''
-python %prog
-
-Convert a perf trybot JSON file into a pleasing HTML page. It can read
-from standard input or via the --filename option. Examples:
-
- cat results.json | %prog --title "ia32 results"
- %prog -f results.json -t "ia32 results" -o results.html
-'''
-
-import json
-import math
-from optparse import OptionParser
-import os
-import shutil
-import sys
-import tempfile
-
-PERCENT_CONSIDERED_SIGNIFICANT = 0.5
-PROBABILITY_CONSIDERED_SIGNIFICANT = 0.02
-PROBABILITY_CONSIDERED_MEANINGLESS = 0.05
-
-
-def ComputeZ(baseline_avg, baseline_sigma, mean, n):
- if baseline_sigma == 0:
- return 1000.0;
- return abs((mean - baseline_avg) / (baseline_sigma / math.sqrt(n)))
-
-
-# Values from http://www.fourmilab.ch/rpkp/experiments/analysis/zCalc.html
-def ComputeProbability(z):
- if z > 2.575829: # p 0.005: two sided < 0.01
- return 0
- if z > 2.326348: # p 0.010
- return 0.01
- if z > 2.170091: # p 0.015
- return 0.02
- if z > 2.053749: # p 0.020
- return 0.03
- if z > 1.959964: # p 0.025: two sided < 0.05
- return 0.04
- if z > 1.880793: # p 0.030
- return 0.05
- if z > 1.811910: # p 0.035
- return 0.06
- if z > 1.750686: # p 0.040
- return 0.07
- if z > 1.695397: # p 0.045
- return 0.08
- if z > 1.644853: # p 0.050: two sided < 0.10
- return 0.09
- if z > 1.281551: # p 0.100: two sided < 0.20
- return 0.10
- return 0.20 # two sided p >= 0.20
-
-
-class Result:
- def __init__(self, test_name, count, hasScoreUnits, result, sigma,
- master_result, master_sigma):
- self.result_ = float(result)
- self.sigma_ = float(sigma)
- self.master_result_ = float(master_result)
- self.master_sigma_ = float(master_sigma)
- self.significant_ = False
- self.notable_ = 0
- self.percentage_string_ = ""
- # compute notability and significance.
- try:
- if hasScoreUnits:
- compare_num = 100*self.result_/self.master_result_ - 100
- else:
- compare_num = 100*self.master_result_/self.result_ - 100
- if abs(compare_num) > 0.1:
- self.percentage_string_ = "%3.1f" % (compare_num)
- z = ComputeZ(self.master_result_, self.master_sigma_, self.result_, count)
- p = ComputeProbability(z)
- if p < PROBABILITY_CONSIDERED_SIGNIFICANT:
- self.significant_ = True
- if compare_num >= PERCENT_CONSIDERED_SIGNIFICANT:
- self.notable_ = 1
- elif compare_num <= -PERCENT_CONSIDERED_SIGNIFICANT:
- self.notable_ = -1
- except ZeroDivisionError:
- self.percentage_string_ = "NaN"
- self.significant_ = True
-
- def result(self):
- return self.result_
-
- def sigma(self):
- return self.sigma_
-
- def master_result(self):
- return self.master_result_
-
- def master_sigma(self):
- return self.master_sigma_
-
- def percentage_string(self):
- return self.percentage_string_;
-
- def isSignificant(self):
- return self.significant_
-
- def isNotablyPositive(self):
- return self.notable_ > 0
-
- def isNotablyNegative(self):
- return self.notable_ < 0
-
-
-class Benchmark:
- def __init__(self, name, data):
- self.name_ = name
- self.tests_ = {}
- for test in data:
- # strip off "<name>/" prefix, allowing for subsequent "/"s
- test_name = test.split("/", 1)[1]
- self.appendResult(test_name, data[test])
-
- # tests is a dictionary of Results
- def tests(self):
- return self.tests_
-
- def SortedTestKeys(self):
- keys = self.tests_.keys()
- keys.sort()
- t = "Total"
- if t in keys:
- keys.remove(t)
- keys.append(t)
- return keys
-
- def name(self):
- return self.name_
-
- def appendResult(self, test_name, test_data):
- with_string = test_data["result with patch "]
- data = with_string.split()
- master_string = test_data["result without patch"]
- master_data = master_string.split()
- runs = int(test_data["runs"])
- units = test_data["units"]
- hasScoreUnits = units == "score"
- self.tests_[test_name] = Result(test_name,
- runs,
- hasScoreUnits,
- data[0], data[2],
- master_data[0], master_data[2])
-
-
-class BenchmarkRenderer:
- def __init__(self, output_file):
- self.print_output_ = []
- self.output_file_ = output_file
-
- def Print(self, str_data):
- self.print_output_.append(str_data)
-
- def FlushOutput(self):
- string_data = "\n".join(self.print_output_)
- print_output = []
- if self.output_file_:
- # create a file
- with open(self.output_file_, "w") as text_file:
- text_file.write(string_data)
- else:
- print(string_data)
-
- def RenderOneBenchmark(self, benchmark):
- self.Print("<h2>")
- self.Print("<a name=\"" + benchmark.name() + "\">")
- self.Print(benchmark.name() + "</a> <a href=\"#top\">(top)</a>")
- self.Print("</h2>");
- self.Print("<table class=\"benchmark\">")
- self.Print("<thead>")
- self.Print(" <th>Test</th>")
- self.Print(" <th>Result</th>")
- self.Print(" <th>Master</th>")
- self.Print(" <th>%</th>")
- self.Print("</thead>")
- self.Print("<tbody>")
- tests = benchmark.tests()
- for test in benchmark.SortedTestKeys():
- t = tests[test]
- self.Print(" <tr>")
- self.Print(" <td>" + test + "</td>")
- self.Print(" <td>" + str(t.result()) + "</td>")
- self.Print(" <td>" + str(t.master_result()) + "</td>")
- t = tests[test]
- res = t.percentage_string()
- if t.isSignificant():
- res = self.bold(res)
- if t.isNotablyPositive():
- res = self.green(res)
- elif t.isNotablyNegative():
- res = self.red(res)
- self.Print(" <td>" + res + "</td>")
- self.Print(" </tr>")
- self.Print("</tbody>")
- self.Print("</table>")
-
- def ProcessJSONData(self, data, title):
- self.Print("<h1>" + title + "</h1>")
- self.Print("<ul>")
- for benchmark in data:
- if benchmark != "errors":
- self.Print("<li><a href=\"#" + benchmark + "\">" + benchmark + "</a></li>")
- self.Print("</ul>")
- for benchmark in data:
- if benchmark != "errors":
- benchmark_object = Benchmark(benchmark, data[benchmark])
- self.RenderOneBenchmark(benchmark_object)
-
- def bold(self, data):
- return "<b>" + data + "</b>"
-
- def red(self, data):
- return "<font color=\"red\">" + data + "</font>"
-
-
- def green(self, data):
- return "<font color=\"green\">" + data + "</font>"
-
- def PrintHeader(self):
- data = """<html>
-<head>
-<title>Output</title>
-<style type="text/css">
-/*
-Style inspired by Andy Ferra's gist at https://gist.github.com/andyferra/2554919
-*/
-body {
- font-family: Helvetica, arial, sans-serif;
- font-size: 14px;
- line-height: 1.6;
- padding-top: 10px;
- padding-bottom: 10px;
- background-color: white;
- padding: 30px;
-}
-h1, h2, h3, h4, h5, h6 {
- margin: 20px 0 10px;
- padding: 0;
- font-weight: bold;
- -webkit-font-smoothing: antialiased;
- cursor: text;
- position: relative;
-}
-h1 {
- font-size: 28px;
- color: black;
-}
-
-h2 {
- font-size: 24px;
- border-bottom: 1px solid #cccccc;
- color: black;
-}
-
-h3 {
- font-size: 18px;
-}
-
-h4 {
- font-size: 16px;
-}
-
-h5 {
- font-size: 14px;
-}
-
-h6 {
- color: #777777;
- font-size: 14px;
-}
-
-p, blockquote, ul, ol, dl, li, table, pre {
- margin: 15px 0;
-}
-
-li p.first {
- display: inline-block;
-}
-
-ul, ol {
- padding-left: 30px;
-}
-
-ul :first-child, ol :first-child {
- margin-top: 0;
-}
-
-ul :last-child, ol :last-child {
- margin-bottom: 0;
-}
-
-table {
- padding: 0;
-}
-
-table tr {
- border-top: 1px solid #cccccc;
- background-color: white;
- margin: 0;
- padding: 0;
-}
-
-table tr:nth-child(2n) {
- background-color: #f8f8f8;
-}
-
-table tr th {
- font-weight: bold;
- border: 1px solid #cccccc;
- text-align: left;
- margin: 0;
- padding: 6px 13px;
-}
-table tr td {
- border: 1px solid #cccccc;
- text-align: left;
- margin: 0;
- padding: 6px 13px;
-}
-table tr th :first-child, table tr td :first-child {
- margin-top: 0;
-}
-table tr th :last-child, table tr td :last-child {
- margin-bottom: 0;
-}
-</style>
-</head>
-<body>
-"""
- self.Print(data)
-
- def PrintFooter(self):
- data = """</body>
-</html>
-"""
- self.Print(data)
-
-
-def Render(opts, args):
- if opts.filename:
- with open(opts.filename) as json_data:
- data = json.load(json_data)
- else:
- # load data from stdin
- data = json.load(sys.stdin)
-
- if opts.title:
- title = opts.title
- elif opts.filename:
- title = opts.filename
- else:
- title = "Benchmark results"
- renderer = BenchmarkRenderer(opts.output)
- renderer.PrintHeader()
- renderer.ProcessJSONData(data, title)
- renderer.PrintFooter()
- renderer.FlushOutput()
-
-
-if __name__ == '__main__':
- parser = OptionParser(usage=__doc__)
- parser.add_option("-f", "--filename", dest="filename",
- help="Specifies the filename for the JSON results "
- "rather than reading from stdin.")
- parser.add_option("-t", "--title", dest="title",
- help="Optional title of the web page.")
- parser.add_option("-o", "--output", dest="output",
- help="Write html output to this file rather than stdout.")
-
- (opts, args) = parser.parse_args()
- Render(opts, args)
diff --git a/deps/v8/tools/profile.js b/deps/v8/tools/profile.js
index 74b4b3bf66..ef362712fe 100644
--- a/deps/v8/tools/profile.js
+++ b/deps/v8/tools/profile.js
@@ -892,16 +892,24 @@ JsonProfile.prototype.addStaticCode = function(
JsonProfile.prototype.addCode = function(
kind, name, timestamp, start, size) {
+ let codeId = this.codeEntries_.length;
+ // Find out if we have a static code entry for the code. If yes, we will
+ // make sure it is written to the JSON file just once.
+ let staticEntry = this.codeMap_.findAddress(start);
+ if (staticEntry && staticEntry.entry.type === 'CPP') {
+ codeId = staticEntry.entry.codeId;
+ }
+
var entry = new CodeMap.CodeEntry(size, name, 'CODE');
this.codeMap_.addCode(start, entry);
- entry.codeId = this.codeEntries_.length;
- this.codeEntries_.push({
+ entry.codeId = codeId;
+ this.codeEntries_[codeId] = {
name : entry.name,
timestamp: timestamp,
type : entry.type,
kind : kind
- });
+ };
return entry;
};
@@ -975,7 +983,7 @@ JsonProfile.prototype.addSourcePositions = function(
if (!entry) return;
var codeId = entry.codeId;
- // Resolve the inlined fucntions list.
+ // Resolve the inlined functions list.
if (inlinedFunctions.length > 0) {
inlinedFunctions = inlinedFunctions.substring(1).split("S");
for (var i = 0; i < inlinedFunctions.length; i++) {
diff --git a/deps/v8/tools/profview/index.html b/deps/v8/tools/profview/index.html
index 957b6d04d6..8695a41e3a 100644
--- a/deps/v8/tools/profview/index.html
+++ b/deps/v8/tools/profview/index.html
@@ -22,7 +22,7 @@ found in the LICENSE file. -->
Chrome V8 profiling log processor
</h3>
-<input type="file" id="fileinput" />
+<input type="file" id="fileinput" /><div id="source-status"></div>
<br>
<hr>
@@ -59,6 +59,10 @@ found in the LICENSE file. -->
</table>
<div>
Current code object: <span id="timeline-currentCode"></span>
+ <button id="source-viewer-hide-button">Hide source</button>
+ </div>
+ <div>
+ <table id="source-viewer"> </table>
</div>
</div>
diff --git a/deps/v8/tools/profview/profile-utils.js b/deps/v8/tools/profview/profile-utils.js
index f5a85bed8d..4be55893dd 100644
--- a/deps/v8/tools/profview/profile-utils.js
+++ b/deps/v8/tools/profview/profile-utils.js
@@ -93,9 +93,10 @@ function codeEquals(code1, code2, allowDifferentKinds = false) {
function createNodeFromStackEntry(code, codeId, vmState) {
let name = code ? code.name : "UNKNOWN";
-
- return { name, codeId, type : resolveCodeKindAndVmState(code, vmState),
- children : [], ownTicks : 0, ticks : 0 };
+ let node = createEmptyNode(name);
+ node.codeId = codeId;
+ node.type = resolveCodeKindAndVmState(code, vmState);
+ return node;
}
function childIdFromCode(codeId, code) {
@@ -148,29 +149,30 @@ function findNextFrame(file, stack, stackPos, step, filter) {
}
function addOrUpdateChildNode(parent, file, stackIndex, stackPos, ascending) {
- let stack = file.ticks[stackIndex].s;
- let vmState = file.ticks[stackIndex].vm;
- let codeId = stack[stackPos];
- let code = codeId >= 0 ? file.code[codeId] : undefined;
if (stackPos === -1) {
// We reached the end without finding the next step.
// If we are doing top-down call tree, update own ticks.
if (!ascending) {
parent.ownTicks++;
}
- } else {
- console.assert(stackPos >= 0 && stackPos < stack.length);
- // We found a child node.
- let childId = childIdFromCode(codeId, code);
- let child = parent.children[childId];
- if (!child) {
- child = createNodeFromStackEntry(code, codeId, vmState);
- child.delayedExpansion = { frameList : [], ascending };
- parent.children[childId] = child;
- }
- child.ticks++;
- addFrameToFrameList(child.delayedExpansion.frameList, stackIndex, stackPos);
+ return;
+ }
+
+ let stack = file.ticks[stackIndex].s;
+ console.assert(stackPos >= 0 && stackPos < stack.length);
+ let codeId = stack[stackPos];
+ let code = codeId >= 0 ? file.code[codeId] : undefined;
+ // We found a child node.
+ let childId = childIdFromCode(codeId, code);
+ let child = parent.children[childId];
+ if (!child) {
+ let vmState = file.ticks[stackIndex].vm;
+ child = createNodeFromStackEntry(code, codeId, vmState);
+ child.delayedExpansion = { frameList : [], ascending };
+ parent.children[childId] = child;
}
+ child.ticks++;
+ addFrameToFrameList(child.delayedExpansion.frameList, stackIndex, stackPos);
}
// This expands a tree node (direct children only).
@@ -314,13 +316,7 @@ class FunctionListTree {
this.tree = root;
this.categories = categories;
} else {
- this.tree = {
- name : "root",
- codeId: -1,
- children : [],
- ownTicks : 0,
- ticks : 0
- };
+ this.tree = createEmptyNode("root");
this.categories = null;
}
@@ -339,7 +335,7 @@ class FunctionListTree {
let codeId = stack[i];
if (codeId < 0 || this.codeVisited[codeId]) continue;
- let code = codeId >= 0 ? file.code[codeId] : undefined;
+ let code = file.code[codeId];
if (this.filter) {
let type = code ? code.type : undefined;
let kind = code ? code.kind : undefined;
@@ -601,3 +597,15 @@ function computeOptimizationStats(file,
softDeoptimizations,
};
}
+
+function normalizeLeadingWhitespace(lines) {
+ let regex = /^\s*/;
+ let minimumLeadingWhitespaceChars = Infinity;
+ for (let line of lines) {
+ minimumLeadingWhitespaceChars =
+ Math.min(minimumLeadingWhitespaceChars, regex.exec(line)[0].length);
+ }
+ for (let i = 0; i < lines.length; i++) {
+ lines[i] = lines[i].substring(minimumLeadingWhitespaceChars);
+ }
+}
diff --git a/deps/v8/tools/profview/profview.css b/deps/v8/tools/profview/profview.css
index eb77ef14d8..ca39745f4b 100644
--- a/deps/v8/tools/profview/profview.css
+++ b/deps/v8/tools/profview/profview.css
@@ -19,6 +19,10 @@ body {
font-family: 'Roboto', sans-serif;
}
+#source-status {
+ display: inline-block;
+}
+
.tree-row-arrow {
margin-right: 0.2em;
text-align: right;
@@ -35,6 +39,7 @@ body {
.tree-row-name {
margin-left: 0.2em;
+ margin-right: 0.2em;
}
.codeid-link {
@@ -42,6 +47,54 @@ body {
cursor: pointer;
}
+.view-source-link {
+ text-decoration: underline;
+ cursor: pointer;
+ font-size: 10pt;
+ margin-left: 0.6em;
+ color: #555555;
+}
+
+#source-viewer {
+ border: 1px solid black;
+ padding: 0.2em;
+ font-family: 'Roboto Mono', monospace;
+ white-space: pre;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+#source-viewer td.line-none {
+ background-color: white;
+}
+
+#source-viewer td.line-cold {
+ background-color: #e1f5fe;
+}
+
+#source-viewer td.line-mediumcold {
+ background-color: #b2ebf2;
+}
+
+#source-viewer td.line-mediumhot {
+ background-color: #c5e1a5;
+}
+
+#source-viewer td.line-hot {
+ background-color: #dce775;
+}
+
+#source-viewer td.line-superhot {
+ background-color: #ffee58;
+}
+
+#source-viewer .source-line-number {
+ padding-left: 0.2em;
+ padding-right: 0.2em;
+ color: #003c8f;
+ background-color: #eceff1;
+}
+
div.mode-button {
padding: 1em 3em;
display: inline-block;
diff --git a/deps/v8/tools/profview/profview.js b/deps/v8/tools/profview/profview.js
index e976b00be3..5bd64a49bd 100644
--- a/deps/v8/tools/profview/profview.js
+++ b/deps/v8/tools/profview/profview.js
@@ -8,6 +8,12 @@ function $(id) {
return document.getElementById(id);
}
+function removeAllChildren(element) {
+ while (element.firstChild) {
+ element.removeChild(element.firstChild);
+ }
+}
+
let components;
function createViews() {
components = [
@@ -16,6 +22,7 @@ function createViews() {
new HelpView(),
new SummaryView(),
new ModeBarView(),
+ new ScriptSourceView(),
];
}
@@ -24,6 +31,7 @@ function emptyState() {
file : null,
mode : null,
currentCodeId : null,
+ viewingSource: false,
start : 0,
end : Infinity,
timelineSize : {
@@ -34,7 +42,8 @@ function emptyState() {
attribution : "js-exclude-bc",
categories : "code-type",
sort : "time"
- }
+ },
+ sourceData: null
};
}
@@ -119,11 +128,27 @@ let main = {
}
},
+ updateSources(file) {
+ let statusDiv = $("source-status");
+ if (!file) {
+ statusDiv.textContent = "";
+ return;
+ }
+ if (!file.scripts || file.scripts.length === 0) {
+ statusDiv.textContent =
+ "Script source not available. Run profiler with --log-source-code.";
+ return;
+ }
+ statusDiv.textContent = "Script source is available.";
+ main.currentState.sourceData = new SourceData(file);
+ },
+
setFile(file) {
if (file !== main.currentState.file) {
let lastMode = main.currentState.mode || "summary";
main.currentState = emptyState();
main.currentState.file = file;
+ main.updateSources(file);
main.setMode(lastMode);
main.delayRender();
}
@@ -137,6 +162,14 @@ let main = {
}
},
+ setViewingSource(value) {
+ if (main.currentState.viewingSource !== value) {
+ main.currentState = Object.assign({}, main.currentState);
+ main.currentState.viewingSource = value;
+ main.delayRender();
+ }
+ },
+
onResize() {
main.delayRender();
},
@@ -328,6 +361,20 @@ function createFunctionNode(name, codeId) {
return nameElement;
}
+function createViewSourceNode(codeId) {
+ let linkElement = document.createElement("span");
+ linkElement.appendChild(document.createTextNode("View source"));
+ linkElement.classList.add("view-source-link");
+ linkElement.onclick = (event) => {
+ main.setCurrentCode(codeId);
+ main.setViewingSource(true);
+ // Prevent the click from bubbling to the row and causing it to
+ // collapse/expand.
+ event.stopPropagation();
+ };
+ return linkElement;
+}
+
const COLLAPSED_ARROW = "\u25B6";
const EXPANDED_ARROW = "\u25BC";
@@ -448,6 +495,10 @@ class CallTreeView {
nameCell.appendChild(arrow);
nameCell.appendChild(createTypeNode(node.type));
nameCell.appendChild(createFunctionNode(node.name, node.codeId));
+ if (main.currentState.sourceData &&
+ main.currentState.sourceData.hasSource(node.name)) {
+ nameCell.appendChild(createViewSourceNode(node.codeId));
+ }
// Inclusive ticks cell.
c = row.insertCell();
@@ -793,8 +844,8 @@ class TimelineView {
return;
}
- let width = Math.round(window.innerWidth - 20);
- let height = Math.round(window.innerHeight / 5);
+ let width = Math.round(document.documentElement.clientWidth - 20);
+ let height = Math.round(document.documentElement.clientHeight / 5);
if (oldState) {
if (width === oldState.timelineSize.width &&
@@ -1010,9 +1061,7 @@ class TimelineView {
cell.appendChild(document.createTextNode(" " + desc.text));
}
- while (this.currentCode.firstChild) {
- this.currentCode.removeChild(this.currentCode.firstChild);
- }
+ removeAllChildren(this.currentCode);
if (currentCodeId) {
let currentCode = file.code[currentCodeId];
this.currentCode.appendChild(document.createTextNode(currentCode.name));
@@ -1083,10 +1132,7 @@ class SummaryView {
}
this.element.style.display = "inherit";
-
- while (this.element.firstChild) {
- this.element.removeChild(this.element.firstChild);
- }
+ removeAllChildren(this.element);
let stats = computeOptimizationStats(
this.currentState.file, newState.start, newState.end);
@@ -1237,6 +1283,217 @@ class SummaryView {
}
}
+class ScriptSourceView {
+ constructor() {
+ this.table = $("source-viewer");
+ this.hideButton = $("source-viewer-hide-button");
+ this.hideButton.onclick = () => {
+ main.setViewingSource(false);
+ };
+ }
+
+ render(newState) {
+ let oldState = this.currentState;
+ if (!newState.file || !newState.viewingSource) {
+ this.table.style.display = "none";
+ this.hideButton.style.display = "none";
+ this.currentState = null;
+ return;
+ }
+ if (oldState) {
+ if (newState.file === oldState.file &&
+ newState.currentCodeId === oldState.currentCodeId &&
+ newState.viewingSource === oldState.viewingSource) {
+ // No change, nothing to do.
+ return;
+ }
+ }
+ this.currentState = newState;
+
+ this.table.style.display = "inline-block";
+ this.hideButton.style.display = "inline";
+ removeAllChildren(this.table);
+
+ let functionId =
+ this.currentState.file.code[this.currentState.currentCodeId].func;
+ let sourceView =
+ this.currentState.sourceData.generateSourceView(functionId);
+ for (let i = 0; i < sourceView.source.length; i++) {
+ let sampleCount = sourceView.lineSampleCounts[i] || 0;
+ let sampleProportion = sourceView.samplesTotal > 0 ?
+ sampleCount / sourceView.samplesTotal : 0;
+ let heatBucket;
+ if (sampleProportion === 0) {
+ heatBucket = "line-none";
+ } else if (sampleProportion < 0.2) {
+ heatBucket = "line-cold";
+ } else if (sampleProportion < 0.4) {
+ heatBucket = "line-mediumcold";
+ } else if (sampleProportion < 0.6) {
+ heatBucket = "line-mediumhot";
+ } else if (sampleProportion < 0.8) {
+ heatBucket = "line-hot";
+ } else {
+ heatBucket = "line-superhot";
+ }
+
+ let row = this.table.insertRow(-1);
+
+ let lineNumberCell = row.insertCell(-1);
+ lineNumberCell.classList.add("source-line-number");
+ lineNumberCell.textContent = i + sourceView.firstLineNumber;
+
+ let sampleCountCell = row.insertCell(-1);
+ sampleCountCell.classList.add(heatBucket);
+ sampleCountCell.textContent = sampleCount;
+
+ let sourceLineCell = row.insertCell(-1);
+ sourceLineCell.classList.add(heatBucket);
+ sourceLineCell.textContent = sourceView.source[i];
+ }
+
+ $("timeline-currentCode").scrollIntoView();
+ }
+}
+
+class SourceData {
+ constructor(file) {
+ this.scripts = new Map();
+ for (let i = 0; i < file.scripts.length; i++) {
+ const scriptBlock = file.scripts[i];
+ if (scriptBlock === null) continue; // Array may be sparse.
+ let source = scriptBlock.source.split("\n");
+ this.scripts.set(i, source);
+ }
+
+ this.functions = new Map();
+ for (let codeId = 0; codeId < file.code.length; ++codeId) {
+ let codeBlock = file.code[codeId];
+ if (codeBlock.source) {
+ let data = this.functions.get(codeBlock.func);
+ if (!data) {
+ data = new FunctionSourceData(codeBlock.source.script,
+ codeBlock.source.start,
+ codeBlock.source.end);
+ this.functions.set(codeBlock.func, data);
+ }
+ data.addSourceBlock(codeId, codeBlock.source);
+ }
+ }
+
+ for (let tick of file.ticks) {
+ let stack = tick.s;
+ for (let i = 0; i < stack.length; i += 2) {
+ let codeId = stack[i];
+ if (codeId < 0) continue;
+ let functionid = file.code[codeId].func;
+ if (this.functions.has(functionId)) {
+ let codeOffset = stack[i + 1];
+ this.functions.get(functionId).addOffsetSample(codeId, codeOffset);
+ }
+ }
+ }
+ }
+
+ getScript(scriptId) {
+ return this.scripts.get(scriptId);
+ }
+
+ getLineForScriptOffset(script, scriptOffset) {
+ let line = 0;
+ let charsConsumed = 0;
+ for (; line < script.length; ++line) {
+ charsConsumed += script[line].length + 1; // Add 1 for newline.
+ if (charsConsumed > scriptOffset) break;
+ }
+ return line;
+ }
+
+ hasSource(functionId) {
+ return this.functions.has(functionId);
+ }
+
+ generateSourceView(functionId) {
+ console.assert(this.hasSource(functionId));
+ let data = this.functions.get(functionId);
+ let scriptId = data.scriptId;
+ let script = this.getScript(scriptId);
+ let firstLineNumber =
+ this.getLineForScriptOffset(script, data.startScriptOffset);
+ let lastLineNumber =
+ this.getLineForScriptOffset(script, data.endScriptOffset);
+ let lines = script.slice(firstLineNumber, lastLineNumber + 1);
+ normalizeLeadingWhitespace(lines);
+
+ let samplesTotal = 0;
+ let lineSampleCounts = [];
+ for (let [codeId, block] of data.codes) {
+ block.offsets.forEach((sampleCount, codeOffset) => {
+ let sourceOffset = block.positionTable.getScriptOffset(codeOffset);
+ let lineNumber =
+ this.getLineForScriptOffset(script, sourceOffset) - firstLineNumber;
+ samplesTotal += sampleCount;
+ lineSampleCounts[lineNumber] =
+ (lineSampleCounts[lineNumber] || 0) + sampleCount;
+ });
+ }
+
+ return {
+ source: lines,
+ lineSampleCounts: lineSampleCounts,
+ samplesTotal: samplesTotal,
+ firstLineNumber: firstLineNumber + 1 // Source code is 1-indexed.
+ };
+ }
+}
+
+class FunctionSourceData {
+ constructor(scriptId, startScriptOffset, endScriptOffset) {
+ this.scriptId = scriptId;
+ this.startScriptOffset = startScriptOffset;
+ this.endScriptOffset = endScriptOffset;
+
+ this.codes = new Map();
+ }
+
+ addSourceBlock(codeId, source) {
+ this.codes.set(codeId, {
+ positionTable: new SourcePositionTable(source.positions),
+ offsets: []
+ });
+ }
+
+ addOffsetSample(codeId, codeOffset) {
+ let codeIdOffsets = this.codes.get(codeId).offsets;
+ codeIdOffsets[codeOffset] = (codeIdOffsets[codeOffset] || 0) + 1;
+ }
+}
+
+class SourcePositionTable {
+ constructor(encodedTable) {
+ this.offsetTable = [];
+ let offsetPairRegex = /C([0-9]+)O([0-9]+)/g;
+ while (true) {
+ let regexResult = offsetPairRegex.exec(encodedTable);
+ if (!regexResult) break;
+ let codeOffset = parseInt(regexResult[1]);
+ let scriptOffset = parseInt(regexResult[2]);
+ if (isNaN(codeOffset) || isNaN(scriptOffset)) continue;
+ this.offsetTable.push(codeOffset, scriptOffset);
+ }
+ }
+
+ getScriptOffset(codeOffset) {
+ console.assert(codeOffset >= 0);
+ for (let i = this.offsetTable.length - 2; i >= 0; i -= 2) {
+ if (this.offsetTable[i] <= codeOffset) {
+ return this.offsetTable[i + 1];
+ }
+ }
+ return this.offsetTable[1];
+ }
+}
+
class HelpView {
constructor() {
this.element = $("help");
diff --git a/deps/v8/tools/release/create_release.py b/deps/v8/tools/release/create_release.py
index e5c2114b1a..ffa5c2a0ca 100755
--- a/deps/v8/tools/release/create_release.py
+++ b/deps/v8/tools/release/create_release.py
@@ -222,7 +222,7 @@ class LandBranch(Step):
self.GitUpload(author=self._options.author,
force=True,
bypass_hooks=True,
- private=True)
+ no_autocc=True)
cmd = "cl land --bypass-hooks -f"
if self._options.dry_run:
print "Dry run. Command:\ngit %s" % cmd
diff --git a/deps/v8/tools/release/filter_build_files.py b/deps/v8/tools/release/filter_build_files.py
index 7d3f22138a..9cc6607108 100755
--- a/deps/v8/tools/release/filter_build_files.py
+++ b/deps/v8/tools/release/filter_build_files.py
@@ -35,7 +35,7 @@ SUPPLEMENTARY_FILES = [
LIBRARY_FILES = {
'android': ['*.a', '*.so'],
'linux': ['*.a', '*.so'],
- 'mac': ['*.a', '*.so'],
+ 'mac': ['*.a', '*.so', '*.dylib'],
'win': ['*.lib', '*.dll'],
}
diff --git a/deps/v8/tools/release/git_recipes.py b/deps/v8/tools/release/git_recipes.py
index 9deaee891b..a002f4211c 100644
--- a/deps/v8/tools/release/git_recipes.py
+++ b/deps/v8/tools/release/git_recipes.py
@@ -206,8 +206,8 @@ class GitRecipesMixin(object):
self.Git(MakeArgs(args), **kwargs)
def GitUpload(self, reviewer="", author="", force=False, cq=False,
- cq_dry_run=False, bypass_hooks=False, cc="", private=False,
- tbr_reviewer="", **kwargs):
+ cq_dry_run=False, bypass_hooks=False, cc="", tbr_reviewer="",
+ no_autocc=False, **kwargs):
args = ["cl upload --send-mail"]
if author:
args += ["--email", Quoted(author)]
@@ -223,11 +223,11 @@ class GitRecipesMixin(object):
args.append("--cq-dry-run")
if bypass_hooks:
args.append("--bypass-hooks")
+ if no_autocc:
+ args.append("--no-autocc")
if cc:
args += ["--cc", Quoted(cc)]
args += ["--gerrit"]
- if private:
- args += ["--private"]
# TODO(machenbach): Check output in forced mode. Verify that all required
# base files were uploaded, if not retry.
self.Git(MakeArgs(args), pipe=False, **kwargs)
diff --git a/deps/v8/tools/release/test_scripts.py b/deps/v8/tools/release/test_scripts.py
index 565b2b7c8f..f3dc400e58 100755
--- a/deps/v8/tools/release/test_scripts.py
+++ b/deps/v8/tools/release/test_scripts.py
@@ -934,7 +934,7 @@ TBR=reviewer@chromium.org"""
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
cb=CheckVersionCommit),
Cmd("git cl upload --send-mail --email \"author@chromium.org\" "
- "-f --bypass-hooks --gerrit --private", ""),
+ "-f --bypass-hooks --no-autocc --gerrit", ""),
Cmd("git cl land --bypass-hooks -f", ""),
Cmd("git fetch", ""),
Cmd("git log -1 --format=%H --grep="
diff --git a/deps/v8/tools/run-clang-tidy.py b/deps/v8/tools/run-clang-tidy.py
new file mode 100755
index 0000000000..11826f19b1
--- /dev/null
+++ b/deps/v8/tools/run-clang-tidy.py
@@ -0,0 +1,420 @@
+#!/usr/bin/env python
+#
+# Copyright 2018 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 json
+import multiprocessing
+import optparse
+import os
+import re
+import subprocess
+import sys
+
+CLANG_TIDY_WARNING = re.compile(r'(\/.*?)\ .*\[(.*)\]$')
+CLANG_TIDY_CMDLINE_OUT = re.compile(r'^clang-tidy.*\ .*|^\./\.\*')
+FILE_REGEXS = ['../src/*', '../test/*']
+HEADER_REGEX = ['\.\.\/src\/.*|\.\.\/include\/.*|\.\.\/test\/.*']
+
+THREADS = multiprocessing.cpu_count()
+
+
+class ClangTidyWarning(object):
+ """
+ Wraps up a clang-tidy warning to present aggregated information.
+ """
+
+ def __init__(self, warning_type):
+ self.warning_type = warning_type
+ self.occurrences = set()
+
+ def add_occurrence(self, file_path):
+ self.occurrences.add(file_path.lstrip())
+
+ def __hash__(self):
+ return hash(self.warning_type)
+
+ def to_string(self, file_loc):
+ s = '[%s] #%d\n' % (self.warning_type, len(self.occurrences))
+ if file_loc:
+ s += ' ' + '\n '.join(self.occurrences)
+ s += '\n'
+ return s
+
+ def __str__(self):
+ return self.to_string(False)
+
+ def __lt__(self, other):
+ return len(self.occurrences) < len(other.occurrences)
+
+
+def GenerateCompileCommands(build_folder):
+ """
+ Generate a compilation database.
+
+ Currently clang-tidy-4 does not understand all flags that are passed
+ by the build system, therefore, we remove them from the generated file.
+ """
+ ninja_ps = subprocess.Popen(
+ ['ninja', '-t', 'compdb', 'cxx', 'cc'],
+ stdout=subprocess.PIPE,
+ cwd=build_folder)
+
+ out_filepath = os.path.join(build_folder, 'compile_commands.json')
+ with open(out_filepath, 'w') as cc_file:
+ while True:
+ line = ninja_ps.stdout.readline()
+
+ if line == '':
+ break
+
+ line = line.replace('-fcomplete-member-pointers', '')
+ line = line.replace('-Wno-enum-compare-switch', '')
+ line = line.replace('-Wno-ignored-pragma-optimize', '')
+ line = line.replace('-Wno-null-pointer-arithmetic', '')
+ line = line.replace('-Wno-unused-lambda-capture', '')
+ cc_file.write(line)
+
+
+def skip_line(line):
+ """
+ Check if a clang-tidy output line should be skipped.
+ """
+ return bool(CLANG_TIDY_CMDLINE_OUT.search(line))
+
+
+def ClangTidyRunFull(build_folder, skip_output_filter, checks, auto_fix):
+ """
+ Run clang-tidy on the full codebase and print warnings.
+ """
+ extra_args = []
+ if auto_fix:
+ extra_args.append('-fix')
+
+ if checks is not None:
+ extra_args.append('-checks')
+ extra_args.append('-*, ' + checks)
+
+ with open(os.devnull, 'w') as DEVNULL:
+ ct_process = subprocess.Popen(
+ ['run-clang-tidy', '-j' + str(THREADS), '-p', '.']
+ + ['-header-filter'] + HEADER_REGEX + extra_args
+ + FILE_REGEXS,
+ cwd=build_folder,
+ stdout=subprocess.PIPE,
+ stderr=DEVNULL)
+ removing_check_header = False
+ empty_lines = 0
+
+ while True:
+ line = ct_process.stdout.readline()
+ if line == '':
+ break
+
+ # Skip all lines after Enbale checks and before two newlines,
+ # i.e., skip clang-tidy check list.
+ if line.startswith('Enabled checks'):
+ removing_check_header = True
+ if removing_check_header and not skip_output_filter:
+ if line == '\n':
+ empty_lines += 1
+ if empty_lines == 2:
+ removing_check_header = False
+ continue
+
+ # Different lines get removed to ease output reading.
+ if not skip_output_filter and skip_line(line):
+ continue
+
+ # Print line, because no filter was matched.
+ if line != '\n':
+ sys.stdout.write(line)
+
+
+def ClangTidyRunAggregate(build_folder, print_files):
+ """
+ Run clang-tidy on the full codebase and aggregate warnings into categories.
+ """
+ with open(os.devnull, 'w') as DEVNULL:
+ ct_process = subprocess.Popen(
+ ['run-clang-tidy', '-j' + str(THREADS), '-p', '.'] +
+ ['-header-filter'] + HEADER_REGEX +
+ FILE_REGEXS,
+ cwd=build_folder,
+ stdout=subprocess.PIPE,
+ stderr=DEVNULL)
+ warnings = dict()
+ while True:
+ line = ct_process.stdout.readline()
+ if line == '':
+ break
+
+ res = CLANG_TIDY_WARNING.search(line)
+ if res is not None:
+ warnings.setdefault(
+ res.group(2),
+ ClangTidyWarning(res.group(2))).add_occurrence(res.group(1))
+
+ for warning in sorted(warnings.values(), reverse=True):
+ sys.stdout.write(warning.to_string(print_files))
+
+
+def ClangTidyRunDiff(build_folder, diff_branch, auto_fix):
+ """
+ Run clang-tidy on the diff between current and the diff_branch.
+ """
+ if diff_branch is None:
+ diff_branch = subprocess.check_output(['git', 'merge-base',
+ 'HEAD', 'origin/master']).strip()
+
+ git_ps = subprocess.Popen(
+ ['git', 'diff', '-U0', diff_branch], stdout=subprocess.PIPE)
+
+ extra_args = []
+ if auto_fix:
+ extra_args.append('-fix')
+
+ with open(os.devnull, 'w') as DEVNULL:
+ """
+ The script `clang-tidy-diff` does not provide support to add header-
+ filters. To still analyze headers we use the build path option `-path` to
+ inject out header-filter option. This works because the script just adds
+ the passed path string to the commandline of clang-tidy.
+ """
+ modified_build_folder = build_folder
+ modified_build_folder += ' -header-filter='
+ modified_build_folder += '\'' + ''.join(HEADER_REGEX) + '\''
+
+ ct_ps = subprocess.Popen(
+ ['clang-tidy-diff.py', '-path', modified_build_folder, '-p1'] +
+ extra_args,
+ stdin=git_ps.stdout,
+ stdout=subprocess.PIPE,
+ stderr=DEVNULL)
+ git_ps.wait()
+ while True:
+ line = ct_ps.stdout.readline()
+ if line == '':
+ break
+
+ if skip_line(line):
+ continue
+
+ sys.stdout.write(line)
+
+
+def rm_prefix(string, prefix):
+ """
+ Removes prefix from a string until the new string
+ no longer starts with the prefix.
+ """
+ while string.startswith(prefix):
+ string = string[len(prefix):]
+ return string
+
+
+def ClangTidyRunSingleFile(build_folder, filename_to_check, auto_fix,
+ line_ranges=[]):
+ """
+ Run clang-tidy on a single file.
+ """
+ files_with_relative_path = []
+
+ compdb_filepath = os.path.join(build_folder, 'compile_commands.json')
+ with open(compdb_filepath) as raw_json_file:
+ compdb = json.load(raw_json_file)
+
+ for db_entry in compdb:
+ if db_entry['file'].endswith(filename_to_check):
+ files_with_relative_path.append(db_entry['file'])
+
+ with open(os.devnull, 'w') as DEVNULL:
+ for file_with_relative_path in files_with_relative_path:
+ line_filter = None
+ if len(line_ranges) != 0:
+ line_filter = '['
+ line_filter += '{ \"lines\":[' + ', '.join(line_ranges)
+ line_filter += '], \"name\":\"'
+ line_filter += rm_prefix(file_with_relative_path,
+ '../') + '\"}'
+ line_filter += ']'
+
+ extra_args = ['-line-filter=' + line_filter] if line_filter else []
+
+ if auto_fix:
+ extra_args.append('-fix')
+
+ subprocess.call(['clang-tidy', '-p', '.'] +
+ extra_args +
+ [file_with_relative_path],
+ cwd=build_folder,
+ stderr=DEVNULL)
+
+
+def CheckClangTidy():
+ """
+ Checks if a clang-tidy binary exists.
+ """
+ with open(os.devnull, 'w') as DEVNULL:
+ return subprocess.call(['which', 'clang-tidy'], stdout=DEVNULL) == 0
+
+
+def CheckCompDB(build_folder):
+ """
+ Checks if a compilation database exists in the build_folder.
+ """
+ return os.path.isfile(os.path.join(build_folder, 'compile_commands.json'))
+
+
+def DetectBuildFolder():
+ """
+ Tries to auto detect the last used build folder in out/
+ """
+ outdirs_folder = 'out/'
+ last_used = None
+ last_timestamp = -1
+ for outdir in [outdirs_folder + folder_name
+ for folder_name in os.listdir(outdirs_folder)
+ if os.path.isdir(outdirs_folder + folder_name)]:
+ outdir_modified_timestamp = os.path.getmtime(outdir)
+ if outdir_modified_timestamp > last_timestamp:
+ last_timestamp = outdir_modified_timestamp
+ last_used = outdir
+
+ return last_used
+
+
+def GetOptions():
+ """
+ Generate the option parser for this script.
+ """
+ result = optparse.OptionParser()
+ result.add_option(
+ '-b',
+ '--build-folder',
+ help='Set V8 build folder',
+ dest='build_folder',
+ default=None)
+ result.add_option(
+ '-j',
+ help='Set the amount of threads that should be used',
+ dest='threads',
+ default=None)
+ result.add_option(
+ '--gen-compdb',
+ help='Generate a compilation database for clang-tidy',
+ default=False,
+ action='store_true')
+ result.add_option(
+ '--no-output-filter',
+ help='Done use any output filterning',
+ default=False,
+ action='store_true')
+ result.add_option(
+ '--fix',
+ help='Fix auto fixable issues',
+ default=False,
+ dest='auto_fix',
+ action='store_true'
+ )
+
+ # Full clang-tidy.
+ full_run_g = optparse.OptionGroup(result, 'Clang-tidy full', '')
+ full_run_g.add_option(
+ '--full',
+ help='Run clang-tidy on the whole codebase',
+ default=False,
+ action='store_true')
+ full_run_g.add_option('--checks',
+ help='Clang-tidy checks to use.',
+ default=None)
+ result.add_option_group(full_run_g)
+
+ # Aggregate clang-tidy.
+ agg_run_g = optparse.OptionGroup(result, 'Clang-tidy aggregate', '')
+ agg_run_g.add_option('--aggregate', help='Run clang-tidy on the whole '\
+ 'codebase and aggregate the warnings',
+ default=False, action='store_true')
+ agg_run_g.add_option('--show-loc', help='Show file locations when running '\
+ 'in aggregate mode', default=False,
+ action='store_true')
+ result.add_option_group(agg_run_g)
+
+ # Diff clang-tidy.
+ diff_run_g = optparse.OptionGroup(result, 'Clang-tidy diff', '')
+ diff_run_g.add_option('--branch', help='Run clang-tidy on the diff '\
+ 'between HEAD and the merge-base between HEAD '\
+ 'and DIFF_BRANCH (origin/master by default).',
+ default=None, dest='diff_branch')
+ result.add_option_group(diff_run_g)
+
+ # Single clang-tidy.
+ single_run_g = optparse.OptionGroup(result, 'Clang-tidy single', '')
+ single_run_g.add_option(
+ '--single', help='', default=False, action='store_true')
+ single_run_g.add_option(
+ '--file', help='File name to check', default=None, dest='file_name')
+ single_run_g.add_option('--lines', help='Limit checks to a line range. '\
+ 'For example: --lines="[2,4], [5,6]"',
+ default=[], dest='line_ranges')
+
+ result.add_option_group(single_run_g)
+ return result
+
+
+def main():
+ parser = GetOptions()
+ (options, _) = parser.parse_args()
+
+ if options.threads is not None:
+ global THREADS
+ THREADS = options.threads
+
+ if options.build_folder is None:
+ options.build_folder = DetectBuildFolder()
+
+ if not CheckClangTidy():
+ print 'Could not find clang-tidy'
+ elif options.build_folder is None or not os.path.isdir(options.build_folder):
+ print 'Please provide a build folder with -b'
+ elif options.gen_compdb:
+ GenerateCompileCommands(options.build_folder)
+ elif not CheckCompDB(options.build_folder):
+ print 'Could not find compilation database, ' \
+ 'please generate it with --gen-compdb'
+ else:
+ print 'Using build folder:', options.build_folder
+ if options.full:
+ print 'Running clang-tidy - full'
+ ClangTidyRunFull(options.build_folder,
+ options.no_output_filter,
+ options.checks,
+ options.auto_fix)
+ elif options.aggregate:
+ print 'Running clang-tidy - aggregating warnings'
+ if options.auto_fix:
+ print 'Auto fix not working in aggregate mode, running without.'
+ ClangTidyRunAggregate(options.build_folder, options.show_loc)
+ elif options.single:
+ print 'Running clang-tidy - single on ' + options.file_name
+ if options.file_name is not None:
+ line_ranges = []
+ for match in re.findall(r'(\[.*?\])', options.line_ranges):
+ if match is not []:
+ line_ranges.append(match)
+ ClangTidyRunSingleFile(options.build_folder,
+ options.file_name,
+ options.auto_fix,
+ line_ranges)
+ else:
+ print 'Filename provided, please specify a filename with --file'
+ else:
+ print 'Running clang-tidy'
+ ClangTidyRunDiff(options.build_folder,
+ options.diff_branch,
+ options.auto_fix)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/deps/v8/tools/run_perf.py b/deps/v8/tools/run_perf.py
index 310bd8a008..67861db3ea 100755
--- a/deps/v8/tools/run_perf.py
+++ b/deps/v8/tools/run_perf.py
@@ -780,7 +780,9 @@ class AndroidPlatform(Platform): # pragma: no cover
except android.CommandFailedException as e:
logging.info(title % "Stdout" + "\n%s", e.output)
raise
- except android.TimeoutException:
+ except android.TimeoutException as e:
+ if e.output:
+ logging.info(title % "Stdout" + "\n%s", e.output)
logging.warning(">>> Test timed out after %ss.", runnable.timeout)
stdout = ""
if runnable.process_size:
diff --git a/deps/v8/tools/sanitizers/tsan_suppressions.txt b/deps/v8/tools/sanitizers/tsan_suppressions.txt
index 270340e484..839636c8ce 100644
--- a/deps/v8/tools/sanitizers/tsan_suppressions.txt
+++ b/deps/v8/tools/sanitizers/tsan_suppressions.txt
@@ -4,3 +4,7 @@
# Incorrectly detected lock cycles in test-lockers
# https://code.google.com/p/thread-sanitizer/issues/detail?id=81
deadlock:LockAndUnlockDifferentIsolatesThread::Run
+
+# Data race in a third party lib
+# https://bugs.chromium.org/p/v8/issues/detail?id=8110
+race:IndianCalendar::fgSystemDefaultCenturyStartYear
diff --git a/deps/v8/tools/test262-results-parser.js b/deps/v8/tools/test262-results-parser.js
new file mode 100644
index 0000000000..379436e3f0
--- /dev/null
+++ b/deps/v8/tools/test262-results-parser.js
@@ -0,0 +1,41 @@
+// Copyright 2016 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.
+//
+// Run the test runner and dump a json file. Use this script to pass
+// the json file and return a list of failing tests that can be copied
+// to test262.status.
+//
+// Usage:
+//
+// Run the test runner to generate the results:
+// $ tools/run-tests.py --gn test262 --json-test-results=tools/.test262-results.json
+//
+// Run this script to print the formatted results:
+// $ node tools/test262-results-parser.js .test262-results.json
+//
+// Note: The json results file generated by the test runner should be
+// in the tools/ directly, which is the same dir as this script.
+
+var fs = require('fs'),
+ path = require('path');
+
+function main() {
+ if (process.argv.length === 2) {
+ throw new Error('File name required as first arg.');
+ }
+
+ var fileName = process.argv[2],
+ fullPath = path.join(__dirname, fileName),
+ results = require(fullPath)[0].results,
+ tests = new Set();
+ for (let result of results) {
+ let [_, ...test] = result.name.split('/');
+ tests.add(` '${test.join('/')}': [FAIL],`);
+ }
+
+
+ [...tests].sort().forEach(i => console.log(i));
+}
+
+main();
diff --git a/deps/v8/tools/testrunner/base_runner.py b/deps/v8/tools/testrunner/base_runner.py
index 481cc10134..fcb2202f8a 100644
--- a/deps/v8/tools/testrunner/base_runner.py
+++ b/deps/v8/tools/testrunner/base_runner.py
@@ -73,13 +73,12 @@ TEST_MAP = {
],
# This needs to stay in sync with test/d8_default.isolate.
"d8_default": [
- # TODO(machenbach): uncomment after infra side lands.
- #"debugger",
+ "debugger",
"mjsunit",
"webkit",
- #"message",
- #"preparser",
- #"intl",
+ "message",
+ "preparser",
+ "intl",
],
# This needs to stay in sync with test/optimize_for_size.isolate.
"optimize_for_size": [
@@ -312,6 +311,9 @@ class BaseTestRunner(object):
parser.add_option("--junitout", help="File name of the JUnit output")
parser.add_option("--junittestsuite", default="v8tests",
help="The testsuite name in the JUnit output file")
+ parser.add_option("--exit-after-n-failures", type="int", default=100,
+ help="Exit after the first N failures instead of "
+ "running all tests. Pass 0 to disable this feature.")
# Rerun
parser.add_option("--rerun-failures-count", default=0, type=int,
@@ -745,6 +747,9 @@ class BaseTestRunner(object):
self.mode_options.execution_mode))
return procs
+ def _create_result_tracker(self, options):
+ return progress.ResultsTracker(options.exit_after_n_failures)
+
def _create_timeout_proc(self, options):
if not options.total_timeout_sec:
return None
diff --git a/deps/v8/tools/testrunner/local/android.py b/deps/v8/tools/testrunner/local/android.py
index fb25bb5a17..707614f095 100644
--- a/deps/v8/tools/testrunner/local/android.py
+++ b/deps/v8/tools/testrunner/local/android.py
@@ -18,8 +18,9 @@ DEVICE_DIR = '/data/local/tmp/v8/'
class TimeoutException(Exception):
- def __init__(self, timeout):
+ def __init__(self, timeout, output=None):
self.timeout = timeout
+ self.output = output
class CommandFailedException(Exception):
@@ -170,8 +171,8 @@ class _Driver(object):
return '\n'.join(output)
except device_errors.AdbCommandFailedError as e:
raise CommandFailedException(e.status, e.output)
- except device_errors.CommandTimeoutError:
- raise TimeoutException(timeout)
+ except device_errors.CommandTimeoutError as e:
+ raise TimeoutException(timeout, e.output)
if logcat_file:
diff --git a/deps/v8/tools/testrunner/local/command.py b/deps/v8/tools/testrunner/local/command.py
index 302d568e87..d176323d02 100644
--- a/deps/v8/tools/testrunner/local/command.py
+++ b/deps/v8/tools/testrunner/local/command.py
@@ -211,7 +211,7 @@ class AndroidCommand(BaseCommand):
"""
self.shell_name = os.path.basename(shell)
self.shell_dir = os.path.dirname(shell)
- self.files_to_push = resources_func()
+ self.files_to_push = (resources_func or (lambda: []))()
# Make all paths in arguments relative and also prepare files from arguments
# for pushing to the device.
diff --git a/deps/v8/tools/testrunner/local/pool.py b/deps/v8/tools/testrunner/local/pool.py
index 7c9a250bc3..9735f8ea66 100644
--- a/deps/v8/tools/testrunner/local/pool.py
+++ b/deps/v8/tools/testrunner/local/pool.py
@@ -26,6 +26,9 @@ def setup_testing():
from threading import Thread as Process
# Monkeypatch threading Queue to look like multiprocessing Queue.
Queue.cancel_join_thread = lambda self: None
+ # Monkeypatch os.kill and add fake pid property on Thread.
+ os.kill = lambda *args: None
+ Process.pid = property(lambda self: None)
class NormalResult():
diff --git a/deps/v8/tools/testrunner/num_fuzzer.py b/deps/v8/tools/testrunner/num_fuzzer.py
index b55dd2102d..3b76541604 100755
--- a/deps/v8/tools/testrunner/num_fuzzer.py
+++ b/deps/v8/tools/testrunner/num_fuzzer.py
@@ -138,7 +138,7 @@ class NumFuzzer(base_runner.BaseTestRunner):
fuzzer_rng = random.Random(options.fuzzer_random_seed)
combiner = self._create_combiner(fuzzer_rng, options)
- results = ResultsTracker()
+ results = self._create_result_tracker(options)
execproc = ExecutionProc(options.j)
sigproc = self._create_signal_proc()
indicators = self._create_progress_indicators(options)
diff --git a/deps/v8/tools/testrunner/objects/predictable.py b/deps/v8/tools/testrunner/objects/predictable.py
index 48279d625c..52d14ea460 100644
--- a/deps/v8/tools/testrunner/objects/predictable.py
+++ b/deps/v8/tools/testrunner/objects/predictable.py
@@ -45,5 +45,4 @@ class OutProc(outproc_base.BaseOutProc):
class PredictableFilterProc(testproc_base.TestProcFilter):
def _filter(self, test):
- return (statusfile.FAIL in test.expected_outcomes or
- test.output_proc.negative)
+ return test.skip_predictable()
diff --git a/deps/v8/tools/testrunner/objects/testcase.py b/deps/v8/tools/testrunner/objects/testcase.py
index 7416590dd0..de8bc561eb 100644
--- a/deps/v8/tools/testrunner/objects/testcase.py
+++ b/deps/v8/tools/testrunner/objects/testcase.py
@@ -37,6 +37,21 @@ from ..local import utils
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
+# Patterns for additional resource files on Android. Files that are not covered
+# by one of the other patterns below will be specified in the resources section.
+RESOURCES_PATTERN = re.compile(r"//\s+Resources:(.*)")
+# Pattern to auto-detect files to push on Android for statements like:
+# load("path/to/file.js")
+LOAD_PATTERN = re.compile(
+ r"(?:load|readbuffer|read)\((?:'|\")([^'\"]*)(?:'|\")\)")
+# Pattern to auto-detect files to push on Android for statements like:
+# import "path/to/file.js"
+MODULE_RESOURCES_PATTERN_1 = re.compile(
+ r"(?:import|export)(?:\(| )(?:'|\")([^'\"]*)(?:'|\")")
+# Pattern to auto-detect files to push on Android for statements like:
+# import foobar from "path/to/file.js"
+MODULE_RESOURCES_PATTERN_2 = re.compile(
+ r"(?:import|export).*from (?:'|\")([^'\"]*)(?:'|\")")
class TestCase(object):
@@ -143,7 +158,10 @@ class TestCase(object):
def get_command(self):
params = self._get_cmd_params()
env = self._get_cmd_env()
- shell, shell_flags = self._get_shell_with_flags()
+ shell = self.get_shell()
+ if utils.IsWindows():
+ shell += '.exe'
+ shell_flags = self._get_shell_flags()
timeout = self._get_timeout(params)
return self._create_cmd(shell, shell_flags + params, env, timeout)
@@ -207,14 +225,8 @@ class TestCase(object):
def _get_suite_flags(self):
return []
- def _get_shell_with_flags(self):
- shell = self.get_shell()
- shell_flags = []
- if shell == 'd8':
- shell_flags.append('--test')
- if utils.IsWindows():
- shell += '.exe'
- return shell, shell_flags
+ def _get_shell_flags(self):
+ return []
def _get_timeout(self, params):
timeout = self._test_config.timeout
@@ -228,7 +240,7 @@ class TestCase(object):
return timeout
def get_shell(self):
- return 'd8'
+ raise NotImplementedError()
def _get_suffix(self):
return '.js'
@@ -269,6 +281,10 @@ class TestCase(object):
"""
return []
+ def skip_predictable(self):
+ """Returns True if the test case is not suitable for predictable testing."""
+ return True
+
@property
def output_proc(self):
if self.expected_outcomes is outproc.OUTCOMES_PASS:
@@ -285,3 +301,57 @@ class TestCase(object):
def __str__(self):
return self.suite.name + '/' + self.name
+
+
+class D8TestCase(TestCase):
+ def get_shell(self):
+ return "d8"
+
+ def _get_shell_flags(self):
+ return ['--test']
+
+ def _get_resources_for_file(self, file):
+ """Returns for a given file a list of absolute paths of files needed by the
+ given file.
+ """
+ with open(file) as f:
+ source = f.read()
+ result = []
+ def add_path(path):
+ result.append(os.path.abspath(path.replace('/', os.path.sep)))
+ for match in RESOURCES_PATTERN.finditer(source):
+ # There are several resources per line. Relative to base dir.
+ for path in match.group(1).strip().split():
+ add_path(path)
+ for match in LOAD_PATTERN.finditer(source):
+ # Files in load statements are relative to base dir.
+ add_path(match.group(1))
+ for match in MODULE_RESOURCES_PATTERN_1.finditer(source):
+ # Imported files are relative to the file importing them.
+ add_path(os.path.join(os.path.dirname(file), match.group(1)))
+ for match in MODULE_RESOURCES_PATTERN_2.finditer(source):
+ # Imported files are relative to the file importing them.
+ add_path(os.path.join(os.path.dirname(file), match.group(1)))
+ return result
+
+ def _get_resources(self):
+ """Returns the list of files needed by a test case."""
+ if not self._get_source_path():
+ return []
+ result = set()
+ to_check = [self._get_source_path()]
+ # Recurse over all files until reaching a fixpoint.
+ while to_check:
+ next_resource = to_check.pop()
+ result.add(next_resource)
+ for resource in self._get_resources_for_file(next_resource):
+ # Only add files that exist on disc. The pattens we check for give some
+ # false positives otherwise.
+ if resource not in result and os.path.exists(resource):
+ to_check.append(resource)
+ return sorted(list(result))
+
+ def skip_predictable(self):
+ """Returns True if the test case is not suitable for predictable testing."""
+ return (statusfile.FAIL in self.expected_outcomes or
+ self.output_proc.negative)
diff --git a/deps/v8/tools/testrunner/standard_runner.py b/deps/v8/tools/testrunner/standard_runner.py
index bd5df9b482..bf7d3f133d 100755
--- a/deps/v8/tools/testrunner/standard_runner.py
+++ b/deps/v8/tools/testrunner/standard_runner.py
@@ -282,7 +282,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
print '>>> Running with test processors'
loader = LoadProc()
tests_counter = TestsCounter()
- results = ResultsTracker()
+ results = self._create_result_tracker(options)
indicators = self._create_progress_indicators(options)
outproc_factory = None
diff --git a/deps/v8/tools/testrunner/testproc/progress.py b/deps/v8/tools/testrunner/testproc/progress.py
index 221c64bfdd..50b7307e1c 100644
--- a/deps/v8/tools/testrunner/testproc/progress.py
+++ b/deps/v8/tools/testrunner/testproc/progress.py
@@ -32,13 +32,15 @@ class TestsCounter(base.TestProcObserver):
class ResultsTracker(base.TestProcObserver):
- def __init__(self):
+ """Tracks number of results and stops to run tests if max_failures reached."""
+ def __init__(self, max_failures):
super(ResultsTracker, self).__init__()
self._requirement = base.DROP_OUTPUT
self.failed = 0
self.remaining = 0
self.total = 0
+ self.max_failures = max_failures
def _on_next_test(self, test):
self.total += 1
@@ -48,6 +50,9 @@ class ResultsTracker(base.TestProcObserver):
self.remaining -= 1
if result.has_unexpected_output:
self.failed += 1
+ if self.max_failures and self.failed >= self.max_failures:
+ print '>>> Too many failures, exiting...'
+ self.stop()
class ProgressIndicator(base.TestProcObserver):
diff --git a/deps/v8/tools/torque/format-torque.py b/deps/v8/tools/torque/format-torque.py
index 3470d2f3c3..aac432ef41 100755
--- a/deps/v8/tools/torque/format-torque.py
+++ b/deps/v8/tools/torque/format-torque.py
@@ -11,24 +11,77 @@ import sys
import re
from subprocess import Popen, PIPE
+def preprocess(input):
+ input = re.sub(r'(if\s+)constexpr(\s*\()', r'\1/*COxp*/\2', input)
+ input = re.sub(r'(\)\s*\:\s*\S+\s+)labels\s+',
+ r'\1,\n/*_LABELS_HOLD_*/ ', input)
+ input = re.sub(r'(\s+)operator\s*(\'[^\']+\')', r'\1/*_OPE \2*/', input)
+ input = re.sub(r'(\s+)typeswitch\s*\(', r'\1/*_TYPE*/switch (', input)
+ input = re.sub(r'(\s+)case\s*\(([^\s]+)\s+\:\s*([^\:]+)\)(\s*)\:',
+ r'\1case \3: /*_TSV\2:*/', input)
+ input = re.sub(r'(\s+)case\s*\(([^\:]+)\)(\s*)\:',
+ r'\1case \2: /*_TSX*/', input)
+ input = re.sub(r'\sgenerates\s+\'([^\']+)\'\s*',
+ r' _GeNeRaTeS00_/*\1@*/', input)
+ input = re.sub(r'\sconstexpr\s+\'([^\']+)\'\s*',
+ r' _CoNsExP_/*\1@*/', input)
+ input = re.sub(r'\notherwise',
+ r'\n otherwise', input)
+ input = re.sub(r'(\n\s*\S[^\n]*\s)otherwise',
+ r'\1_OtheSaLi', input)
+ return input
+
+def postprocess(output):
+ output = re.sub(r'\/\*COxp\*\/', r'constexpr', output)
+ output = re.sub(r'(\S+)\s*: type([,>])', r'\1: type\2', output)
+ output = re.sub(r',([\n ]*)\/\*_LABELS_HOLD_\*\/', r'\1labels', output)
+ output = re.sub(r'\/\*_OPE \'([^\']+)\'\*\/', r"operator '\1'", output)
+ output = re.sub(r'\/\*_TYPE\*\/(\s*)switch', r'typeswitch', output)
+ output = re.sub(r'case ([^\:]+)\:\s*\/\*_TSX\*\/',
+ r'case (\1):', output)
+ output = re.sub(r'case ([^\:]+)\:\s*\/\*_TSV([^\:]+)\:\*\/',
+ r'case (\2: \1):', output)
+ output = re.sub(r'\n_GeNeRaTeS00_\s*\/\*([^@]+)@\*\/',
+ r"\n generates '\1'", output)
+ output = re.sub(r'_GeNeRaTeS00_\s*\/\*([^@]+)@\*\/',
+ r"generates '\1'", output)
+ output = re.sub(r'_CoNsExP_\s*\/\*([^@]+)@\*\/',
+ r"constexpr '\1'", output)
+ output = re.sub(r'\n(\s+)otherwise',
+ r"\n\1 otherwise", output)
+ output = re.sub(r'\n(\s+)_OtheSaLi',
+ r"\n\1otherwise", output)
+ output = re.sub(r'_OtheSaLi',
+ r"otherwise", output)
+ return output
+
if len(sys.argv) < 2 or len(sys.argv) > 3:
print "invalid number of arguments"
sys.exit(-1)
use_stdout = True
-if len(sys.argv) == 3 and sys.argv[1] == '-i':
- use_stdout = False
+lint = False
+if len(sys.argv) == 3:
+ if sys.argv[1] == '-i':
+ use_stdout = False
+ if sys.argv[1] == '-l':
+ lint = True
filename = sys.argv[len(sys.argv) - 1]
with open(filename, 'r') as content_file:
content = content_file.read()
+original_input = content
p = Popen(['clang-format', '-assume-filename=.ts'], stdin=PIPE, stdout=PIPE, stderr=PIPE)
-output, err = p.communicate(content)
+output, err = p.communicate(preprocess(content))
+output = postprocess(output)
rc = p.returncode
if (rc <> 0):
sys.exit(rc);
-if use_stdout:
+if lint:
+ if (output != original_input):
+ print >>sys.stderr, filename + ' requires formatting'
+elif use_stdout:
print output
else:
output_file = open(filename, 'w')
diff --git a/deps/v8/tools/torque/vscode-torque/syntaxes/torque.tmLanguage.json b/deps/v8/tools/torque/vscode-torque/syntaxes/torque.tmLanguage.json
index ece8527c2d..d1d43e5dcb 100644
--- a/deps/v8/tools/torque/vscode-torque/syntaxes/torque.tmLanguage.json
+++ b/deps/v8/tools/torque/vscode-torque/syntaxes/torque.tmLanguage.json
@@ -30,7 +30,7 @@
},
{
"name": "support.function.torque",
- "match": "\\b(min|max|assert|check|debug|unreachable)\\b"
+ "match": "\\b(assert|check|debug|unreachable|Cast|Convert|FromConstexpr|UnsafeCast)\\b"
},
{
"name": "support.variable.torque",
@@ -65,7 +65,7 @@
},
{
"name": "keyword.other.torque",
- "match": "\\b(constexpr|module|macro|builtin|runtime|javascript|implicit|deferred|cast|convert|label|labels|tail|isnt|is|let|generates|type|extends|extern|const)\\b"
+ "match": "\\b(constexpr|module|macro|builtin|runtime|javascript|implicit|deferred|label|labels|tail|let|generates|type|extends|extern|const|typeswitch|case)\\b"
},
{
"name": "keyword.operator.torque",
diff --git a/deps/v8/tools/try_perf.py b/deps/v8/tools/try_perf.py
index 58035efcc0..c6dc394389 100755
--- a/deps/v8/tools/try_perf.py
+++ b/deps/v8/tools/try_perf.py
@@ -18,6 +18,7 @@ BOTS = {
'--nexus7': 'v8_nexus7_perf_try',
'--nexus10': 'v8_nexus10_perf_try',
'--pixel2': 'v8_pixel2_perf_try',
+ '--nokia1': 'v8_nokia1_perf_try',
}
# This list will contain builder names that should be triggered on an internal
@@ -25,6 +26,7 @@ BOTS = {
SWARMING_BOTS = [
'v8_linux64_perf_try',
'v8_pixel2_perf_try',
+ 'v8_nokia1_perf_try',
]
DEFAULT_BOTS = [
diff --git a/deps/v8/tools/turbolizer/README.md b/deps/v8/tools/turbolizer/README.md
index 01d5099c3e..293f4a20a6 100644
--- a/deps/v8/tools/turbolizer/README.md
+++ b/deps/v8/tools/turbolizer/README.md
@@ -10,8 +10,8 @@ the '--trace-turbo' command-line flag.
Turbolizer is build using npm:
- npm i
- npm run-script build
+ npm i
+ npm run-script build
Afterwards, turbolizer can be hosted locally by starting a web server that serve
the contents of the turbolizer directory, e.g.:
diff --git a/deps/v8/tools/turbolizer/rollup.config.js b/deps/v8/tools/turbolizer/rollup.config.js
index 844e6e186d..bb34555a7d 100644
--- a/deps/v8/tools/turbolizer/rollup.config.js
+++ b/deps/v8/tools/turbolizer/rollup.config.js
@@ -6,8 +6,7 @@ import typescript from 'rollup-plugin-typescript2';
import node from 'rollup-plugin-node-resolve';
export default {
- entry: "src/turbo-visualizer.ts",
- format: "iife",
+ input: "src/turbo-visualizer.ts",
plugins: [node(), typescript({abortOnError:false})],
- dest: "build/turbolizer.js"
+ output: {file: "build/turbolizer.js", format: "iife", sourcemap: true}
};
diff --git a/deps/v8/tools/turbolizer/src/graphmultiview.ts b/deps/v8/tools/turbolizer/src/graphmultiview.ts
index 66d1103e38..f9e7efb58c 100644
--- a/deps/v8/tools/turbolizer/src/graphmultiview.ts
+++ b/deps/v8/tools/turbolizer/src/graphmultiview.ts
@@ -4,6 +4,7 @@
import {GraphView} from "./graph-view.js"
import {ScheduleView} from "./schedule-view.js"
+import {SequenceView} from "./sequence-view.js"
import {SourceResolver} from "./source-resolver.js"
import {SelectionBroker} from "./selection-broker.js"
import {View, PhaseView} from "./view.js"
@@ -13,6 +14,7 @@ export class GraphMultiView extends View {
selectionBroker: SelectionBroker;
graph: GraphView;
schedule: ScheduleView;
+ sequence: SequenceView;
selectMenu: HTMLSelectElement;
currentPhaseView: View & PhaseView;
@@ -36,6 +38,7 @@ export class GraphMultiView extends View {
this.graph = new GraphView(id, selectionBroker,
(phaseName) => view.displayPhaseByName(phaseName));
this.schedule = new ScheduleView(id, selectionBroker);
+ this.sequence = new SequenceView(id, selectionBroker);
this.selectMenu = (<HTMLSelectElement>document.getElementById('display-selector'));
}
@@ -69,6 +72,8 @@ export class GraphMultiView extends View {
this.displayPhaseView(this.graph, phase.data);
} else if (phase.type == 'schedule') {
this.displayPhaseView(this.schedule, phase);
+ } else if (phase.type == 'sequence') {
+ this.displayPhaseView(this.sequence, phase);
}
}
diff --git a/deps/v8/tools/turbolizer/src/sequence-view.ts b/deps/v8/tools/turbolizer/src/sequence-view.ts
new file mode 100644
index 0000000000..afddb56649
--- /dev/null
+++ b/deps/v8/tools/turbolizer/src/sequence-view.ts
@@ -0,0 +1,235 @@
+// Copyright 2018 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 {Sequence} from "./source-resolver.js"
+import {isIterable} from "./util.js"
+import {PhaseView} from "./view.js"
+import {TextView} from "./text-view.js"
+
+export class SequenceView extends TextView implements PhaseView {
+ sequence: Sequence;
+ search_info: Array<any>;
+
+ createViewElement() {
+ const pane = document.createElement('div');
+ pane.setAttribute('id', "sequence");
+ return pane;
+ }
+
+ constructor(parentId, broker) {
+ super(parentId, broker, null);
+ }
+
+ attachSelection(s) {
+ const view = this;
+ if (!(s instanceof Set)) return;
+ view.selectionHandler.clear();
+ view.blockSelectionHandler.clear();
+ const selected = new Array();
+ for (const key of s) selected.push(key);
+ view.selectionHandler.select(selected, true);
+ }
+
+ detachSelection() {
+ this.blockSelection.clear();
+ return this.selection.detachSelection();
+ }
+
+ initializeContent(data, rememberedSelection) {
+ this.divNode.innerHTML = '';
+ this.sequence = data.sequence;
+ this.search_info = [];
+ this.addBlocks(this.sequence.blocks);
+ this.attachSelection(rememberedSelection);
+ }
+
+ elementForBlock(block) {
+ const view = this;
+ function createElement(tag: string, cls: string | Array<string>, content?: string) {
+ const el = document.createElement(tag);
+ if (isIterable(cls)) {
+ for (const c of cls) el.classList.add(c);
+ } else {
+ el.classList.add(cls);
+ }
+ if (content != undefined) el.innerHTML = content;
+ return el;
+ }
+
+ function mkLinkHandler(id, handler) {
+ return function (e) {
+ e.stopPropagation();
+ if (!e.shiftKey) {
+ handler.clear();
+ }
+ handler.select(["" + id], true);
+ };
+ }
+
+ function mkBlockLinkHandler(blockId) {
+ return mkLinkHandler(blockId, view.blockSelectionHandler);
+ }
+
+ function mkOperandLinkHandler(text) {
+ return mkLinkHandler(text, view.selectionHandler);
+ }
+
+ function elementForOperand(operand, search_info) {
+ var text = operand.text;
+ const operandEl = createElement("div", ["parameter", "tag", "clickable", operand.type], text);
+ if (operand.tooltip) {
+ operandEl.setAttribute("title", operand.tooltip);
+ }
+ operandEl.onclick = mkOperandLinkHandler(text);
+ search_info.push(text);
+ view.addHtmlElementForNodeId(text, operandEl);
+ return operandEl;
+ }
+
+ function elementForInstruction(instruction, search_info) {
+ const instNodeEl = createElement("div", "instruction-node");
+
+ const inst_id = createElement("div", "instruction-id", instruction.id);
+ instNodeEl.appendChild(inst_id);
+
+ const instContentsEl = createElement("div", "instruction-contents");
+ instNodeEl.appendChild(instContentsEl);
+
+ // Print gap moves.
+ const gapEl = createElement("div", "gap", "gap");
+ instContentsEl.appendChild(gapEl);
+ for (const gap of instruction.gaps) {
+ const moves = createElement("div", ["comma-sep-list", "gap-move"]);
+ for (const move of gap) {
+ const moveEl = createElement("div", "move");
+ const destinationEl = elementForOperand(move[0], search_info);
+ moveEl.appendChild(destinationEl);
+ const assignEl = createElement("div", "assign", "=");
+ moveEl.appendChild(assignEl);
+ const sourceEl = elementForOperand(move[1], search_info);
+ moveEl.appendChild(sourceEl);
+ moves.appendChild(moveEl);
+ }
+ gapEl.appendChild(moves);
+ }
+
+ const instEl = createElement("div", "instruction");
+ instContentsEl.appendChild(instEl);
+
+ if (instruction.outputs.length > 0) {
+ const outputs = createElement("div", ["comma-sep-list", "input-output-list"]);
+ for (const output of instruction.outputs) {
+ const outputEl = elementForOperand(output, search_info);
+ outputs.appendChild(outputEl);
+ }
+ instEl.appendChild(outputs);
+ const assignEl = createElement("div", "assign", "=");
+ instEl.appendChild(assignEl);
+ }
+
+ var text = instruction.opcode + instruction.flags;
+ const inst_label = createElement("div", "node-label", text);
+ search_info.push(text);
+ view.addHtmlElementForNodeId(text, inst_label);
+ instEl.appendChild(inst_label);
+
+ if (instruction.inputs.length > 0) {
+ const inputs = createElement("div", ["comma-sep-list", "input-output-list"]);
+ for (const input of instruction.inputs) {
+ const inputEl = elementForOperand(input, search_info);
+ inputs.appendChild(inputEl);
+ }
+ instEl.appendChild(inputs);
+ }
+
+ if (instruction.temps.length > 0) {
+ const temps = createElement("div", ["comma-sep-list", "input-output-list", "temps"]);
+ for (const temp of instruction.temps) {
+ const tempEl = elementForOperand(temp, search_info);
+ temps.appendChild(tempEl);
+ }
+ instEl.appendChild(temps);
+ }
+
+ return instNodeEl;
+ }
+
+ const sequence_block = createElement("div", "schedule-block");
+
+ const block_id = createElement("div", ["block-id", "com", "clickable"], block.id);
+ block_id.onclick = mkBlockLinkHandler(block.id);
+ sequence_block.appendChild(block_id);
+ const block_pred = createElement("div", ["predecessor-list", "block-list", "comma-sep-list"]);
+ for (const pred of block.predecessors) {
+ const predEl = createElement("div", ["block-id", "com", "clickable"], pred);
+ predEl.onclick = mkBlockLinkHandler(pred);
+ block_pred.appendChild(predEl);
+ }
+ if (block.predecessors.length > 0) sequence_block.appendChild(block_pred);
+ const phis = createElement("div", "phis");
+ sequence_block.appendChild(phis);
+
+ const phiLabel = createElement("div", "phi-label", "phi:");
+ phis.appendChild(phiLabel);
+
+ const phiContents = createElement("div", "phi-contents");
+ phis.appendChild(phiContents);
+
+ for (const phi of block.phis) {
+ const phiEl = createElement("div", "phi");
+ phiContents.appendChild(phiEl);
+
+ const outputEl = elementForOperand(phi.output, this.search_info);
+ phiEl.appendChild(outputEl);
+
+ const assignEl = createElement("div", "assign", "=");
+ phiEl.appendChild(assignEl);
+
+ for (const input of phi.operands) {
+ const inputEl = createElement("div", ["parameter", "tag", "clickable"], input);
+ phiEl.appendChild(inputEl);
+ }
+ }
+
+ const instructions = createElement("div", "instructions");
+ for (const instruction of block.instructions) {
+ instructions.appendChild(elementForInstruction(instruction, this.search_info));
+ }
+ sequence_block.appendChild(instructions);
+ const block_succ = createElement("div", ["successor-list", "block-list", "comma-sep-list"]);
+ for (const succ of block.successors) {
+ const succEl = createElement("div", ["block-id", "com", "clickable"], succ);
+ succEl.onclick = mkBlockLinkHandler(succ);
+ block_succ.appendChild(succEl);
+ }
+ if (block.successors.length > 0) sequence_block.appendChild(block_succ);
+ this.addHtmlElementForBlockId(block.id, sequence_block);
+ return sequence_block;
+ }
+
+ addBlocks(blocks) {
+ for (const block of blocks) {
+ const blockEl = this.elementForBlock(block);
+ this.divNode.appendChild(blockEl);
+ }
+ }
+
+ searchInputAction(searchBar, e) {
+ e.stopPropagation();
+ this.selectionHandler.clear();
+ const query = searchBar.value;
+ if (query.length == 0) return;
+ const select = [];
+ window.sessionStorage.setItem("lastSearch", query);
+ const reg = new RegExp(query);
+ for (const item of this.search_info) {
+ if (reg.exec(item) != null) {
+ select.push(item);
+ }
+ }
+ this.selectionHandler.select(select, true);
+ }
+
+ onresize() { }
+}
diff --git a/deps/v8/tools/turbolizer/src/source-resolver.ts b/deps/v8/tools/turbolizer/src/source-resolver.ts
index b2412d3e31..20f1f5070a 100644
--- a/deps/v8/tools/turbolizer/src/source-resolver.ts
+++ b/deps/v8/tools/turbolizer/src/source-resolver.ts
@@ -76,6 +76,10 @@ export interface Schedule {
nodes: Array<any>;
}
+export interface Sequence {
+ blocks: Array<any>;
+}
+
export class SourceResolver {
nodePositionMap: Array<AnyPosition>;
sources: Array<Source>;
@@ -383,7 +387,10 @@ export class SourceResolver {
if (phase.type == 'disassembly') {
this.disassemblyPhase = phase;
} else if (phase.type == 'schedule') {
- this.phases.push(this.parseSchedule(phase))
+ this.phases.push(this.parseSchedule(phase));
+ this.phaseNames.set(phase.name, this.phases.length);
+ } else if (phase.type == 'sequence') {
+ this.phases.push(this.parseSequence(phase));
this.phaseNames.set(phase.name, this.phases.length);
} else if (phase.type == 'instructions') {
if (phase.nodeIdToInstructionRange) {
@@ -525,4 +532,8 @@ export class SourceResolver {
phase.schedule = state;
return phase;
}
+ parseSequence(phase) {
+ phase.sequence = { blocks: phase.blocks };
+ return phase;
+ }
}
diff --git a/deps/v8/tools/turbolizer/turbo-visualizer.css b/deps/v8/tools/turbolizer/turbo-visualizer.css
index fcc68ee371..c7d45a7ee2 100644
--- a/deps/v8/tools/turbolizer/turbo-visualizer.css
+++ b/deps/v8/tools/turbolizer/turbo-visualizer.css
@@ -485,6 +485,11 @@ text {
margin-left: -80px;
}
+#sequence {
+ font-family: monospace;
+ margin-top: 50px;
+}
+
#schedule {
font-family: monospace;
margin-top: 50px;
@@ -579,6 +584,52 @@ text {
display: inline;
}
+.instruction * {
+ padding-right: .5ex;
+}
+
+.phi-label, .instruction-id {
+ display: inline-block;
+ padding-right: .5ex;
+ padding-left: .5ex;
+ min-width: 1ex;
+ vertical-align: top;
+}
+
+.instruction-id:after {
+ content: ":";
+}
+
+.instruction-node, .gap, .instruction {
+ display: block;
+}
+
+.phi-contents, .instruction-contents, .gap *, .instruction * {
+ display: inline-block;
+}
+
+.phi * {
+ padding-right: 1ex;
+ display: inline-block;
+}
+
+.gap .gap-move {
+ padding-left: .5ex;
+ padding-right: .5ex;
+}
+
+.gap > *:before {
+ content: "(";
+}
+
+.gap > *:after {
+ content: ")";
+}
+
+.parameter.constant {
+ outline: 1px dotted red;
+}
+
.clickable:hover {
text-decoration: underline;
}
@@ -601,4 +652,13 @@ text {
.comma-sep-list > *:last-child {
padding-right: 0ex;
-} \ No newline at end of file
+}
+
+.temps:before {
+ content: "temps: ";
+}
+
+.temps {
+ padding-left: .5ex;
+ outline: 1px dotted grey;
+}
diff --git a/deps/v8/tools/unittests/run_tests_test.py b/deps/v8/tools/unittests/run_tests_test.py
index 4fb6aaff13..4eb9feeac6 100755
--- a/deps/v8/tools/unittests/run_tests_test.py
+++ b/deps/v8/tools/unittests/run_tests_test.py
@@ -684,5 +684,28 @@ class SystemTest(unittest.TestCase):
self.assertIn('sweet/bananas', result.stdout)
self.assertEqual(1, result.returncode, result)
+ def testExitAfterNFailures(self):
+ with temp_base() as basedir:
+ result = run_tests(
+ basedir,
+ '--mode=Release',
+ '--progress=verbose',
+ '--exit-after-n-failures=2',
+ '-j1',
+ 'sweet/mangoes', # PASS
+ 'sweet/strawberries', # FAIL
+ 'sweet/blackberries', # FAIL
+ 'sweet/raspberries', # should not run
+ )
+ self.assertIn('Running 4 base tests', result.stdout, result)
+ self.assertIn('sweet/mangoes: pass', result.stdout, result)
+ self.assertIn('sweet/strawberries: FAIL', result.stdout, result)
+ self.assertIn('Too many failures, exiting...', result.stdout, result)
+ self.assertIn('sweet/blackberries: FAIL', result.stdout, result)
+ self.assertNotIn('Done running sweet/raspberries', result.stdout, result)
+ self.assertIn('2 tests failed', result.stdout, result)
+ self.assertIn('3 tests ran', result.stdout, result)
+ self.assertEqual(1, result.returncode, result)
+
if __name__ == '__main__':
unittest.main()
diff --git a/deps/v8/tools/unittests/testdata/expected_test_results1.json b/deps/v8/tools/unittests/testdata/expected_test_results1.json
index e889ecabce..9ae985c3dc 100644
--- a/deps/v8/tools/unittests/testdata/expected_test_results1.json
+++ b/deps/v8/tools/unittests/testdata/expected_test_results1.json
@@ -4,13 +4,14 @@
"mode": "release",
"results": [
{
- "command": "/usr/bin/python out/Release/d8_mocked.py strawberries --random-seed=123 --nohard-abort",
+ "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort",
"duration": 1,
"exit_code": 1,
"expected": [
"PASS"
],
"flags": [
+ "--test",
"strawberries",
"--random-seed=123",
"--nohard-abort"
@@ -20,18 +21,19 @@
"result": "FAIL",
"run": 1,
"stderr": "",
- "stdout": "strawberries --random-seed=123 --nohard-abort\n",
+ "stdout": "--test strawberries --random-seed=123 --nohard-abort\n",
"target_name": "d8_mocked.py",
"variant": "default"
},
{
- "command": "/usr/bin/python out/Release/d8_mocked.py strawberries --random-seed=123 --nohard-abort",
+ "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort",
"duration": 1,
"exit_code": 1,
"expected": [
"PASS"
],
"flags": [
+ "--test",
"strawberries",
"--random-seed=123",
"--nohard-abort"
@@ -41,18 +43,19 @@
"result": "FAIL",
"run": 2,
"stderr": "",
- "stdout": "strawberries --random-seed=123 --nohard-abort\n",
+ "stdout": "--test strawberries --random-seed=123 --nohard-abort\n",
"target_name": "d8_mocked.py",
"variant": "default"
},
{
- "command": "/usr/bin/python out/Release/d8_mocked.py strawberries --random-seed=123 --nohard-abort",
+ "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort",
"duration": 1,
"exit_code": 1,
"expected": [
"PASS"
],
"flags": [
+ "--test",
"strawberries",
"--random-seed=123",
"--nohard-abort"
@@ -62,16 +65,17 @@
"result": "FAIL",
"run": 3,
"stderr": "",
- "stdout": "strawberries --random-seed=123 --nohard-abort\n",
+ "stdout": "--test strawberries --random-seed=123 --nohard-abort\n",
"target_name": "d8_mocked.py",
"variant": "default"
}
],
"slowest_tests": [
{
- "command": "/usr/bin/python out/Release/d8_mocked.py strawberries --random-seed=123 --nohard-abort",
+ "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort",
"duration": 1,
"flags": [
+ "--test",
"strawberries",
"--random-seed=123",
"--nohard-abort"
@@ -80,9 +84,10 @@
"name": "sweet/strawberries"
},
{
- "command": "/usr/bin/python out/Release/d8_mocked.py strawberries --random-seed=123 --nohard-abort",
+ "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort",
"duration": 1,
"flags": [
+ "--test",
"strawberries",
"--random-seed=123",
"--nohard-abort"
@@ -91,9 +96,10 @@
"name": "sweet/strawberries"
},
{
- "command": "/usr/bin/python out/Release/d8_mocked.py strawberries --random-seed=123 --nohard-abort",
+ "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort",
"duration": 1,
"flags": [
+ "--test",
"strawberries",
"--random-seed=123",
"--nohard-abort"
diff --git a/deps/v8/tools/unittests/testdata/testroot1/test/sweet/sweet.status b/deps/v8/tools/unittests/testdata/testroot1/test/sweet/sweet.status
index 74214631dc..d823cfd231 100644
--- a/deps/v8/tools/unittests/testdata/testroot1/test/sweet/sweet.status
+++ b/deps/v8/tools/unittests/testdata/testroot1/test/sweet/sweet.status
@@ -6,6 +6,7 @@
[ALWAYS, {
'raspberries': FAIL,
'strawberries': [PASS, ['mode == release', SLOW], ['mode == debug', NO_VARIANTS]],
+ 'mangoes': [PASS, SLOW],
# Both cherries and apples are to test how PASS an FAIL from different
# sections are merged.
diff --git a/deps/v8/tools/unittests/testdata/testroot1/test/sweet/testcfg.py b/deps/v8/tools/unittests/testdata/testroot1/test/sweet/testcfg.py
index 1fcf2864b6..bf9c780621 100644
--- a/deps/v8/tools/unittests/testdata/testroot1/test/sweet/testcfg.py
+++ b/deps/v8/tools/unittests/testdata/testroot1/test/sweet/testcfg.py
@@ -12,15 +12,17 @@ from testrunner.objects import testcase
class TestSuite(testsuite.TestSuite):
def ListTests(self):
return map(
- self._create_test,
- ['bananas', 'apples', 'cherries', 'strawberries', 'raspberries'],
+ self._create_test, [
+ 'bananas', 'apples', 'cherries', 'mangoes', 'strawberries',
+ 'blackberries', 'raspberries',
+ ],
)
def _test_class(self):
return TestCase
-class TestCase(testcase.TestCase):
+class TestCase(testcase.D8TestCase):
def get_shell(self):
return 'd8_mocked.py'
diff --git a/deps/v8/tools/v8_presubmit.py b/deps/v8/tools/v8_presubmit.py
index 13b4abd86c..f35bd9a2ee 100755
--- a/deps/v8/tools/v8_presubmit.py
+++ b/deps/v8/tools/v8_presubmit.py
@@ -100,6 +100,27 @@ def CppLintWorker(command):
' in your $PATH. Lint check skipped.')
process.kill()
+def TorqueLintWorker(command):
+ try:
+ process = subprocess.Popen(command, stderr=subprocess.PIPE)
+ process.wait()
+ out_lines = ""
+ error_count = 0
+ while True:
+ out_line = process.stderr.readline()
+ if out_line == '' and process.poll() != None:
+ break
+ out_lines += out_line
+ error_count += 1
+ sys.stdout.write(out_lines)
+ if error_count != 0:
+ sys.stdout.write("tip: use 'tools/torque/format-torque.py -i <filename>'\n");
+ return error_count
+ except KeyboardInterrupt:
+ process.kill()
+ except:
+ print('Error running format-torque.py')
+ process.kill()
class FileContentsCache(object):
@@ -244,7 +265,7 @@ class CppLintProcessor(SourceFileProcessor):
good_files_cache.Load()
files = good_files_cache.FilterUnchangedFiles(files)
if len(files) == 0:
- print 'No changes in files detected. Skipping cpplint check.'
+ print 'No changes in C/C++ files detected. Skipping cpplint check.'
return True
filters = ",".join([n for n in LINT_RULES])
@@ -270,10 +291,64 @@ class CppLintProcessor(SourceFileProcessor):
good_files_cache.RemoveFile(files[i])
total_errors = sum(results)
- print "Total errors found: %d" % total_errors
+ print "Total C/C++ files found that require formatting: %d" % total_errors
good_files_cache.Save()
return total_errors == 0
+class TorqueFormatProcessor(SourceFileProcessor):
+ """
+ Check .tq files to verify they follow the Torque style guide.
+ """
+
+ def IsRelevant(self, name):
+ return name.endswith('.tq')
+
+ def GetPathsToSearch(self):
+ dirs = ['third-party', 'src']
+ test_dirs = ['torque']
+ return dirs + [join('test', dir) for dir in test_dirs]
+
+ def GetTorquelintScript(self):
+ torque_tools = os.path.join(TOOLS_PATH, "torque")
+ torque_path = os.path.join(torque_tools, "format-torque.py")
+
+ if os.path.isfile(torque_path):
+ return torque_path
+
+ return None
+
+ def ProcessFiles(self, files):
+ good_files_cache = FileContentsCache('.torquelint-cache')
+ good_files_cache.Load()
+ files = good_files_cache.FilterUnchangedFiles(files)
+ if len(files) == 0:
+ print 'No changes in Torque files detected. Skipping Torque lint check.'
+ return True
+
+ torquelint = self.GetTorquelintScript()
+ if torquelint is None:
+ print('Could not find format-torque.')
+ sys.exit(1)
+
+ command = [sys.executable, torquelint, '-l']
+
+ commands = [command + [file] for file in files]
+ count = multiprocessing.cpu_count()
+ pool = multiprocessing.Pool(count)
+ try:
+ results = pool.map_async(TorqueLintWorker, commands).get()
+ except KeyboardInterrupt:
+ print "\nCaught KeyboardInterrupt, terminating workers."
+ sys.exit(1)
+
+ for i in range(len(files)):
+ if results[i] > 0:
+ good_files_cache.RemoveFile(files[i])
+
+ total_errors = sum(results)
+ print "Total Torque files requiring formatting: %d" % total_errors
+ good_files_cache.Save()
+ return total_errors == 0
COPYRIGHT_HEADER_PATTERN = re.compile(
r'Copyright [\d-]*20[0-1][0-9] the V8 project authors. All rights reserved.')
@@ -297,7 +372,7 @@ class SourceProcessor(SourceFileProcessor):
m = pattern.match(line)
if m:
runtime_functions.append(m.group(1))
- if len(runtime_functions) < 450:
+ if len(runtime_functions) < 250:
print ("Runtime functions list is suspiciously short. "
"Consider updating the presubmit script.")
sys.exit(1)
@@ -584,6 +659,8 @@ def Main():
if not options.no_lint:
print "Running C++ lint check..."
success &= CppLintProcessor().RunOnPath(workspace)
+ print "Running Torque formatting check..."
+ success &= TorqueFormatProcessor().RunOnPath(workspace)
print "Running copyright header, trailing whitespaces and " \
"two empty lines between declarations check..."
success &= SourceProcessor().RunOnPath(workspace)
diff --git a/deps/v8/tools/v8heapconst.py b/deps/v8/tools/v8heapconst.py
index 16927d85b3..f8c8061ff4 100644
--- a/deps/v8/tools/v8heapconst.py
+++ b/deps/v8/tools/v8heapconst.py
@@ -12,9 +12,9 @@ INSTANCE_TYPES = {
8: "ONE_BYTE_INTERNALIZED_STRING_TYPE",
10: "EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE",
18: "EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE",
- 34: "SHORT_EXTERNAL_INTERNALIZED_STRING_TYPE",
- 42: "SHORT_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE",
- 50: "SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE",
+ 34: "UNCACHED_EXTERNAL_INTERNALIZED_STRING_TYPE",
+ 42: "UNCACHED_EXTERNAL_ONE_BYTE_INTERNALIZED_STRING_TYPE",
+ 50: "UNCACHED_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE",
64: "STRING_TYPE",
65: "CONS_STRING_TYPE",
66: "EXTERNAL_STRING_TYPE",
@@ -26,9 +26,9 @@ INSTANCE_TYPES = {
75: "SLICED_ONE_BYTE_STRING_TYPE",
77: "THIN_ONE_BYTE_STRING_TYPE",
82: "EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE",
- 98: "SHORT_EXTERNAL_STRING_TYPE",
- 106: "SHORT_EXTERNAL_ONE_BYTE_STRING_TYPE",
- 114: "SHORT_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE",
+ 98: "UNCACHED_EXTERNAL_STRING_TYPE",
+ 106: "UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE",
+ 114: "UNCACHED_EXTERNAL_STRING_WITH_ONE_BYTE_DATA_TYPE",
128: "SYMBOL_TYPE",
129: "HEAP_NUMBER_TYPE",
130: "BIGINT_TYPE",
@@ -82,48 +82,50 @@ INSTANCE_TYPES = {
178: "PROMISE_FULFILL_REACTION_JOB_TASK_TYPE",
179: "PROMISE_REJECT_REACTION_JOB_TASK_TYPE",
180: "PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE",
- 181: "ALLOCATION_SITE_TYPE",
- 182: "FIXED_ARRAY_TYPE",
- 183: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
- 184: "HASH_TABLE_TYPE",
- 185: "ORDERED_HASH_MAP_TYPE",
- 186: "ORDERED_HASH_SET_TYPE",
- 187: "NAME_DICTIONARY_TYPE",
- 188: "GLOBAL_DICTIONARY_TYPE",
- 189: "NUMBER_DICTIONARY_TYPE",
- 190: "SIMPLE_NUMBER_DICTIONARY_TYPE",
- 191: "STRING_TABLE_TYPE",
- 192: "EPHEMERON_HASH_TABLE_TYPE",
- 193: "SCOPE_INFO_TYPE",
- 194: "SCRIPT_CONTEXT_TABLE_TYPE",
- 195: "BLOCK_CONTEXT_TYPE",
- 196: "CATCH_CONTEXT_TYPE",
- 197: "DEBUG_EVALUATE_CONTEXT_TYPE",
- 198: "EVAL_CONTEXT_TYPE",
- 199: "FUNCTION_CONTEXT_TYPE",
- 200: "MODULE_CONTEXT_TYPE",
- 201: "NATIVE_CONTEXT_TYPE",
- 202: "SCRIPT_CONTEXT_TYPE",
- 203: "WITH_CONTEXT_TYPE",
- 204: "WEAK_FIXED_ARRAY_TYPE",
- 205: "DESCRIPTOR_ARRAY_TYPE",
- 206: "TRANSITION_ARRAY_TYPE",
- 207: "CALL_HANDLER_INFO_TYPE",
- 208: "CELL_TYPE",
- 209: "CODE_DATA_CONTAINER_TYPE",
- 210: "FEEDBACK_CELL_TYPE",
- 211: "FEEDBACK_VECTOR_TYPE",
- 212: "LOAD_HANDLER_TYPE",
- 213: "PRE_PARSED_SCOPE_DATA_TYPE",
- 214: "PROPERTY_ARRAY_TYPE",
- 215: "PROPERTY_CELL_TYPE",
- 216: "SHARED_FUNCTION_INFO_TYPE",
- 217: "SMALL_ORDERED_HASH_MAP_TYPE",
- 218: "SMALL_ORDERED_HASH_SET_TYPE",
- 219: "STORE_HANDLER_TYPE",
- 220: "UNCOMPILED_DATA_WITHOUT_PRE_PARSED_SCOPE_TYPE",
- 221: "UNCOMPILED_DATA_WITH_PRE_PARSED_SCOPE_TYPE",
- 222: "WEAK_ARRAY_LIST_TYPE",
+ 181: "MICROTASK_QUEUE_TYPE",
+ 182: "ALLOCATION_SITE_TYPE",
+ 183: "FIXED_ARRAY_TYPE",
+ 184: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
+ 185: "HASH_TABLE_TYPE",
+ 186: "ORDERED_HASH_MAP_TYPE",
+ 187: "ORDERED_HASH_SET_TYPE",
+ 188: "NAME_DICTIONARY_TYPE",
+ 189: "GLOBAL_DICTIONARY_TYPE",
+ 190: "NUMBER_DICTIONARY_TYPE",
+ 191: "SIMPLE_NUMBER_DICTIONARY_TYPE",
+ 192: "STRING_TABLE_TYPE",
+ 193: "EPHEMERON_HASH_TABLE_TYPE",
+ 194: "SCOPE_INFO_TYPE",
+ 195: "SCRIPT_CONTEXT_TABLE_TYPE",
+ 196: "AWAIT_CONTEXT_TYPE",
+ 197: "BLOCK_CONTEXT_TYPE",
+ 198: "CATCH_CONTEXT_TYPE",
+ 199: "DEBUG_EVALUATE_CONTEXT_TYPE",
+ 200: "EVAL_CONTEXT_TYPE",
+ 201: "FUNCTION_CONTEXT_TYPE",
+ 202: "MODULE_CONTEXT_TYPE",
+ 203: "NATIVE_CONTEXT_TYPE",
+ 204: "SCRIPT_CONTEXT_TYPE",
+ 205: "WITH_CONTEXT_TYPE",
+ 206: "WEAK_FIXED_ARRAY_TYPE",
+ 207: "DESCRIPTOR_ARRAY_TYPE",
+ 208: "TRANSITION_ARRAY_TYPE",
+ 209: "CALL_HANDLER_INFO_TYPE",
+ 210: "CELL_TYPE",
+ 211: "CODE_DATA_CONTAINER_TYPE",
+ 212: "FEEDBACK_CELL_TYPE",
+ 213: "FEEDBACK_VECTOR_TYPE",
+ 214: "LOAD_HANDLER_TYPE",
+ 215: "PRE_PARSED_SCOPE_DATA_TYPE",
+ 216: "PROPERTY_ARRAY_TYPE",
+ 217: "PROPERTY_CELL_TYPE",
+ 218: "SHARED_FUNCTION_INFO_TYPE",
+ 219: "SMALL_ORDERED_HASH_MAP_TYPE",
+ 220: "SMALL_ORDERED_HASH_SET_TYPE",
+ 221: "STORE_HANDLER_TYPE",
+ 222: "UNCOMPILED_DATA_WITHOUT_PRE_PARSED_SCOPE_TYPE",
+ 223: "UNCOMPILED_DATA_WITH_PRE_PARSED_SCOPE_TYPE",
+ 224: "WEAK_ARRAY_LIST_TYPE",
1024: "JS_PROXY_TYPE",
1025: "JS_GLOBAL_OBJECT_TYPE",
1026: "JS_GLOBAL_PROXY_TYPE",
@@ -158,18 +160,23 @@ INSTANCE_TYPES = {
1081: "JS_WEAK_SET_TYPE",
1082: "JS_TYPED_ARRAY_TYPE",
1083: "JS_DATA_VIEW_TYPE",
- 1084: "JS_INTL_COLLATOR_TYPE",
- 1085: "JS_INTL_LIST_FORMAT_TYPE",
- 1086: "JS_INTL_LOCALE_TYPE",
- 1087: "JS_INTL_PLURAL_RULES_TYPE",
- 1088: "JS_INTL_RELATIVE_TIME_FORMAT_TYPE",
- 1089: "WASM_GLOBAL_TYPE",
- 1090: "WASM_INSTANCE_TYPE",
- 1091: "WASM_MEMORY_TYPE",
- 1092: "WASM_MODULE_TYPE",
- 1093: "WASM_TABLE_TYPE",
- 1094: "JS_BOUND_FUNCTION_TYPE",
- 1095: "JS_FUNCTION_TYPE",
+ 1084: "JS_INTL_V8_BREAK_ITERATOR_TYPE",
+ 1085: "JS_INTL_COLLATOR_TYPE",
+ 1086: "JS_INTL_DATE_TIME_FORMAT_TYPE",
+ 1087: "JS_INTL_LIST_FORMAT_TYPE",
+ 1088: "JS_INTL_LOCALE_TYPE",
+ 1089: "JS_INTL_NUMBER_FORMAT_TYPE",
+ 1090: "JS_INTL_PLURAL_RULES_TYPE",
+ 1091: "JS_INTL_RELATIVE_TIME_FORMAT_TYPE",
+ 1092: "JS_INTL_SEGMENTER_TYPE",
+ 1093: "WASM_EXCEPTION_TYPE",
+ 1094: "WASM_GLOBAL_TYPE",
+ 1095: "WASM_INSTANCE_TYPE",
+ 1096: "WASM_MEMORY_TYPE",
+ 1097: "WASM_MODULE_TYPE",
+ 1098: "WASM_TABLE_TYPE",
+ 1099: "JS_BOUND_FUNCTION_TYPE",
+ 1100: "JS_FUNCTION_TYPE",
}
# List of known V8 maps.
@@ -177,139 +184,148 @@ KNOWN_MAPS = {
("RO_SPACE", 0x02201): (138, "FreeSpaceMap"),
("RO_SPACE", 0x02251): (132, "MetaMap"),
("RO_SPACE", 0x022d1): (131, "NullMap"),
- ("RO_SPACE", 0x02341): (205, "DescriptorArrayMap"),
- ("RO_SPACE", 0x023a1): (204, "WeakFixedArrayMap"),
+ ("RO_SPACE", 0x02341): (207, "DescriptorArrayMap"),
+ ("RO_SPACE", 0x023a1): (206, "WeakFixedArrayMap"),
("RO_SPACE", 0x023f1): (152, "OnePointerFillerMap"),
("RO_SPACE", 0x02441): (152, "TwoPointerFillerMap"),
("RO_SPACE", 0x024c1): (131, "UninitializedMap"),
- ("RO_SPACE", 0x02539): (8, "OneByteInternalizedStringMap"),
- ("RO_SPACE", 0x025e1): (131, "UndefinedMap"),
- ("RO_SPACE", 0x02641): (129, "HeapNumberMap"),
- ("RO_SPACE", 0x026c1): (131, "TheHoleMap"),
- ("RO_SPACE", 0x02771): (131, "BooleanMap"),
- ("RO_SPACE", 0x02869): (136, "ByteArrayMap"),
- ("RO_SPACE", 0x028b9): (182, "FixedArrayMap"),
- ("RO_SPACE", 0x02909): (182, "FixedCOWArrayMap"),
- ("RO_SPACE", 0x02959): (184, "HashTableMap"),
- ("RO_SPACE", 0x029a9): (128, "SymbolMap"),
- ("RO_SPACE", 0x029f9): (72, "OneByteStringMap"),
- ("RO_SPACE", 0x02a49): (193, "ScopeInfoMap"),
- ("RO_SPACE", 0x02a99): (216, "SharedFunctionInfoMap"),
- ("RO_SPACE", 0x02ae9): (133, "CodeMap"),
- ("RO_SPACE", 0x02b39): (199, "FunctionContextMap"),
- ("RO_SPACE", 0x02b89): (208, "CellMap"),
- ("RO_SPACE", 0x02bd9): (215, "GlobalPropertyCellMap"),
- ("RO_SPACE", 0x02c29): (135, "ForeignMap"),
- ("RO_SPACE", 0x02c79): (206, "TransitionArrayMap"),
- ("RO_SPACE", 0x02cc9): (211, "FeedbackVectorMap"),
- ("RO_SPACE", 0x02d69): (131, "ArgumentsMarkerMap"),
- ("RO_SPACE", 0x02e11): (131, "ExceptionMap"),
- ("RO_SPACE", 0x02eb9): (131, "TerminationExceptionMap"),
- ("RO_SPACE", 0x02f69): (131, "OptimizedOutMap"),
- ("RO_SPACE", 0x03011): (131, "StaleRegisterMap"),
- ("RO_SPACE", 0x03089): (201, "NativeContextMap"),
- ("RO_SPACE", 0x030d9): (200, "ModuleContextMap"),
- ("RO_SPACE", 0x03129): (198, "EvalContextMap"),
- ("RO_SPACE", 0x03179): (202, "ScriptContextMap"),
- ("RO_SPACE", 0x031c9): (195, "BlockContextMap"),
- ("RO_SPACE", 0x03219): (196, "CatchContextMap"),
- ("RO_SPACE", 0x03269): (203, "WithContextMap"),
- ("RO_SPACE", 0x032b9): (197, "DebugEvaluateContextMap"),
- ("RO_SPACE", 0x03309): (194, "ScriptContextTableMap"),
- ("RO_SPACE", 0x03359): (151, "FeedbackMetadataArrayMap"),
- ("RO_SPACE", 0x033a9): (182, "ArrayListMap"),
- ("RO_SPACE", 0x033f9): (130, "BigIntMap"),
- ("RO_SPACE", 0x03449): (183, "ObjectBoilerplateDescriptionMap"),
- ("RO_SPACE", 0x03499): (137, "BytecodeArrayMap"),
- ("RO_SPACE", 0x034e9): (209, "CodeDataContainerMap"),
- ("RO_SPACE", 0x03539): (150, "FixedDoubleArrayMap"),
- ("RO_SPACE", 0x03589): (188, "GlobalDictionaryMap"),
- ("RO_SPACE", 0x035d9): (210, "ManyClosuresCellMap"),
- ("RO_SPACE", 0x03629): (182, "ModuleInfoMap"),
- ("RO_SPACE", 0x03679): (134, "MutableHeapNumberMap"),
- ("RO_SPACE", 0x036c9): (187, "NameDictionaryMap"),
- ("RO_SPACE", 0x03719): (210, "NoClosuresCellMap"),
- ("RO_SPACE", 0x03769): (189, "NumberDictionaryMap"),
- ("RO_SPACE", 0x037b9): (210, "OneClosureCellMap"),
- ("RO_SPACE", 0x03809): (185, "OrderedHashMapMap"),
- ("RO_SPACE", 0x03859): (186, "OrderedHashSetMap"),
- ("RO_SPACE", 0x038a9): (213, "PreParsedScopeDataMap"),
- ("RO_SPACE", 0x038f9): (214, "PropertyArrayMap"),
- ("RO_SPACE", 0x03949): (207, "SideEffectCallHandlerInfoMap"),
- ("RO_SPACE", 0x03999): (207, "SideEffectFreeCallHandlerInfoMap"),
- ("RO_SPACE", 0x039e9): (207, "NextCallSideEffectFreeCallHandlerInfoMap"),
- ("RO_SPACE", 0x03a39): (190, "SimpleNumberDictionaryMap"),
- ("RO_SPACE", 0x03a89): (182, "SloppyArgumentsElementsMap"),
- ("RO_SPACE", 0x03ad9): (217, "SmallOrderedHashMapMap"),
- ("RO_SPACE", 0x03b29): (218, "SmallOrderedHashSetMap"),
- ("RO_SPACE", 0x03b79): (191, "StringTableMap"),
- ("RO_SPACE", 0x03bc9): (220, "UncompiledDataWithoutPreParsedScopeMap"),
- ("RO_SPACE", 0x03c19): (221, "UncompiledDataWithPreParsedScopeMap"),
- ("RO_SPACE", 0x03c69): (222, "WeakArrayListMap"),
- ("RO_SPACE", 0x03cb9): (192, "EphemeronHashTableMap"),
- ("RO_SPACE", 0x03d09): (106, "NativeSourceStringMap"),
- ("RO_SPACE", 0x03d59): (64, "StringMap"),
- ("RO_SPACE", 0x03da9): (73, "ConsOneByteStringMap"),
- ("RO_SPACE", 0x03df9): (65, "ConsStringMap"),
- ("RO_SPACE", 0x03e49): (77, "ThinOneByteStringMap"),
- ("RO_SPACE", 0x03e99): (69, "ThinStringMap"),
- ("RO_SPACE", 0x03ee9): (67, "SlicedStringMap"),
- ("RO_SPACE", 0x03f39): (75, "SlicedOneByteStringMap"),
- ("RO_SPACE", 0x03f89): (66, "ExternalStringMap"),
- ("RO_SPACE", 0x03fd9): (82, "ExternalStringWithOneByteDataMap"),
- ("RO_SPACE", 0x04029): (74, "ExternalOneByteStringMap"),
- ("RO_SPACE", 0x04079): (98, "ShortExternalStringMap"),
- ("RO_SPACE", 0x040c9): (114, "ShortExternalStringWithOneByteDataMap"),
- ("RO_SPACE", 0x04119): (0, "InternalizedStringMap"),
- ("RO_SPACE", 0x04169): (2, "ExternalInternalizedStringMap"),
- ("RO_SPACE", 0x041b9): (18, "ExternalInternalizedStringWithOneByteDataMap"),
- ("RO_SPACE", 0x04209): (10, "ExternalOneByteInternalizedStringMap"),
- ("RO_SPACE", 0x04259): (34, "ShortExternalInternalizedStringMap"),
- ("RO_SPACE", 0x042a9): (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
- ("RO_SPACE", 0x042f9): (42, "ShortExternalOneByteInternalizedStringMap"),
- ("RO_SPACE", 0x04349): (106, "ShortExternalOneByteStringMap"),
- ("RO_SPACE", 0x04399): (140, "FixedUint8ArrayMap"),
- ("RO_SPACE", 0x043e9): (139, "FixedInt8ArrayMap"),
- ("RO_SPACE", 0x04439): (142, "FixedUint16ArrayMap"),
- ("RO_SPACE", 0x04489): (141, "FixedInt16ArrayMap"),
- ("RO_SPACE", 0x044d9): (144, "FixedUint32ArrayMap"),
- ("RO_SPACE", 0x04529): (143, "FixedInt32ArrayMap"),
- ("RO_SPACE", 0x04579): (145, "FixedFloat32ArrayMap"),
- ("RO_SPACE", 0x045c9): (146, "FixedFloat64ArrayMap"),
- ("RO_SPACE", 0x04619): (147, "FixedUint8ClampedArrayMap"),
- ("RO_SPACE", 0x04669): (149, "FixedBigUint64ArrayMap"),
- ("RO_SPACE", 0x046b9): (148, "FixedBigInt64ArrayMap"),
- ("RO_SPACE", 0x04709): (131, "SelfReferenceMarkerMap"),
- ("RO_SPACE", 0x04771): (171, "Tuple2Map"),
- ("RO_SPACE", 0x04811): (173, "ArrayBoilerplateDescriptionMap"),
- ("RO_SPACE", 0x04b01): (161, "InterceptorInfoMap"),
- ("RO_SPACE", 0x04bf9): (169, "ScriptMap"),
- ("RO_SPACE", 0x09aa1): (154, "AccessorInfoMap"),
- ("RO_SPACE", 0x09af1): (153, "AccessCheckInfoMap"),
- ("RO_SPACE", 0x09b41): (155, "AccessorPairMap"),
- ("RO_SPACE", 0x09b91): (156, "AliasedArgumentsEntryMap"),
- ("RO_SPACE", 0x09be1): (157, "AllocationMementoMap"),
- ("RO_SPACE", 0x09c31): (158, "AsyncGeneratorRequestMap"),
- ("RO_SPACE", 0x09c81): (159, "DebugInfoMap"),
- ("RO_SPACE", 0x09cd1): (160, "FunctionTemplateInfoMap"),
- ("RO_SPACE", 0x09d21): (162, "InterpreterDataMap"),
- ("RO_SPACE", 0x09d71): (163, "ModuleInfoEntryMap"),
- ("RO_SPACE", 0x09dc1): (164, "ModuleMap"),
- ("RO_SPACE", 0x09e11): (165, "ObjectTemplateInfoMap"),
- ("RO_SPACE", 0x09e61): (166, "PromiseCapabilityMap"),
- ("RO_SPACE", 0x09eb1): (167, "PromiseReactionMap"),
- ("RO_SPACE", 0x09f01): (168, "PrototypeInfoMap"),
- ("RO_SPACE", 0x09f51): (170, "StackFrameInfoMap"),
- ("RO_SPACE", 0x09fa1): (172, "Tuple3Map"),
- ("RO_SPACE", 0x09ff1): (174, "WasmDebugInfoMap"),
- ("RO_SPACE", 0x0a041): (175, "WasmExportedFunctionDataMap"),
- ("RO_SPACE", 0x0a091): (176, "CallableTaskMap"),
- ("RO_SPACE", 0x0a0e1): (177, "CallbackTaskMap"),
- ("RO_SPACE", 0x0a131): (178, "PromiseFulfillReactionJobTaskMap"),
- ("RO_SPACE", 0x0a181): (179, "PromiseRejectReactionJobTaskMap"),
- ("RO_SPACE", 0x0a1d1): (180, "PromiseResolveThenableJobTaskMap"),
- ("RO_SPACE", 0x0a221): (181, "AllocationSiteMap"),
- ("RO_SPACE", 0x0a271): (181, "AllocationSiteMap"),
+ ("RO_SPACE", 0x02531): (8, "OneByteInternalizedStringMap"),
+ ("RO_SPACE", 0x025d1): (131, "UndefinedMap"),
+ ("RO_SPACE", 0x02631): (129, "HeapNumberMap"),
+ ("RO_SPACE", 0x026b1): (131, "TheHoleMap"),
+ ("RO_SPACE", 0x02759): (131, "BooleanMap"),
+ ("RO_SPACE", 0x02831): (136, "ByteArrayMap"),
+ ("RO_SPACE", 0x02881): (183, "FixedArrayMap"),
+ ("RO_SPACE", 0x028d1): (183, "FixedCOWArrayMap"),
+ ("RO_SPACE", 0x02921): (185, "HashTableMap"),
+ ("RO_SPACE", 0x02971): (128, "SymbolMap"),
+ ("RO_SPACE", 0x029c1): (72, "OneByteStringMap"),
+ ("RO_SPACE", 0x02a11): (194, "ScopeInfoMap"),
+ ("RO_SPACE", 0x02a61): (218, "SharedFunctionInfoMap"),
+ ("RO_SPACE", 0x02ab1): (133, "CodeMap"),
+ ("RO_SPACE", 0x02b01): (201, "FunctionContextMap"),
+ ("RO_SPACE", 0x02b51): (210, "CellMap"),
+ ("RO_SPACE", 0x02ba1): (217, "GlobalPropertyCellMap"),
+ ("RO_SPACE", 0x02bf1): (135, "ForeignMap"),
+ ("RO_SPACE", 0x02c41): (208, "TransitionArrayMap"),
+ ("RO_SPACE", 0x02c91): (213, "FeedbackVectorMap"),
+ ("RO_SPACE", 0x02d31): (131, "ArgumentsMarkerMap"),
+ ("RO_SPACE", 0x02dd1): (131, "ExceptionMap"),
+ ("RO_SPACE", 0x02e71): (131, "TerminationExceptionMap"),
+ ("RO_SPACE", 0x02f19): (131, "OptimizedOutMap"),
+ ("RO_SPACE", 0x02fb9): (131, "StaleRegisterMap"),
+ ("RO_SPACE", 0x03029): (203, "NativeContextMap"),
+ ("RO_SPACE", 0x03079): (202, "ModuleContextMap"),
+ ("RO_SPACE", 0x030c9): (200, "EvalContextMap"),
+ ("RO_SPACE", 0x03119): (204, "ScriptContextMap"),
+ ("RO_SPACE", 0x03169): (196, "AwaitContextMap"),
+ ("RO_SPACE", 0x031b9): (197, "BlockContextMap"),
+ ("RO_SPACE", 0x03209): (198, "CatchContextMap"),
+ ("RO_SPACE", 0x03259): (205, "WithContextMap"),
+ ("RO_SPACE", 0x032a9): (199, "DebugEvaluateContextMap"),
+ ("RO_SPACE", 0x032f9): (195, "ScriptContextTableMap"),
+ ("RO_SPACE", 0x03349): (151, "FeedbackMetadataArrayMap"),
+ ("RO_SPACE", 0x03399): (183, "ArrayListMap"),
+ ("RO_SPACE", 0x033e9): (130, "BigIntMap"),
+ ("RO_SPACE", 0x03439): (184, "ObjectBoilerplateDescriptionMap"),
+ ("RO_SPACE", 0x03489): (137, "BytecodeArrayMap"),
+ ("RO_SPACE", 0x034d9): (211, "CodeDataContainerMap"),
+ ("RO_SPACE", 0x03529): (150, "FixedDoubleArrayMap"),
+ ("RO_SPACE", 0x03579): (189, "GlobalDictionaryMap"),
+ ("RO_SPACE", 0x035c9): (212, "ManyClosuresCellMap"),
+ ("RO_SPACE", 0x03619): (183, "ModuleInfoMap"),
+ ("RO_SPACE", 0x03669): (134, "MutableHeapNumberMap"),
+ ("RO_SPACE", 0x036b9): (188, "NameDictionaryMap"),
+ ("RO_SPACE", 0x03709): (212, "NoClosuresCellMap"),
+ ("RO_SPACE", 0x03759): (190, "NumberDictionaryMap"),
+ ("RO_SPACE", 0x037a9): (212, "OneClosureCellMap"),
+ ("RO_SPACE", 0x037f9): (186, "OrderedHashMapMap"),
+ ("RO_SPACE", 0x03849): (187, "OrderedHashSetMap"),
+ ("RO_SPACE", 0x03899): (215, "PreParsedScopeDataMap"),
+ ("RO_SPACE", 0x038e9): (216, "PropertyArrayMap"),
+ ("RO_SPACE", 0x03939): (209, "SideEffectCallHandlerInfoMap"),
+ ("RO_SPACE", 0x03989): (209, "SideEffectFreeCallHandlerInfoMap"),
+ ("RO_SPACE", 0x039d9): (209, "NextCallSideEffectFreeCallHandlerInfoMap"),
+ ("RO_SPACE", 0x03a29): (191, "SimpleNumberDictionaryMap"),
+ ("RO_SPACE", 0x03a79): (183, "SloppyArgumentsElementsMap"),
+ ("RO_SPACE", 0x03ac9): (219, "SmallOrderedHashMapMap"),
+ ("RO_SPACE", 0x03b19): (220, "SmallOrderedHashSetMap"),
+ ("RO_SPACE", 0x03b69): (192, "StringTableMap"),
+ ("RO_SPACE", 0x03bb9): (222, "UncompiledDataWithoutPreParsedScopeMap"),
+ ("RO_SPACE", 0x03c09): (223, "UncompiledDataWithPreParsedScopeMap"),
+ ("RO_SPACE", 0x03c59): (224, "WeakArrayListMap"),
+ ("RO_SPACE", 0x03ca9): (193, "EphemeronHashTableMap"),
+ ("RO_SPACE", 0x03cf9): (106, "NativeSourceStringMap"),
+ ("RO_SPACE", 0x03d49): (64, "StringMap"),
+ ("RO_SPACE", 0x03d99): (73, "ConsOneByteStringMap"),
+ ("RO_SPACE", 0x03de9): (65, "ConsStringMap"),
+ ("RO_SPACE", 0x03e39): (77, "ThinOneByteStringMap"),
+ ("RO_SPACE", 0x03e89): (69, "ThinStringMap"),
+ ("RO_SPACE", 0x03ed9): (67, "SlicedStringMap"),
+ ("RO_SPACE", 0x03f29): (75, "SlicedOneByteStringMap"),
+ ("RO_SPACE", 0x03f79): (66, "ExternalStringMap"),
+ ("RO_SPACE", 0x03fc9): (82, "ExternalStringWithOneByteDataMap"),
+ ("RO_SPACE", 0x04019): (74, "ExternalOneByteStringMap"),
+ ("RO_SPACE", 0x04069): (98, "UncachedExternalStringMap"),
+ ("RO_SPACE", 0x040b9): (114, "UncachedExternalStringWithOneByteDataMap"),
+ ("RO_SPACE", 0x04109): (0, "InternalizedStringMap"),
+ ("RO_SPACE", 0x04159): (2, "ExternalInternalizedStringMap"),
+ ("RO_SPACE", 0x041a9): (18, "ExternalInternalizedStringWithOneByteDataMap"),
+ ("RO_SPACE", 0x041f9): (10, "ExternalOneByteInternalizedStringMap"),
+ ("RO_SPACE", 0x04249): (34, "UncachedExternalInternalizedStringMap"),
+ ("RO_SPACE", 0x04299): (50, "UncachedExternalInternalizedStringWithOneByteDataMap"),
+ ("RO_SPACE", 0x042e9): (42, "UncachedExternalOneByteInternalizedStringMap"),
+ ("RO_SPACE", 0x04339): (106, "UncachedExternalOneByteStringMap"),
+ ("RO_SPACE", 0x04389): (140, "FixedUint8ArrayMap"),
+ ("RO_SPACE", 0x043d9): (139, "FixedInt8ArrayMap"),
+ ("RO_SPACE", 0x04429): (142, "FixedUint16ArrayMap"),
+ ("RO_SPACE", 0x04479): (141, "FixedInt16ArrayMap"),
+ ("RO_SPACE", 0x044c9): (144, "FixedUint32ArrayMap"),
+ ("RO_SPACE", 0x04519): (143, "FixedInt32ArrayMap"),
+ ("RO_SPACE", 0x04569): (145, "FixedFloat32ArrayMap"),
+ ("RO_SPACE", 0x045b9): (146, "FixedFloat64ArrayMap"),
+ ("RO_SPACE", 0x04609): (147, "FixedUint8ClampedArrayMap"),
+ ("RO_SPACE", 0x04659): (149, "FixedBigUint64ArrayMap"),
+ ("RO_SPACE", 0x046a9): (148, "FixedBigInt64ArrayMap"),
+ ("RO_SPACE", 0x046f9): (131, "SelfReferenceMarkerMap"),
+ ("RO_SPACE", 0x04761): (171, "Tuple2Map"),
+ ("RO_SPACE", 0x04801): (173, "ArrayBoilerplateDescriptionMap"),
+ ("RO_SPACE", 0x04af1): (161, "InterceptorInfoMap"),
+ ("RO_SPACE", 0x06ea9): (153, "AccessCheckInfoMap"),
+ ("RO_SPACE", 0x06ef9): (154, "AccessorInfoMap"),
+ ("RO_SPACE", 0x06f49): (155, "AccessorPairMap"),
+ ("RO_SPACE", 0x06f99): (156, "AliasedArgumentsEntryMap"),
+ ("RO_SPACE", 0x06fe9): (157, "AllocationMementoMap"),
+ ("RO_SPACE", 0x07039): (158, "AsyncGeneratorRequestMap"),
+ ("RO_SPACE", 0x07089): (159, "DebugInfoMap"),
+ ("RO_SPACE", 0x070d9): (160, "FunctionTemplateInfoMap"),
+ ("RO_SPACE", 0x07129): (162, "InterpreterDataMap"),
+ ("RO_SPACE", 0x07179): (163, "ModuleInfoEntryMap"),
+ ("RO_SPACE", 0x071c9): (164, "ModuleMap"),
+ ("RO_SPACE", 0x07219): (165, "ObjectTemplateInfoMap"),
+ ("RO_SPACE", 0x07269): (166, "PromiseCapabilityMap"),
+ ("RO_SPACE", 0x072b9): (167, "PromiseReactionMap"),
+ ("RO_SPACE", 0x07309): (168, "PrototypeInfoMap"),
+ ("RO_SPACE", 0x07359): (169, "ScriptMap"),
+ ("RO_SPACE", 0x073a9): (170, "StackFrameInfoMap"),
+ ("RO_SPACE", 0x073f9): (172, "Tuple3Map"),
+ ("RO_SPACE", 0x07449): (174, "WasmDebugInfoMap"),
+ ("RO_SPACE", 0x07499): (175, "WasmExportedFunctionDataMap"),
+ ("RO_SPACE", 0x074e9): (176, "CallableTaskMap"),
+ ("RO_SPACE", 0x07539): (177, "CallbackTaskMap"),
+ ("RO_SPACE", 0x07589): (178, "PromiseFulfillReactionJobTaskMap"),
+ ("RO_SPACE", 0x075d9): (179, "PromiseRejectReactionJobTaskMap"),
+ ("RO_SPACE", 0x07629): (180, "PromiseResolveThenableJobTaskMap"),
+ ("RO_SPACE", 0x07679): (181, "MicrotaskQueueMap"),
+ ("RO_SPACE", 0x076c9): (182, "AllocationSiteWithWeakNextMap"),
+ ("RO_SPACE", 0x07719): (182, "AllocationSiteWithoutWeakNextMap"),
+ ("RO_SPACE", 0x07769): (214, "LoadHandler1Map"),
+ ("RO_SPACE", 0x077b9): (214, "LoadHandler2Map"),
+ ("RO_SPACE", 0x07809): (214, "LoadHandler3Map"),
+ ("RO_SPACE", 0x07859): (221, "StoreHandler0Map"),
+ ("RO_SPACE", 0x078a9): (221, "StoreHandler1Map"),
+ ("RO_SPACE", 0x078f9): (221, "StoreHandler2Map"),
+ ("RO_SPACE", 0x07949): (221, "StoreHandler3Map"),
("MAP_SPACE", 0x02201): (1057, "ExternalMap"),
("MAP_SPACE", 0x02251): (1072, "JSMessageObjectMap"),
}
@@ -319,39 +335,39 @@ KNOWN_OBJECTS = {
("RO_SPACE", 0x022a1): "NullValue",
("RO_SPACE", 0x02321): "EmptyDescriptorArray",
("RO_SPACE", 0x02491): "UninitializedValue",
- ("RO_SPACE", 0x025b1): "UndefinedValue",
- ("RO_SPACE", 0x02631): "NanValue",
- ("RO_SPACE", 0x02691): "TheHoleValue",
- ("RO_SPACE", 0x02731): "HoleNanValue",
- ("RO_SPACE", 0x02741): "TrueValue",
- ("RO_SPACE", 0x02801): "FalseValue",
- ("RO_SPACE", 0x02851): "empty_string",
- ("RO_SPACE", 0x02d19): "EmptyScopeInfo",
- ("RO_SPACE", 0x02d29): "EmptyFixedArray",
- ("RO_SPACE", 0x02d39): "ArgumentsMarker",
- ("RO_SPACE", 0x02de1): "Exception",
- ("RO_SPACE", 0x02e89): "TerminationException",
- ("RO_SPACE", 0x02f39): "OptimizedOut",
- ("RO_SPACE", 0x02fe1): "StaleRegister",
- ("RO_SPACE", 0x047d1): "EmptyByteArray",
- ("RO_SPACE", 0x04861): "EmptyFixedUint8Array",
- ("RO_SPACE", 0x04881): "EmptyFixedInt8Array",
- ("RO_SPACE", 0x048a1): "EmptyFixedUint16Array",
- ("RO_SPACE", 0x048c1): "EmptyFixedInt16Array",
- ("RO_SPACE", 0x048e1): "EmptyFixedUint32Array",
- ("RO_SPACE", 0x04901): "EmptyFixedInt32Array",
- ("RO_SPACE", 0x04921): "EmptyFixedFloat32Array",
- ("RO_SPACE", 0x04941): "EmptyFixedFloat64Array",
- ("RO_SPACE", 0x04961): "EmptyFixedUint8ClampedArray",
- ("RO_SPACE", 0x049c1): "EmptySloppyArgumentsElements",
- ("RO_SPACE", 0x049e1): "EmptySlowElementDictionary",
- ("RO_SPACE", 0x04a29): "EmptyOrderedHashMap",
- ("RO_SPACE", 0x04a51): "EmptyOrderedHashSet",
- ("RO_SPACE", 0x04a89): "EmptyPropertyCell",
- ("RO_SPACE", 0x04b69): "InfinityValue",
- ("RO_SPACE", 0x04b79): "MinusZeroValue",
- ("RO_SPACE", 0x04b89): "MinusInfinityValue",
- ("RO_SPACE", 0x04b99): "SelfReferenceMarker",
+ ("RO_SPACE", 0x025a1): "UndefinedValue",
+ ("RO_SPACE", 0x02621): "NanValue",
+ ("RO_SPACE", 0x02681): "TheHoleValue",
+ ("RO_SPACE", 0x02719): "HoleNanValue",
+ ("RO_SPACE", 0x02729): "TrueValue",
+ ("RO_SPACE", 0x027d9): "FalseValue",
+ ("RO_SPACE", 0x02821): "empty_string",
+ ("RO_SPACE", 0x02ce1): "EmptyScopeInfo",
+ ("RO_SPACE", 0x02cf1): "EmptyFixedArray",
+ ("RO_SPACE", 0x02d01): "ArgumentsMarker",
+ ("RO_SPACE", 0x02da1): "Exception",
+ ("RO_SPACE", 0x02e41): "TerminationException",
+ ("RO_SPACE", 0x02ee9): "OptimizedOut",
+ ("RO_SPACE", 0x02f89): "StaleRegister",
+ ("RO_SPACE", 0x047c1): "EmptyByteArray",
+ ("RO_SPACE", 0x04851): "EmptyFixedUint8Array",
+ ("RO_SPACE", 0x04871): "EmptyFixedInt8Array",
+ ("RO_SPACE", 0x04891): "EmptyFixedUint16Array",
+ ("RO_SPACE", 0x048b1): "EmptyFixedInt16Array",
+ ("RO_SPACE", 0x048d1): "EmptyFixedUint32Array",
+ ("RO_SPACE", 0x048f1): "EmptyFixedInt32Array",
+ ("RO_SPACE", 0x04911): "EmptyFixedFloat32Array",
+ ("RO_SPACE", 0x04931): "EmptyFixedFloat64Array",
+ ("RO_SPACE", 0x04951): "EmptyFixedUint8ClampedArray",
+ ("RO_SPACE", 0x049b1): "EmptySloppyArgumentsElements",
+ ("RO_SPACE", 0x049d1): "EmptySlowElementDictionary",
+ ("RO_SPACE", 0x04a19): "EmptyOrderedHashMap",
+ ("RO_SPACE", 0x04a41): "EmptyOrderedHashSet",
+ ("RO_SPACE", 0x04a79): "EmptyPropertyCell",
+ ("RO_SPACE", 0x04b59): "InfinityValue",
+ ("RO_SPACE", 0x04b69): "MinusZeroValue",
+ ("RO_SPACE", 0x04b79): "MinusInfinityValue",
+ ("RO_SPACE", 0x04b89): "SelfReferenceMarker",
("OLD_SPACE", 0x02211): "EmptyScript",
("OLD_SPACE", 0x02291): "ManyClosuresCell",
("OLD_SPACE", 0x022b1): "NoElementsProtector",
@@ -362,6 +378,7 @@ KNOWN_OBJECTS = {
("OLD_SPACE", 0x02361): "StringLengthProtector",
("OLD_SPACE", 0x02371): "ArrayIteratorProtector",
("OLD_SPACE", 0x02399): "ArrayBufferNeuteringProtector",
+ ("OLD_SPACE", 0x02421): "StringIteratorProtector",
}
# List of known V8 Frame Markers.
diff --git a/deps/v8/tools/whitespace.txt b/deps/v8/tools/whitespace.txt
index 654e19f7e9..11f5364162 100644
--- a/deps/v8/tools/whitespace.txt
+++ b/deps/v8/tools/whitespace.txt
@@ -6,5 +6,5 @@ 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 bartender starts to shake the bottles...
+The autoroller bought a round of Himbeerbrause. Suddenly.....
+The bartender starts to shake the bottles......