aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2018-07-26 07:09:35 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-26 07:10:57 -0700
commit46f3524bf391d0d773a94962ccc5a2d023767a0b (patch)
treee1f83bdd8132d3af5451cbec1f853ff2c825fc39
parent6c99cf14115f26ae8603a15248021aea31d02c96 (diff)
Reduce the set of profiler events for the json profile
This significantly reduces the size of the resulting profiles. Do we need the events that I remove? What do we do with the data? Who knows? PiperOrigin-RevId: 206153368
-rw-r--r--src/main/java/com/google/devtools/build/lib/profiler/Profiler.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java b/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java
index 4f1ccb80ae..50af19b80b 100644
--- a/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java
+++ b/src/main/java/com/google/devtools/build/lib/profiler/Profiler.java
@@ -418,7 +418,11 @@ public final class Profiler {
return !type.isVfs()
// Exclude the critical path - it's not useful in the Json trace output.
&& type != ProfilerTask.CRITICAL_PATH
- && type != ProfilerTask.CRITICAL_PATH_COMPONENT;
+ && type != ProfilerTask.CRITICAL_PATH_COMPONENT
+ && type != ProfilerTask.SKYFUNCTION
+ && type != ProfilerTask.ACTION_EXECUTE
+ && type != ProfilerTask.ACTION_COMPLETE
+ && !type.isSkylark();
}
},
diff --git a/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java b/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java
index b0a652197c..0d244f400c 100644
--- a/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java
+++ b/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java
@@ -108,8 +108,8 @@ public enum ProfilerTask {
/** True if the metric records VFS operations */
private final boolean vfs;
- private ProfilerTask(String description, long minDuration, int color, int slowestInstanceCount,
- boolean vfs) {
+ private ProfilerTask(
+ String description, long minDuration, int color, int slowestInstanceCount, boolean vfs) {
this.description = description;
this.minDuration = minDuration;
this.color = color;
@@ -151,4 +151,8 @@ public enum ProfilerTask {
public boolean isVfs() {
return vfs;
}
+
+ public boolean isSkylark() {
+ return description.startsWith("Skylark ");
+ }
}