diff options
author | ulfjack <ulfjack@google.com> | 2018-06-12 12:21:25 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-12 12:23:15 -0700 |
commit | 400fffe8b2df50c5b57ced5d9a8b46e40d529d4e (patch) | |
tree | a9a1291a0a05d4dee5c8e2ea9da092135c91a42f /src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java | |
parent | c958649131ab8cf48a881aaddc50390cb7d79bfb (diff) |
Add support for the Json trace file format
Add a --experimental_generate_json_trace_profile option that puts a file into
the output base (or uses --profile if set).
There are still a lot of problems with this.
- unexplained holes
- way too many threads
- nonsensical event titles
- too many detail events, too little overview
- it may also cause unnecessary load
- it silently overwrites the existing file on subsequent invocations
The format is documented here: goo.gl/oMZPLh
PiperOrigin-RevId: 200259431
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java index 6e9ba86492..923ebe6693 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java @@ -194,6 +194,17 @@ public class CommonCommandOptions extends OptionsBase { public String buildRequestId; @Option( + name = "experimental_generate_json_trace_profile", + defaultValue = "false", + documentationCategory = OptionDocumentationCategory.LOGGING, + effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING}, + help = + "If enabled, Bazel profiles the build and writes a JSON-format profile into a file in the " + + "output base." + ) + public boolean enableTracer; + + @Option( name = "profile", defaultValue = "null", documentationCategory = OptionDocumentationCategory.LOGGING, |