Commit 4db43bfa authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[tools] Improve gcmole part I: command line

- Convert gcmole to python3-ish code
  - use local Path implementation for future full migration
- Use optparse and explicit arguments for gcmole
  - Add explicit directories flags
  - Use backwards compatible env vars as fallbacks
- Add gn target v8_gcmole_files to avoid issues with missing or
  incompatible generated files

Drive-by-fixes for running gcmole without ignored files:
- Disable gcmole in Isolate::UnwindAndFindHandle
- Partially disable gcmole in V8HeapExplorer::AddEntry

Bug: v8:10009
Change-Id: I5b4d1c6554db300190226361b6c518419109ff3d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3497320Reviewed-by: 's avatarLiviu Rau <liviurau@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79348}
parent 07945511
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
"type": "script", "type": "script",
}, },
"run-gcmole": { "run-gcmole": {
"label": "//tools/gcmole:v8_run_gcmole", "label": "//tools/gcmole:v8_gcmole_files",
"type": "script", "type": "script",
}, },
"run-num-fuzzer": { "run-num-fuzzer": {
......
...@@ -11,7 +11,7 @@ group("gn_all") { ...@@ -11,7 +11,7 @@ group("gn_all") {
data_deps = [ data_deps = [
":v8_check_static_initializers", ":v8_check_static_initializers",
"debug_helper:v8_debug_helper", "debug_helper:v8_debug_helper",
"gcmole:v8_run_gcmole", "gcmole:v8_gcmole_files",
"jsfunfuzz:v8_jsfunfuzz", "jsfunfuzz:v8_jsfunfuzz",
] ]
......
...@@ -4,11 +4,13 @@ ...@@ -4,11 +4,13 @@
import("../../gni/v8.gni") import("../../gni/v8.gni")
group("v8_run_gcmole") { group("v8_gcmole_files") {
testonly = true testonly = true
data_deps = [
"../../:v8_dump_build_config",
"../../:v8_generated_cc_files",
]
data = [ data = [
"GCMOLE.gn",
"gcmole.py", "gcmole.py",
"gcmole-test.cc", "gcmole-test.cc",
"gcmole-tools/", "gcmole-tools/",
...@@ -36,8 +38,6 @@ group("v8_run_gcmole") { ...@@ -36,8 +38,6 @@ group("v8_run_gcmole") {
"$target_gen_dir/../../torque-generated/", "$target_gen_dir/../../torque-generated/",
] ]
deps = [ "../../:run_torque" ]
if (v8_gcmole) { if (v8_gcmole) {
# This assumes gcmole tools have been fetched by a hook # This assumes gcmole tools have been fetched by a hook
# into v8/tools/gcmole/gcmole_tools. # into v8/tools/gcmole/gcmole_tools.
......
action("gcmole") {
sources = [
### gcmole(all) ###
"tools/gcmole/gcmole-test.cc",
]
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment