aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/profiler/ProfilerTask.java82
1 files changed, 44 insertions, 38 deletions
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 8f7e3d1693..39c9c866dc 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
@@ -26,25 +26,25 @@ public enum ProfilerTask {
* Add new Tasks at the end (before Unknown) to not break the profiles that people have created!
* The profile file format uses the ordinal() of this enumeration to identify the task.
*/
- PHASE("build phase marker", -1, 0x336699, 0),
- ACTION("action processing", -1, 0x666699, 0),
- ACTION_BUILDER("parallel builder completion queue", -1, 0xCC3399, 0),
- ACTION_SUBMIT("execution queue submission", -1, 0xCC3399, 0),
+ PHASE("build phase marker", 0x336699),
+ ACTION("action processing", 0x666699),
+ __ACTION_BUILDER("parallel builder completion queue", 0xCC3399), // unused
+ __ACTION_SUBMIT("execution queue submission", 0xCC3399), // unused
ACTION_CHECK("action dependency checking", 10000000, 0x999933, 0),
- ACTION_EXECUTE("action execution", -1, 0x99CCFF, 0),
+ ACTION_EXECUTE("action execution", 0x99CCFF),
ACTION_LOCK("action resource lock", 10000000, 0xCC9933, 0),
ACTION_RELEASE("action resource release", 10000000, 0x006666, 0),
- ACTION_GRAPH("action graph dependency", -1, 0x3399FF, 0),
+ __ACTION_GRAPH("action graph dependency", 0x3399FF), // unused
ACTION_UPDATE("update action information", 10000000, 0x993300, 0),
- ACTION_COMPLETE("complete action execution", -1, 0xCCCC99, 0),
- INFO("general information", -1, 0x000066, 0),
- EXCEPTION("exception", -1, 0xFFCC66, 0),
- CREATE_PACKAGE("package creation", -1, 0x6699CC, 0),
- PACKAGE_VALIDITY_CHECK("package validity check", -1, 0x336699, 0),
- SPAWN("local process spawn", -1, 0x663366, 0),
- REMOTE_EXECUTION("remote action execution", -1, 0x9999CC, 0),
- LOCAL_EXECUTION("local action execution", -1, 0xCCCCCC, 0),
- SCANNER("include scanner", -1, 0x669999, 0),
+ ACTION_COMPLETE("complete action execution", 0xCCCC99),
+ INFO("general information", 0x000066),
+ __EXCEPTION("exception", 0xFFCC66), // unused
+ CREATE_PACKAGE("package creation", 0x6699CC),
+ __PACKAGE_VALIDITY_CHECK("package validity check", 0x336699), // unused
+ __SPAWN("local process spawn", 0x663366), // unused
+ REMOTE_EXECUTION("remote action execution", 0x9999CC),
+ LOCAL_EXECUTION("local action execution", 0xCCCCCC),
+ SCANNER("include scanner", 0x669999),
// 30 is a good number because the slowest items are stored in a heap, with temporarily
// one more element, and with 31 items, a heap becomes a complete binary tree
LOCAL_PARSE("Local parse to prepare for remote execution", 50000000, 0x6699CC, 30),
@@ -68,36 +68,38 @@ public enum ProfilerTask {
VFS_VMFS_DIR("VMFS readdir", 10000000, 0x0066CC, 0, true),
VFS_VMFS_READ("VMFS read", 10000000, 0x99CC33, 0, true),
WAIT("thread wait", 5000000, 0x66CCCC, 0),
- CONFIGURED_TARGET("configured target creation", -1, 0x663300, 0),
- TRANSITIVE_CLOSURE("transitive closure creation", -1, 0x996600, 0),
- TEST("for testing only", -1, 0x000000, 0),
- SKYFRAME_EVAL("skyframe evaluator", -1, 0xCC9900, 0),
- SKYFUNCTION("skyfunction", -1, 0xCC6600, 0),
- CRITICAL_PATH("critical path", -1, 0x666699, 0),
- CRITICAL_PATH_COMPONENT("critical path component", -1, 0x666699, 0),
- HANDLE_GC_NOTIFICATION("gc notification", -1, 0x996633, 0),
- INCLUSION_LOOKUP("inclusion lookup", -1, 0x000000, 0),
- INCLUSION_PARSE("inclusion parse", -1, 0x000000, 0),
- PROCESS_SCAN("process scan", -1, 0x000000, 0),
- LOOP_OUTPUT_ARTIFACTS("loop output artifacts"),
- LOCATE_RELATIVE("locate relative"),
- CONSTRUCT_INCLUDE_PATHS("construct include paths"),
- PARSE_AND_HINTS_RESULTS("parse and hints results"),
- PROCESS_RESULTS_AND_ENQUEUE("process results and enqueue"),
+ __CONFIGURED_TARGET("configured target creation", 0x663300), // unused
+ __TRANSITIVE_CLOSURE("transitive closure creation", 0x996600), // unused
+ __TEST("for testing only", 0x000000), // unused
+ SKYFRAME_EVAL("skyframe evaluator", 0xCC9900),
+ SKYFUNCTION("skyfunction", 0xCC6600),
+ CRITICAL_PATH("critical path", 0x666699),
+ CRITICAL_PATH_COMPONENT("critical path component", 0x666699),
+ HANDLE_GC_NOTIFICATION("gc notification", 0x996633),
+ __INCLUSION_LOOKUP("inclusion lookup", 0x000000), // unused
+ __INCLUSION_PARSE("inclusion parse", 0x000000), // unused
+ __PROCESS_SCAN("process scan", 0x000000), // unused
+ __LOOP_OUTPUT_ARTIFACTS("loop output artifacts"), // unused
+ __LOCATE_RELATIVE("locate relative"), // unused
+ __CONSTRUCT_INCLUDE_PATHS("construct include paths"), // unused
+ __PARSE_AND_HINTS_RESULTS("parse and hints results"), // unused
+ __PROCESS_RESULTS_AND_ENQUEUE("process results and enqueue"), // unused
SKYLARK_PARSER("Skylark Parser"),
- SKYLARK_USER_FN("Skylark user function call", -1, 0xCC0033, 0),
- SKYLARK_BUILTIN_FN("Skylark builtin function call", -1, 0x990033, 0),
- SKYLARK_USER_COMPILED_FN("Skylark compiled user function call", -1, 0xCC0033, 0),
- ACTION_FS_STAGING("Staging per-action file system", -1, 0x000000, 0),
- UNKNOWN("Unknown event", -1, 0x339966, 0);
+ SKYLARK_USER_FN("Skylark user function call", -0xCC0033),
+ SKYLARK_BUILTIN_FN("Skylark builtin function call", 0x990033),
+ SKYLARK_USER_COMPILED_FN("Skylark compiled user function call", 0xCC0033),
+ ACTION_FS_STAGING("Staging per-action file system", 0x000000),
+ UNKNOWN("Unknown event", 0x339966);
// Size of the ProfilerTask value space.
public static final int TASK_COUNT = ProfilerTask.values().length;
/** Human readable description for the task. */
public final String description;
- /** Threshold for skipping tasks in the profile in nanoseconds, unless --record_full_profiler_data
- * is used */
+ /**
+ * Threshold for skipping tasks in the profile in nanoseconds, unless --record_full_profiler_data
+ * is used.
+ */
public final long minDuration;
/** Default color of the task, when rendered in a chart. */
public final int color;
@@ -106,6 +108,10 @@ public enum ProfilerTask {
/** True if the metric records VFS operations */
private final boolean vfs;
+ ProfilerTask(String description, int color) {
+ this(description, /* minDuration= */ -1, color, /* slowestInstanceCount= */ 0, /*vfs=*/ false);
+ }
+
ProfilerTask(String description, long minDuration, int color, int slowestInstanceCount) {
this(description, minDuration, color, slowestInstanceCount, /*vfs=*/ false);
}