summaryrefslogtreecommitdiff
path: root/deps/v8/tools
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools')
-rw-r--r--deps/v8/tools/gyp/v8.gyp42
-rwxr-xr-xdeps/v8/tools/js2c.py2
-rwxr-xr-xdeps/v8/tools/presubmit.py2
-rwxr-xr-xdeps/v8/tools/process-heap-prof.py54
-rwxr-xr-xdeps/v8/tools/test.py13
-rw-r--r--deps/v8/tools/visual_studio/v8_base.vcproj4
-rw-r--r--deps/v8/tools/visual_studio/v8_base_arm.vcproj4
7 files changed, 99 insertions, 22 deletions
diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp
index 5e2bb88e92..75464f206a 100644
--- a/deps/v8/tools/gyp/v8.gyp
+++ b/deps/v8/tools/gyp/v8.gyp
@@ -156,8 +156,8 @@
'target_name': 'v8_snapshot',
'type': '<(library)',
'dependencies': [
- 'mksnapshot',
- 'js2c',
+ 'mksnapshot#host',
+ 'js2c#host',
'v8_base',
],
'include_dirs+': [
@@ -183,8 +183,9 @@
{
'target_name': 'v8_nosnapshot',
'type': '<(library)',
+ 'toolsets': ['host', 'target'],
'dependencies': [
- 'js2c',
+ 'js2c#host',
'v8_base',
],
'include_dirs+': [
@@ -194,10 +195,21 @@
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
'../../src/snapshot-empty.cc',
],
+ 'conditions': [
+ # The ARM assembler assumes the host is 32 bits, so force building
+ # 32-bit host tools.
+ # TODO(piman): This assumes that the host is ia32 or amd64. Fixing the
+ # code would be better
+ ['target_arch=="arm" and _toolset=="host"', {
+ 'cflags': ['-m32'],
+ 'ldflags': ['-m32'],
+ }]
+ ]
},
{
'target_name': 'v8_base',
'type': '<(library)',
+ 'toolsets': ['host', 'target'],
'include_dirs+': [
'../../src',
],
@@ -293,7 +305,6 @@
'../../src/jsregexp.h',
'../../src/list-inl.h',
'../../src/list.h',
- '../../src/location.h',
'../../src/log-inl.h',
'../../src/log-utils.cc',
'../../src/log-utils.h',
@@ -394,6 +405,7 @@
'../../src/arm/codegen-arm.cc',
'../../src/arm/codegen-arm.h',
'../../src/arm/constants-arm.h',
+ '../../src/arm/constants-arm.cc',
'../../src/arm/cpu-arm.cc',
'../../src/arm/debug-arm.cc',
'../../src/arm/disasm-arm.cc',
@@ -412,6 +424,16 @@
'../../src/arm/virtual-frame-arm.cc',
'../../src/arm/virtual-frame-arm.h',
],
+ 'conditions': [
+ # The ARM assembler assumes the host is 32 bits, so force building
+ # 32-bit host tools.
+ # TODO(piman): This assumes that the host is ia32 or amd64. Fixing
+ # the code would be better
+ ['_toolset=="host"', {
+ 'cflags': ['-m32'],
+ 'ldflags': ['-m32'],
+ }]
+ ]
}],
['target_arch=="ia32"', {
'include_dirs+': [
@@ -508,6 +530,7 @@
{
'target_name': 'js2c',
'type': 'none',
+ 'toolsets': ['host'],
'variables': {
'library_files': [
'../../src/runtime.js',
@@ -550,6 +573,7 @@
{
'target_name': 'mksnapshot',
'type': 'executable',
+ 'toolsets': ['host'],
'dependencies': [
'v8_nosnapshot',
],
@@ -559,6 +583,16 @@
'sources': [
'../../src/mksnapshot.cc',
],
+ 'conditions': [
+ # The ARM assembler assumes the host is 32 bits, so force building
+ # 32-bit host tools.
+ # TODO(piman): This assumes that the host is ia32 or amd64. Fixing
+ # the code would be better
+ ['target_arch=="arm" and _toolset=="host"', {
+ 'cflags': ['-m32'],
+ 'ldflags': ['-m32'],
+ }]
+ ]
},
{
'target_name': 'v8_shell',
diff --git a/deps/v8/tools/js2c.py b/deps/v8/tools/js2c.py
index 2b7dbdfbae..b889530d5a 100755
--- a/deps/v8/tools/js2c.py
+++ b/deps/v8/tools/js2c.py
@@ -301,7 +301,7 @@ def JS2C(source, target, env):
else:
ids.append((id, len(lines)))
source_lines.append(SOURCE_DECLARATION % { 'id': id, 'data': data })
- source_lines_empty.append(SOURCE_DECLARATION % { 'id': id, 'data': 0 })
+ source_lines_empty.append(SOURCE_DECLARATION % { 'id': id, 'data': data })
# Build delay support functions
get_index_cases = [ ]
diff --git a/deps/v8/tools/presubmit.py b/deps/v8/tools/presubmit.py
index c4f78536bb..5a99c2adda 100755
--- a/deps/v8/tools/presubmit.py
+++ b/deps/v8/tools/presubmit.py
@@ -108,7 +108,7 @@ class SourceFileProcessor(object):
return True
def IgnoreDir(self, name):
- return name.startswith('.') or name == 'data'
+ return name.startswith('.') or name == 'data' or name == 'sputniktests'
def IgnoreFile(self, name):
return name.startswith('.')
diff --git a/deps/v8/tools/process-heap-prof.py b/deps/v8/tools/process-heap-prof.py
index ff83952e0e..6a2c3978d2 100755
--- a/deps/v8/tools/process-heap-prof.py
+++ b/deps/v8/tools/process-heap-prof.py
@@ -40,9 +40,14 @@
# to get JS constructor profile
-import csv, sys, time
+import csv, sys, time, optparse
-def process_logfile(filename, itemname):
+def ProcessLogFile(filename, options):
+ if options.js_cons_profile:
+ itemname = 'heap-js-cons-item'
+ else:
+ itemname = 'heap-sample-item'
+
first_call_time = None
sample_time = 0.0
sampling = False
@@ -68,13 +73,48 @@ def process_logfile(filename, itemname):
print('END_SAMPLE %.2f' % sample_time)
sampling = False
elif row[0] == itemname and sampling:
- print('%s %d' % (row[1], int(row[3])))
+ print(row[1]),
+ if options.count:
+ print('%d' % (int(row[2]))),
+ if options.size:
+ print('%d' % (int(row[3]))),
+ print
finally:
logfile.close()
except:
sys.exit('can\'t open %s' % filename)
-if sys.argv[1] == '--js-cons-profile':
- process_logfile(sys.argv[2], 'heap-js-cons-item')
-else:
- process_logfile(sys.argv[1], 'heap-sample-item')
+
+def BuildOptions():
+ result = optparse.OptionParser()
+ result.add_option("--js_cons_profile", help="Constructor profile",
+ default=False, action="store_true")
+ result.add_option("--size", help="Report object size",
+ default=False, action="store_true")
+ result.add_option("--count", help="Report object count",
+ default=False, action="store_true")
+ return result
+
+
+def ProcessOptions(options):
+ if not options.size and not options.count:
+ options.size = True
+ return True
+
+
+def Main():
+ parser = BuildOptions()
+ (options, args) = parser.parse_args()
+ if not ProcessOptions(options):
+ parser.print_help()
+ sys.exit();
+
+ if not args:
+ print "Missing logfile"
+ sys.exit();
+
+ ProcessLogFile(args[0], options)
+
+
+if __name__ == '__main__':
+ sys.exit(Main())
diff --git a/deps/v8/tools/test.py b/deps/v8/tools/test.py
index d206e33e5b..75b4f61f75 100755
--- a/deps/v8/tools/test.py
+++ b/deps/v8/tools/test.py
@@ -359,8 +359,19 @@ class TestCase(object):
self.Cleanup()
return TestOutput(self, full_command, output)
+ def BeforeRun(self):
+ pass
+
+ def AfterRun(self):
+ pass
+
def Run(self):
- return self.RunCommand(self.GetCommand())
+ self.BeforeRun()
+ try:
+ result = self.RunCommand(self.GetCommand())
+ finally:
+ self.AfterRun()
+ return result
def Cleanup(self):
return
diff --git a/deps/v8/tools/visual_studio/v8_base.vcproj b/deps/v8/tools/visual_studio/v8_base.vcproj
index fc7402aebb..6b47359754 100644
--- a/deps/v8/tools/visual_studio/v8_base.vcproj
+++ b/deps/v8/tools/visual_studio/v8_base.vcproj
@@ -557,10 +557,6 @@
>
</File>
<File
- RelativePath="..\..\src\location.h"
- >
- </File>
- <File
RelativePath="..\..\src\log.cc"
>
</File>
diff --git a/deps/v8/tools/visual_studio/v8_base_arm.vcproj b/deps/v8/tools/visual_studio/v8_base_arm.vcproj
index fca4a96058..afb4f74b79 100644
--- a/deps/v8/tools/visual_studio/v8_base_arm.vcproj
+++ b/deps/v8/tools/visual_studio/v8_base_arm.vcproj
@@ -561,10 +561,6 @@
>
</File>
<File
- RelativePath="..\..\src\location.h"
- >
- </File>
- <File
RelativePath="..\..\src\log.cc"
>
</File>