Skip to content

Commit 4a45d95

Browse files
committed
8270021: Incorrect log decorators in gc/g1/plab/TestPLABEvacuationFailure.java
Reviewed-by: tschatzl, iwalulya
1 parent 30bba54 commit 4a45d95

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class TestPLABEvacuationFailure {
6868
"failure wasted"));
6969

7070
private static final String[] COMMON_OPTIONS = {
71-
"-Xlog:gc=debug,gc+phases=trace",
71+
"-Xlog:gc,gc+plab=debug",
7272
"-XX:+UseG1GC",
7373
"-XX:InitiatingHeapOccupancyPercent=100",
7474
"-XX:-G1UseAdaptiveIHOP",

test/hotspot/jtreg/gc/g1/plab/lib/LogParser.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,17 @@ public Map<Long, PlabInfo> getExcludedSpecifiedStats(List<Long> specifiedGcIdFor
190190
}
191191

192192
private Map<Long, PlabInfo> getSpecifiedStats(List<Long> gcIds, LogParser.ReportType type, List<String> fieldNames, boolean extractId) {
193-
return new HashMap<>(
194-
getEntries().entryStream()
195-
.filter(gcLogItem -> extractId == gcIds.contains(gcLogItem.getKey()))
196-
.collect(Collectors.toMap(gcLogItem -> gcLogItem.getKey(),
197-
gcLogItem -> gcLogItem.getValue().get(type).filter(fieldNames)
193+
var map = new HashMap<>(
194+
getEntries().entryStream()
195+
.filter(gcLogItem -> extractId == gcIds.contains(gcLogItem.getKey()))
196+
.collect(Collectors.toMap(gcLogItem -> gcLogItem.getKey(),
197+
gcLogItem -> gcLogItem.getValue().get(type).filter(fieldNames)
198+
)
198199
)
199-
)
200-
);
200+
);
201+
if (map.isEmpty()) {
202+
throw new RuntimeException("Cannot find relevant PLAB statistics in the log");
203+
}
204+
return map;
201205
}
202206
}

0 commit comments

Comments
 (0)