From 51581687227a275cc42353248d0c6d2abc109687 Mon Sep 17 00:00:00 2001 From: Evan Lucas Date: Fri, 30 Jun 2017 19:08:32 -0500 Subject: [PATCH] build: allow enabling the --trace-maps flag in V8 This can be useful for tracing map creation. PR-URL: https://github.com/nodejs/node/pull/14018 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen Reviewed-By: Refael Ackermann --- configure | 6 ++++++ node.gyp | 1 + 2 files changed, 7 insertions(+) diff --git a/configure b/configure index ee40b6c326d3e1..e0369f348deb89 100755 --- a/configure +++ b/configure @@ -288,6 +288,11 @@ parser.add_option('--enable-d8', dest='enable_d8', help=optparse.SUPPRESS_HELP) # Unsupported, undocumented. +parser.add_option('--enable-trace-maps', + action='store_true', + dest='trace_maps', + help='Enable the --trace-maps flag in V8 (use at your own risk)') + parser.add_option('--v8-options', action='store', dest='v8_options', @@ -956,6 +961,7 @@ def configure_v8(o): o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks. o['variables']['v8_use_snapshot'] = b(options.with_snapshot) + o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) o['variables']['force_dynamic_crt'] = 1 if options.shared else 0 diff --git a/node.gyp b/node.gyp index 93ee7d64ddb287..b0e4676a96e477 100644 --- a/node.gyp +++ b/node.gyp @@ -1,6 +1,7 @@ { 'variables': { 'v8_use_snapshot%': 'false', + 'v8_trace_maps%': 0, 'node_use_dtrace%': 'false', 'node_use_lttng%': 'false', 'node_use_etw%': 'false',