[dart_runner][flutter_runner] Produce snapshot profiles during the build.
Test: build
Change-Id: Ic70575c0a659911593f379451bb5cebd1c5ddc98
diff --git a/runtime/dart_runner/kernel/BUILD.gn b/runtime/dart_runner/kernel/BUILD.gn
index ea29b35..f1eddb5 100644
--- a/runtime/dart_runner/kernel/BUILD.gn
+++ b/runtime/dart_runner/kernel/BUILD.gn
@@ -46,11 +46,14 @@
isolate_snapshot_data = "$target_gen_dir/isolate_data${product_suffix}.bin"
isolate_snapshot_instructions =
"$target_gen_dir/isolate_instructions${product_suffix}.bin"
+ snapshot_profile =
+ "$target_gen_dir/snapshot_profile${product_suffix}.json"
outputs = [
vm_snapshot_data,
vm_snapshot_instructions,
isolate_snapshot_data,
isolate_snapshot_instructions,
+ snapshot_profile,
]
if (invoker.product) {
@@ -78,6 +81,8 @@
rebase_path(isolate_snapshot_data, root_build_dir),
"--isolate_snapshot_instructions=" +
rebase_path(isolate_snapshot_instructions, root_build_dir),
+ "--write_v8_snapshot_profile_to=" +
+ rebase_path(snapshot_profile, root_build_dir),
]
if (is_debug && !invoker.product) {
args += [ "--enable_asserts" ]
diff --git a/runtime/flutter_runner/kernel/BUILD.gn b/runtime/flutter_runner/kernel/BUILD.gn
index 3ad723a..f5c48da 100644
--- a/runtime/flutter_runner/kernel/BUILD.gn
+++ b/runtime/flutter_runner/kernel/BUILD.gn
@@ -51,11 +51,14 @@
"$target_gen_dir/isolate_snapshot${product_suffix}.bin"
isolate_snapshot_instructions =
"$target_gen_dir/isolate_snapshot_instructions${product_suffix}.bin"
+ snapshot_profile =
+ "$target_gen_dir/snapshot_profile${product_suffix}.json"
outputs = [
vm_snapshot_data,
vm_snapshot_instructions,
isolate_snapshot_data,
isolate_snapshot_instructions,
+ snapshot_profile,
]
if (invoker.product) {
@@ -83,6 +86,8 @@
rebase_path(isolate_snapshot_data, root_build_dir),
"--isolate_snapshot_instructions=" +
rebase_path(isolate_snapshot_instructions, root_build_dir),
+ "--write_v8_snapshot_profile_to=" +
+ rebase_path(snapshot_profile, root_build_dir),
]
if (is_debug && !invoker.product) {
args += [ "--enable_asserts" ]