Index: BUILD.gn |
diff --git a/BUILD.gn b/BUILD.gn |
index e13162ad4ac765cef1083b8c50226274bd3bda25..c744850f81ef07b7024be061b53fa86a0c3cfb4a 100644 |
--- a/BUILD.gn |
+++ b/BUILD.gn |
@@ -79,6 +79,10 @@ declare_args() { |
# Sets -dV8_CONCURRENT_MARKING |
v8_enable_concurrent_marking = false |
+ # Build the snapshot with unwinding information for perf. |
+ # Sets -dV8_USE_SNAPSHOT_WITH_UNWINDING_INFO. |
+ v8_perf_prof_unwinding_info = false |
+ |
# With post mortem support enabled, metadata is embedded into libv8 that |
# describes various parameters of the VM for use by debuggers. See |
# tools/gen-postmortem-metadata.py for details. |
@@ -256,6 +260,9 @@ config("features") { |
} |
if (v8_use_snapshot) { |
defines += [ "V8_USE_SNAPSHOT" ] |
+ if (v8_perf_prof_unwinding_info) { |
+ defines += [ "V8_USE_SNAPSHOT_WITH_UNWINDING_INFO" ] |
+ } |
} |
if (v8_use_external_startup_data) { |
defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] |
@@ -743,6 +750,10 @@ action("run_mksnapshot") { |
] |
} |
+ if (v8_perf_prof_unwinding_info) { |
+ args += [ "--perf-prof-unwinding-info" ] |
+ } |
+ |
if (v8_use_external_startup_data) { |
outputs += [ "$root_out_dir/snapshot_blob.bin" ] |
args += [ |