Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified Serial GC correction #408

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
416eb87
bug: intermediate commit to allow work on another bug
kcpeppe Jan 8, 2024
d7ab6fb
bug: add more robust handling of IllegalArgumentException in GCToolKi…
kcpeppe Jan 24, 2024
cfccf95
Merge branch 'filter'
kcpeppe Jan 24, 2024
3725095
tidy: remove debug to stdout to logging framework
kcpeppe Jan 25, 2024
f7efb6e
refactor: Ensure DateTimeStamp cannot be malformed and it behaves if …
kcpeppe Feb 22, 2024
15a86b9
Merge branch 'main' of github.com:microsoft/gctoolkit into 316
kcpeppe Feb 22, 2024
9fa0e34
refactor: update pom for new GC log test data bundle
kcpeppe Feb 22, 2024
1e9f897
tidy: address comments from PR
kcpeppe Feb 23, 2024
59dc331
Update parser/src/main/java/com/microsoft/gctoolkit/parser/GCLogParse…
karianna Feb 23, 2024
bed6ae6
feature: first push to combine CMS parser with GenerationalHeapParser
kcpeppe Feb 27, 2024
278b7ac
depreciate: depreciated the CMS preunified event source
kcpeppe Feb 27, 2024
8012bd0
refactor: get all tests to pass
kcpeppe Mar 1, 2024
86e2578
refactor: continue to get tests to pass
kcpeppe Mar 1, 2024
82e8f4f
refactor: continue to get tests to pass
kcpeppe Mar 1, 2024
115996b
refactor: collapse CMS phases parser into generational parser
kcpeppe Mar 11, 2024
d0dbcbd
refactor: fix merge conflicts
kcpeppe Mar 11, 2024
9de145d
Merge branch '318'
kcpeppe Mar 11, 2024
7e52270
Merge branch 'main' of github.com:kcpeppe/gctoolkit
kcpeppe Mar 11, 2024
e21cb1c
refactor: GenerationalHeapParser was duplicating CMF failures under c…
kcpeppe Mar 14, 2024
40595f0
refactor: ensure GC log is closed when discovering the format
kcpeppe Mar 14, 2024
cd7f1a2
refactor: add test for reported bug
kcpeppe Mar 15, 2024
7a8e8f7
refactor: add ability to parse very simple logs preunified logs
kcpeppe Mar 26, 2024
82a775a
refactor: fix merge conflict that wasn't an actual merge conflict :-\
kcpeppe Mar 26, 2024
ac853e7
refactor: remove no longer needed print statement
kcpeppe Mar 26, 2024
39afac3
refactor: tidy from review
kcpeppe Mar 26, 2024
12a17da
refactor: support date stamps only for preunified logs
kcpeppe Apr 11, 2024
a2062c4
merge: complete a strange merge
kcpeppe Apr 11, 2024
66e3466
refactor: bump version of gctoolkit testdata to support new tests
kcpeppe Apr 11, 2024
fcb4ebd
refactor: small code cleanups
kcpeppe Apr 11, 2024
a90ec25
Update parser/src/main/java/com/microsoft/gctoolkit/parser/AbstractLo…
kcpeppe Apr 16, 2024
3e41273
tidy: cleanup from review and added more tests
kcpeppe Apr 18, 2024
7e60928
tidy: resolved merge conflict
kcpeppe Apr 18, 2024
3c015e6
Merge branch 'main' of github.com:microsoft/gctoolkit
kcpeppe Apr 23, 2024
02000b2
Merge branch 'main' of github.com:microsoft/gctoolkit
kcpeppe Dec 19, 2024
19e655a
refactor: adjust unified generational GC log parser to produce System…
kcpeppe Dec 19, 2024
0493c30
refactor: update source data to include new serial GC log file
kcpeppe Dec 22, 2024
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 @@ -4,6 +4,7 @@

import com.microsoft.gctoolkit.aggregator.EventSource;
import com.microsoft.gctoolkit.event.CPUSummary;
import com.microsoft.gctoolkit.event.GCCause;
import com.microsoft.gctoolkit.event.GarbageCollectionTypes;
import com.microsoft.gctoolkit.event.generational.AbortablePreClean;
import com.microsoft.gctoolkit.event.generational.CMSConcurrentEvent;
Expand All @@ -21,6 +22,7 @@
import com.microsoft.gctoolkit.event.generational.PSFullGC;
import com.microsoft.gctoolkit.event.generational.PSYoungGen;
import com.microsoft.gctoolkit.event.generational.ParNew;
import com.microsoft.gctoolkit.event.generational.SystemGC;
import com.microsoft.gctoolkit.event.generational.YoungGC;
import com.microsoft.gctoolkit.event.jvm.JVMTermination;
import com.microsoft.gctoolkit.jvm.Diary;
Expand Down Expand Up @@ -481,12 +483,21 @@ private FullGC fillOutFullGC(FullGC event, GenerationalForwardReference values)
}

private FullGC buildFullGC(GenerationalForwardReference forwardReference) {
FullGC gc;
switch (forwardReference.getGarbageCollectionType()) {
case PSFull:
return fillOutFullGC(new PSFullGC(forwardReference.getStartTime(), forwardReference.getGCCause(), forwardReference.getDuration()), forwardReference);
if ( forwardReference.getGCCause().equals(GCCause.JAVA_LANG_SYSTEM))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like some of this is DRY / could be squashed down, on the other hand it's readable, so that wins!

gc = new SystemGC(forwardReference.getStartTime(), forwardReference.getGCCause(), forwardReference.getDuration());
else
gc = new PSFullGC(forwardReference.getStartTime(), forwardReference.getGCCause(), forwardReference.getDuration());
return fillOutFullGC(gc, forwardReference);
case FullGC:
case Full:
return fillOutFullGC(new FullGC(forwardReference.getStartTime(), forwardReference.getGCCause(), forwardReference.getDuration()), forwardReference);
if ( forwardReference.getGCCause().equals(GCCause.JAVA_LANG_SYSTEM))
gc = new SystemGC(forwardReference.getStartTime(), forwardReference.getGCCause(), forwardReference.getDuration());
else
gc = new FullGC(forwardReference.getStartTime(), forwardReference.getGCCause(), forwardReference.getDuration());
return fillOutFullGC(gc, forwardReference);
default:
LOGGER.warning(forwardReference.getGarbageCollectionType() + " is unrecognized");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,32 @@ public void testCMSLogsMissingTimeStamps() {
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
{ 0, 0, 6167, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2},
};

//Serial
@Test
public void testSerialLogs() {
int i = 0;
for (String name : serial) {
try {
Path path = new TestLogFile("serial/" + name).getFile().toPath();
TestResults testResults = testGenerationalSingleLogFile(path);
analyzeResults(name, testResults, serialNumberOfDifferentCollectors[i], serialCounts[i++]);
} catch (IOException ioe) {
fail(ioe.getMessage());
}
}
}

private static final String[] serial = {
"factorization-serialgc-tip.log"
};

private static final int[] serialNumberOfDifferentCollectors = {
2,
};

private static final int[][] serialCounts = {
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17
{ 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new developer coming into this will struggle, can we add a comment stating what this array effectively tests?

};
}
Loading