8270021: Incorrect log decorators in gc/g1/plab/TestPLABEvacuationFailure.java

Reviewed-by: tschatzl, iwalulya
This commit is contained in:
Albert Mingkun Yang 2021-07-08 10:39:44 +00:00
parent 30bba54b97
commit 4a45d95719
2 changed files with 12 additions and 8 deletions

View File

@ -68,7 +68,7 @@ public class TestPLABEvacuationFailure {
"failure wasted"));
private static final String[] COMMON_OPTIONS = {
"-Xlog:gc=debug,gc+phases=trace",
"-Xlog:gc,gc+plab=debug",
"-XX:+UseG1GC",
"-XX:InitiatingHeapOccupancyPercent=100",
"-XX:-G1UseAdaptiveIHOP",

View File

@ -190,13 +190,17 @@ final public class LogParser {
}
private Map<Long, PlabInfo> getSpecifiedStats(List<Long> gcIds, LogParser.ReportType type, List<String> fieldNames, boolean extractId) {
return new HashMap<>(
getEntries().entryStream()
.filter(gcLogItem -> extractId == gcIds.contains(gcLogItem.getKey()))
.collect(Collectors.toMap(gcLogItem -> gcLogItem.getKey(),
gcLogItem -> gcLogItem.getValue().get(type).filter(fieldNames)
var map = new HashMap<>(
getEntries().entryStream()
.filter(gcLogItem -> extractId == gcIds.contains(gcLogItem.getKey()))
.collect(Collectors.toMap(gcLogItem -> gcLogItem.getKey(),
gcLogItem -> gcLogItem.getValue().get(type).filter(fieldNames)
)
)
)
);
);
if (map.isEmpty()) {
throw new RuntimeException("Cannot find relevant PLAB statistics in the log");
}
return map;
}
}