From 66b11bcb506fe80ec466972d82d62c4c658f9ed0 Mon Sep 17 00:00:00 2001 From: Sara Adams Date: Thu, 23 Nov 2023 10:59:42 +0100 Subject: [PATCH] [JSON Trace Profile] Correctly identify GC thread Currently, the thread that includes the garbace colleciton notification events is not correctly identified. This means that in the JSON trace profile, the thread: * is not renamed, as desired. * is not sorted towards the top, as desired. The thread is identified by its name, which has changed from "Service Thread" to "Notification Thread". This change updates the profile code accordingly. In response to https://github.com/bazelbuild/bazel/issues/18548#issuecomment-1823361627 --- .../com/google/devtools/build/lib/profiler/ThreadMetadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/profiler/ThreadMetadata.java b/src/main/java/com/google/devtools/build/lib/profiler/ThreadMetadata.java index d51fb13af17196..99b1a39fc25b32 100644 --- a/src/main/java/com/google/devtools/build/lib/profiler/ThreadMetadata.java +++ b/src/main/java/com/google/devtools/build/lib/profiler/ThreadMetadata.java @@ -49,7 +49,7 @@ private static boolean isMainThread(String threadName) { } private static boolean isGCThread(String threadName) { - return threadName.equals("Service Thread"); + return threadName.equals("Notification Thread"); } private static String getReadableName(String threadName) {