Skip to content

Commit b757105

Browse files
evanlucasaddaleax
authored andcommitted
build: allow enabling the --trace-maps flag in V8
This can be useful for tracing map creation. Backport-PR-URL: #14344 Backport-Reviewed-By: Ben Noordhuis <[email protected]> Backport-Reviewed-By: Refael Ackermann <[email protected]> PR-URL: #14018 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 3bd18c5 commit b757105

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

configure

+6
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@ parser.add_option('--enable-d8',
288288
dest='enable_d8',
289289
help=optparse.SUPPRESS_HELP) # Unsupported, undocumented.
290290

291+
parser.add_option('--enable-trace-maps',
292+
action='store_true',
293+
dest='trace_maps',
294+
help='Enable the --trace-maps flag in V8 (use at your own risk)')
295+
291296
parser.add_option('--v8-options',
292297
action='store',
293298
dest='v8_options',
@@ -956,6 +961,7 @@ def configure_v8(o):
956961
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
957962
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
958963
o['variables']['v8_use_snapshot'] = b(options.with_snapshot)
964+
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
959965
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
960966
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
961967
o['variables']['force_dynamic_crt'] = 1 if options.shared else 0

node.gyp

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
'variables': {
33
'v8_use_snapshot%': 'false',
4+
'v8_trace_maps%': 0,
45
'node_use_dtrace%': 'false',
56
'node_use_lttng%': 'false',
67
'node_use_etw%': 'false',

0 commit comments

Comments
 (0)