diff --git a/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderTools.java b/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderTools.java index d84c9f49..7e5af351 100644 --- a/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderTools.java +++ b/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderTools.java @@ -79,13 +79,14 @@ public ExtendedType parseTypeWithCause(String typeName) { typeName = typeName.trim(); ExtendedType extendedType = null; String lookupTypeName = getLookupTypeName(typeName); + AbstractGCEvent.Type gcType = AbstractGCEvent.Type.lookup(lookupTypeName); - // the gcType may be null because there was a PrintGCCause flag enabled - if so, reparse it with the first paren set stripped + // the gcType may be null because there was a PrintGCCause flag enabled - if so, reparse it with the first parentheses set stripped if (gcType == null) { - // try to parse it again with the parens removed - Matcher parenMatcher = parenthesesPattern.matcher(lookupTypeName); - if (parenMatcher.find()) { - gcType = AbstractGCEvent.Type.lookup(parenMatcher.replaceFirst("")); + // try to parse it again with the parentheses removed + Matcher parenthesesMatcher = parenthesesPattern.matcher(lookupTypeName); + if (parenthesesMatcher.find()) { + gcType = AbstractGCEvent.Type.lookup(parenthesesMatcher.replaceFirst("")); } } diff --git a/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderUnifiedJvmLogging.java b/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderUnifiedJvmLogging.java index 48f2e0ec..a7f0c249 100644 --- a/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderUnifiedJvmLogging.java +++ b/src/main/java/com/tagtraum/perf/gcviewer/imp/DataReaderUnifiedJvmLogging.java @@ -46,6 +46,7 @@ * For more information about Shenandoah see: Shenandoah Wiki at OpenJDK */ public class DataReaderUnifiedJvmLogging extends AbstractDataReader { + // TODO also parse "Allocation Stall (main)" events // matches the whole line and extracts decorators from it (decorators always appear between [] and are independent of the gc algorithm being logged) // Input: [0.693s][info][gc ] GC(0) Pause Init Mark 1.070ms @@ -58,7 +59,7 @@ public class DataReaderUnifiedJvmLogging extends AbstractDataReader { // Regex: ^(?:\[(?