Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ public interface CMSPatterns extends SharedPatterns {

//8239.784: [Rescan (parallel) , 0.0444432 secs]8239.828: [weak refs processing8239.828: [SoftReference, 0 refs, 0.0000687 secs]8239.828: [WeakReference, 0 refs, 0.0000638 secs]8239.829: [FinalReference, 556 refs, 0.0008823 secs]8239.829: [PhantomReference, 0 refs, 0.0000657 secs]8239.830: [JNI Weak Reference, 0.0000995 secs], 0.0013332 secs]8239.830: [class unloading, 0.1926177 secs]8240.022: [scrub symbol table, 0.0376581 secs]8240.060: [scrub string table, 0.6722322 secs][1 CMS-remark: 6705100K(12523968K)] 6815820K(13520768K), 1.8735975 secs] [Times: user=7.84 sys=0.08, real=1.87 secs]
GCParseRule SPLIT_REMARK_REFERENCE_BUG = new GCParseRule("SPLIT_REMARK_REFERENCE_BUG", "^" + DATE_TIMESTAMP + "\\[Rescan \\(parallel\\) , " + PAUSE_TIME + "\\]" + DATE_TIMESTAMP + "\\[weak refs processing" + DATE_TIMESTAMP);
GCParseRule SPLIT_REMARK_REFERENCE_BUG_DURATION = new GCParseRule("SPLIT_REMARK_REFERENCE_BUG_DURATION", "[^\\n]* " + PAUSE_TIME);
GCParseRule SPLIT_REMARK_REFERENCE = new GCParseRule("SPLIT_REMARK_REFERENCE", "^" + RESCAN_BLOCK + WEAK_REF_BLOCK + CLASS_UNLOADING_BLOCK + SYMBOL_TABLE_SCRUB_BLOCK + STRING_TABLE_SCRUB_BLOCK + REMARK_BLOCK);
GCParseRule FULL_SPLIT_BY_CONCURRENT_PHASE = new GCParseRule("FULL_SPLIT_BY_CONCURRENT_PHASE", "^" + DATE_TIMESTAMP + "\\[CMS" + CMS_PHASE_END);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
import java.util.function.BiConsumer;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static com.microsoft.gctoolkit.parser.unified.UnifiedG1GCPatterns.WEAK_PROCESSING;

Expand Down Expand Up @@ -626,9 +624,11 @@
gcCauseForwardReference = GCCause.PROMOTION_FAILED;
ArrayList<Integer> blocks = new ArrayList<>();
GCLogTrace block = PARNEW_PROMOTION_FAILURE_SIZE_BLOCK.parse(line);
do {
blocks.add(block.getIntegerGroup(1));
} while (block.hasNext());
if (block != null) {
do {
blocks.add(block.getIntegerGroup(1));
} while (block.hasNext());
}
promotionFailureSizesForwardReference = new int[blocks.size()];
for (int index = 0; index < blocks.size(); index++)
promotionFailureSizesForwardReference[index] = blocks.get(index);
Expand Down Expand Up @@ -1817,7 +1817,8 @@
private void precleanTimedoutWithCards(GCLogTrace trace, String line) {
abortPrecleanDueToTime = true;
GCLogTrace concurrentPhase = new GCParseRule("X",CMS_PHASE_END).parse(line);
endOfConcurrentPhase(concurrentPhase, concurrentPhase.getDateTimeStamp(), 0);
if (concurrentPhase != null)
endOfConcurrentPhase(concurrentPhase, concurrentPhase.getDateTimeStamp(), 0);
}

private void shouldCollectConcurrent(GCLogTrace trace, String line) {
Expand Down Expand Up @@ -1917,11 +1918,10 @@
*/
public void splitRemarkReferenceWithWeakReferenceSplitBug(GCLogTrace trace, String line) {
GCLogTrace remarkTrace = REMARK_CLAUSE.parse(line);
Pattern durationGroupPattern = Pattern.compile(".* " + PAUSE_TIME);
Matcher matcher = durationGroupPattern.matcher(line);
GCLogTrace durationTrace = SPLIT_REMARK_REFERENCE_BUG_DURATION.parse(line);
double duration = 0.0d;
if (matcher.find()) {
duration = Double.parseDouble(matcher.group(matcher.groupCount()));
if (durationTrace != null) {
duration = durationTrace.getPauseTime();
}
CMSRemark collection = new CMSRemark(getClock(), GCCause.CMS_FINAL_REMARK, duration);
MemoryPoolSummary tenured = getTotalOccupancyWithTotalHeapSizeSummary(remarkTrace, 1);
Expand Down Expand Up @@ -2067,6 +2067,10 @@

private void endConcurrentPrecleanWithReferenceProcessing(GCLogTrace trace, String line) {
GCLogTrace concurrentBlock = CONCURRENT_PHASE_END_BLOCK.parse(line);
if (concurrentBlock == null) {
LOGGER.warning("Unable to extract data from " + trace.toString());

Check warning on line 2071 in parser/src/main/java/com/microsoft/gctoolkit/parser/GenerationalHeapParser.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Invoke method(s) only conditionally. Use the built-in formatting to construct this argument.

See more on https://sonarcloud.io/project/issues?id=microsoft_gctoolkit&issues=AZ_4Xh1axILwZHPZ6Zds&open=AZ_4Xh1axILwZHPZ6Zds&pullRequest=579
return;
}
try {
publish(new ConcurrentPreClean(startOfConcurrentPhase, concurrentBlock.getDoubleGroup(11), concurrentBlock.getDoubleGroup(7), concurrentBlock.getDoubleGroup(8)));
} catch (Throwable t) {
Expand Down
Loading