summaryrefslogtreecommitdiff
path: root/deps/v8/tools
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-10-13 17:45:02 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-10-13 17:45:02 -0700
commit33b5f2f7799081eafe04df3278aad40fd4ae3b55 (patch)
tree46e2840438240411375d3f12f5172c42aa571f95 /deps/v8/tools
parent59a5262041dce0760b1f960a900eca8b8ca1138f (diff)
downloadnode-new-33b5f2f7799081eafe04df3278aad40fd4ae3b55.tar.gz
Upgrade V8 to 3.7.0
Diffstat (limited to 'deps/v8/tools')
-rwxr-xr-xdeps/v8/tools/gc-nvp-trace-processor.py59
-rw-r--r--deps/v8/tools/gcmole/gccause.lua2
-rw-r--r--deps/v8/tools/gyp/v8.gyp9
-rwxr-xr-xdeps/v8/tools/linux-tick-processor31
-rwxr-xr-xdeps/v8/tools/ll_prof.py16
-rw-r--r--deps/v8/tools/logreader.js7
-rwxr-xr-xdeps/v8/tools/presubmit.py7
-rwxr-xr-xdeps/v8/tools/push-to-trunk.sh12
-rwxr-xr-xdeps/v8/tools/test-wrapper-gypbuild.py30
9 files changed, 134 insertions, 39 deletions
diff --git a/deps/v8/tools/gc-nvp-trace-processor.py b/deps/v8/tools/gc-nvp-trace-processor.py
index 511ab2bcdf..de3dc90bd4 100755
--- a/deps/v8/tools/gc-nvp-trace-processor.py
+++ b/deps/v8/tools/gc-nvp-trace-processor.py
@@ -226,6 +226,10 @@ def scavenge_scope(r):
return r['pause'] - r['external']
return 0
+
+def real_mutator(r):
+ return r['mutator'] - r['stepstook']
+
plots = [
[
Set('style fill solid 0.5 noborder'),
@@ -236,7 +240,24 @@ plots = [
Item('Sweep', 'sweep', lc = 'blue'),
Item('Compaction', 'compact', lc = 'red'),
Item('External', 'external', lc = '#489D43'),
- Item('Other', other_scope, lc = 'grey'))
+ Item('Other', other_scope, lc = 'grey'),
+ Item('IGC Steps', 'stepstook', lc = '#FF6347'))
+ ],
+ [
+ Set('style fill solid 0.5 noborder'),
+ Set('style histogram rowstacked'),
+ Set('style data histograms'),
+ Plot(Item('Scavenge', scavenge_scope, lc = 'green'),
+ Item('Marking', 'mark', lc = 'purple'),
+ Item('Sweep', 'sweep', lc = 'blue'),
+ Item('Compaction', 'compact', lc = 'red'),
+ Item('External', 'external', lc = '#489D43'),
+ Item('Other', other_scope, lc = '#ADD8E6'),
+ Item('External', 'external', lc = '#D3D3D3'))
+ ],
+
+ [
+ Plot(Item('Mutator', real_mutator, lc = 'black', style = 'lines'))
],
[
Set('style histogram rowstacked'),
@@ -275,7 +296,7 @@ def freduce(f, field, trace, init):
return reduce(lambda t,r: f(t, r[field]), trace, init)
def calc_total(trace, field):
- return freduce(lambda t,v: t + v, field, trace, 0)
+ return freduce(lambda t,v: t + long(v), field, trace, long(0))
def calc_max(trace, field):
return freduce(lambda t,r: max(t, r), field, trace, 0)
@@ -290,6 +311,8 @@ def process_trace(filename):
marksweeps = filter(lambda r: r['gc'] == 'ms', trace)
markcompacts = filter(lambda r: r['gc'] == 'mc', trace)
scavenges = filter(lambda r: r['gc'] == 's', trace)
+ globalgcs = filter(lambda r: r['gc'] != 's', trace)
+
charts = plot_all(plots, trace, filename)
@@ -302,7 +325,7 @@ def process_trace(filename):
else:
avg = 0
if n > 1:
- dev = math.sqrt(freduce(lambda t,r: (r - avg) ** 2, field, trace, 0) /
+ dev = math.sqrt(freduce(lambda t,r: t + (r - avg) ** 2, field, trace, 0) /
(n - 1))
else:
dev = 0
@@ -311,6 +334,31 @@ def process_trace(filename):
'<td>%d</td><td>%d [dev %f]</td></tr>' %
(prefix, n, total, max, avg, dev))
+ def HumanReadable(size):
+ suffixes = ['bytes', 'kB', 'MB', 'GB']
+ power = 1
+ for i in range(len(suffixes)):
+ if size < power*1024:
+ return "%.1f" % (float(size) / power) + " " + suffixes[i]
+ power *= 1024
+
+ def throughput(name, trace):
+ total_live_after = calc_total(trace, 'total_size_after')
+ total_live_before = calc_total(trace, 'total_size_before')
+ total_gc = calc_total(trace, 'pause')
+ if total_gc == 0:
+ return
+ out.write('GC %s Throughput (after): %s / %s ms = %s/ms<br/>' %
+ (name,
+ HumanReadable(total_live_after),
+ total_gc,
+ HumanReadable(total_live_after / total_gc)))
+ out.write('GC %s Throughput (before): %s / %s ms = %s/ms<br/>' %
+ (name,
+ HumanReadable(total_live_before),
+ total_gc,
+ HumanReadable(total_live_before / total_gc)))
+
with open(filename + '.html', 'w') as out:
out.write('<html><body>')
@@ -329,6 +377,11 @@ def process_trace(filename):
filter(lambda r: r['external'] != 0, trace),
'external')
out.write('</table>')
+ throughput('TOTAL', trace)
+ throughput('MS', marksweeps)
+ throughput('MC', markcompacts)
+ throughput('OLDSPACE', globalgcs)
+ out.write('<br/>')
for chart in charts:
out.write('<img src="%s">' % chart)
out.write('</body></html>')
diff --git a/deps/v8/tools/gcmole/gccause.lua b/deps/v8/tools/gcmole/gccause.lua
index a6fe542137..b9891767de 100644
--- a/deps/v8/tools/gcmole/gccause.lua
+++ b/deps/v8/tools/gcmole/gccause.lua
@@ -48,6 +48,8 @@ local function TrackCause(name, lvl)
T[f] = true
TrackCause(f, (lvl or 0) + 1)
end
+
+ if f == '<GC>' then break end
end
end
end
diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp
index 92d1e5c96a..4812930072 100644
--- a/deps/v8/tools/gyp/v8.gyp
+++ b/deps/v8/tools/gyp/v8.gyp
@@ -340,6 +340,8 @@
'../../src/ic-inl.h',
'../../src/ic.cc',
'../../src/ic.h',
+ '../../src/incremental-marking.cc',
+ '../../src/incremental-marking.h',
'../../src/inspector.cc',
'../../src/inspector.h',
'../../src/interpreter-irregexp.cc',
@@ -431,6 +433,9 @@
'../../src/spaces-inl.h',
'../../src/spaces.cc',
'../../src/spaces.h',
+ '../../src/store-buffer-inl.h',
+ '../../src/store-buffer.cc',
+ '../../src/store-buffer.h',
'../../src/string-search.cc',
'../../src/string-search.h',
'../../src/string-stream.cc',
@@ -644,7 +649,7 @@
['OS=="solaris"', {
'sources': [
'../../src/platform-solaris.cc',
- '../../src/platform-posix.cc'
+ '../../src/platform-posix.cc',
],
}
],
@@ -865,7 +870,7 @@
'targets': [
{
'target_name': 'v8',
- 'type': 'settings',
+ 'type': 'none',
'conditions': [
['want_separate_host_toolset==1', {
'toolsets': ['host', 'target'],
diff --git a/deps/v8/tools/linux-tick-processor b/deps/v8/tools/linux-tick-processor
index 0b0a1fbd27..7070ce6fcc 100755
--- a/deps/v8/tools/linux-tick-processor
+++ b/deps/v8/tools/linux-tick-processor
@@ -1,5 +1,14 @@
#!/bin/sh
+# find the name of the log file to process, it must not start with a dash.
+log_file="v8.log"
+for arg in "$@"
+do
+ if ! expr "X${arg}" : "^X-" > /dev/null; then
+ log_file=${arg}
+ fi
+done
+
tools_path=`cd $(dirname "$0");pwd`
if [ ! "$D8_PATH" ]; then
d8_public=`which d8`
@@ -9,21 +18,19 @@ fi
d8_exec=$D8_PATH/d8
if [ ! -x $d8_exec ]; then
- echo "d8 shell not found in $D8_PATH"
- echo "To build, execute 'scons <flags> d8' from the V8 directory"
- exit 1
+ D8_PATH=`pwd`/out/native
+ d8_exec=$D8_PATH/d8
fi
+if [ ! -x $d8_exec ]; then
+ d8_exec=`grep -m 1 -o '".*/d8"' $log_file | sed 's/"//g'`
+fi
-# find the name of the log file to process, it must not start with a dash.
-log_file="v8.log"
-for arg in "$@"
-do
- if ! expr "X${arg}" : "^X-" > /dev/null; then
- log_file=${arg}
- fi
-done
-
+if [ ! -x $d8_exec ]; then
+ echo "d8 shell not found in $D8_PATH"
+ echo "To build, execute 'make native' from the V8 directory"
+ exit 1
+fi
# nm spits out 'no symbols found' messages to stderr.
cat $log_file | $d8_exec $tools_path/splaytree.js $tools_path/codemap.js \
diff --git a/deps/v8/tools/ll_prof.py b/deps/v8/tools/ll_prof.py
index 58cbb95851..30d10c3031 100755
--- a/deps/v8/tools/ll_prof.py
+++ b/deps/v8/tools/ll_prof.py
@@ -399,12 +399,16 @@ class LogReader(object):
code = Code(name, start_address, end_address, origin, origin_offset)
conficting_code = self.code_map.Find(start_address)
if conficting_code:
- LogReader._HandleCodeConflict(conficting_code, code)
- # TODO(vitalyr): this warning is too noisy because of our
- # attempts to reconstruct code log from the snapshot.
- # print >>sys.stderr, \
- # "Warning: Skipping duplicate code log entry %s" % code
- continue
+ if not (conficting_code.start_address == code.start_address and
+ conficting_code.end_address == code.end_address):
+ self.code_map.Remove(conficting_code)
+ else:
+ LogReader._HandleCodeConflict(conficting_code, code)
+ # TODO(vitalyr): this warning is too noisy because of our
+ # attempts to reconstruct code log from the snapshot.
+ # print >>sys.stderr, \
+ # "Warning: Skipping duplicate code log entry %s" % code
+ continue
self.code_map.Add(code)
continue
diff --git a/deps/v8/tools/logreader.js b/deps/v8/tools/logreader.js
index 315e721276..a8141da21b 100644
--- a/deps/v8/tools/logreader.js
+++ b/deps/v8/tools/logreader.js
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -134,9 +134,8 @@ LogReader.prototype.skipDispatch = function(dispatch) {
LogReader.prototype.dispatchLogRow_ = function(fields) {
// Obtain the dispatch.
var command = fields[0];
- if (!(command in this.dispatchTable_)) {
- throw new Error('unknown command: ' + command);
- }
+ if (!(command in this.dispatchTable_)) return;
+
var dispatch = this.dispatchTable_[command];
if (dispatch === null || this.skipDispatch(dispatch)) {
diff --git a/deps/v8/tools/presubmit.py b/deps/v8/tools/presubmit.py
index fda7ba96e5..7af6e3d0d8 100755
--- a/deps/v8/tools/presubmit.py
+++ b/deps/v8/tools/presubmit.py
@@ -211,7 +211,12 @@ class CppLintProcessor(SourceFileProcessor):
if exists(local_cpplint):
command = ['python', local_cpplint, '--filter', filt] + join(files)
- process = subprocess.Popen(command, stderr=subprocess.PIPE)
+ try:
+ process = subprocess.Popen(command, stderr=subprocess.PIPE)
+ except:
+ print('Error running cpplint.py. Please make sure you have depot_tools' +
+ ' in your $PATH. Lint check skipped.')
+ return True
LINT_ERROR_PATTERN = re.compile(r'^(.+)[:(]\d+[:)]')
while True:
out_line = process.stderr.readline()
diff --git a/deps/v8/tools/push-to-trunk.sh b/deps/v8/tools/push-to-trunk.sh
index 761b733679..bd5d003cfd 100755
--- a/deps/v8/tools/push-to-trunk.sh
+++ b/deps/v8/tools/push-to-trunk.sh
@@ -202,10 +202,14 @@ if [ $STEP -le 4 ] ; then
for commit in $COMMITS ; do
# Get the commit's title line.
git log -1 $commit --format="%w(80,8,8)%s" >> "$CHANGELOG_ENTRY_FILE"
- # Grep for "BUG=xxxx" lines in the commit message.
- git log -1 $commit --format="%b" | grep BUG= | grep -v "BUG=$" \
- | sed -e 's/^/ /' \
- >> "$CHANGELOG_ENTRY_FILE"
+ # Grep for "BUG=xxxx" lines in the commit message and convert them to
+ # "(issue xxxx)".
+ git log -1 $commit --format="%B" \
+ | grep "^BUG=" | grep -v "BUG=$" \
+ | sed -e 's/^/ /' \
+ | sed -e 's/BUG=v8:\(.*\)$/(issue \1)/' \
+ | sed -e 's/BUG=\(.*\)$/(Chromium issue \1)/' \
+ >> "$CHANGELOG_ENTRY_FILE"
# Append the commit's author for reference.
git log -1 $commit --format="%w(80,8,8)(%an)" >> "$CHANGELOG_ENTRY_FILE"
echo "" >> "$CHANGELOG_ENTRY_FILE"
diff --git a/deps/v8/tools/test-wrapper-gypbuild.py b/deps/v8/tools/test-wrapper-gypbuild.py
index ad5449a404..a990b7ee59 100755
--- a/deps/v8/tools/test-wrapper-gypbuild.py
+++ b/deps/v8/tools/test-wrapper-gypbuild.py
@@ -131,16 +131,20 @@ def BuildOptions():
def ProcessOptions(options):
- if options.arch_and_mode != None and options.arch_and_mode != "":
- tokens = options.arch_and_mode.split(".")
- options.arch = tokens[0]
- options.mode = tokens[1]
- options.mode = options.mode.split(',')
+ if options.arch_and_mode == ".":
+ options.arch = []
+ options.mode = []
+ else:
+ if options.arch_and_mode != None and options.arch_and_mode != "":
+ tokens = options.arch_and_mode.split(".")
+ options.arch = tokens[0]
+ options.mode = tokens[1]
+ options.mode = options.mode.split(',')
+ options.arch = options.arch.split(',')
for mode in options.mode:
if not mode in ['debug', 'release']:
print "Unknown mode %s" % mode
return False
- options.arch = options.arch.split(',')
for arch in options.arch:
if not arch in ['ia32', 'x64', 'arm']:
print "Unknown architecture %s" % arch
@@ -165,7 +169,7 @@ def PassOnOptions(options):
if options.snapshot:
result += ['--snapshot']
if options.special_command:
- result += ['--special-command=' + options.special_command]
+ result += ['--special-command="%s"' % options.special_command]
if options.valgrind:
result += ['--valgrind']
if options.cat:
@@ -232,6 +236,18 @@ def Main():
env=env)
returncodes += child.wait()
+ if len(options.mode) == 0 and len(options.arch) == 0:
+ print ">>> running tests"
+ shellpath = workspace + '/' + options.outdir
+ env['LD_LIBRARY_PATH'] = shellpath + '/lib.target'
+ shell = shellpath + '/d8'
+ child = subprocess.Popen(' '.join(args_for_children +
+ ['--shell=' + shell]),
+ shell=True,
+ cwd=workspace,
+ env=env)
+ returncodes = child.wait()
+
return returncodes