diff options
Diffstat (limited to 'spark-common')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerJob.java | 2 | ||||
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/sampler/async/jfr/JfrReader.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerJob.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerJob.java index 1310e97..db1808c 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerJob.java +++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/AsyncProfilerJob.java @@ -249,7 +249,7 @@ public class AsyncProfilerJob { duration = TimeUnit.NANOSECONDS.toMicros(sample.time - samples.get(i - 1).time); } - String threadName = reader.threads.get(sample.tid); + String threadName = reader.threads.get((long) sample.tid); if (threadName == null) { continue; } diff --git a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/jfr/JfrReader.java b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/jfr/JfrReader.java index e0cc4e9..ea4985e 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/sampler/async/jfr/JfrReader.java +++ b/spark-common/src/main/java/me/lucko/spark/common/sampler/async/jfr/JfrReader.java @@ -51,7 +51,7 @@ public class JfrReader implements Closeable { public final Dictionary<JfrClass> types = new Dictionary<>(); public final Map<String, JfrClass> typesByName = new HashMap<>(); - public final Dictionary<String> threads = new Dictionary<>(); + public final Map<Long, String> threads = new HashMap<>(); // spark public final Dictionary<ClassRef> classes = new Dictionary<>(); public final Dictionary<byte[]> symbols = new Dictionary<>(); public final Dictionary<MethodRef> methods = new Dictionary<>(); @@ -324,7 +324,7 @@ public class JfrReader implements Closeable { } private void readThreads(boolean hasGroup) { - int count = threads.preallocate(getVarint()); + int count = getVarint(); //threads.preallocate(getVarint()); for (int i = 0; i < count; i++) { long id = getVarlong(); String osName = getString(); |