Merged
Conversation
dsgrieve
commented
Apr 7, 2023
| this.completionTask = null; | ||
| if (t != null) | ||
| Executors.newSingleThreadExecutor().execute(t); | ||
| if (completionTask != null) |
Contributor
Author
There was a problem hiding this comment.
The reason for this change is that it is possible for an Aggregator to get events from more than one EventSource. If the completionTask is nulled out, then the Phaser only gets decremented by the first EventSource but not the subsequent EventSources.
The test CaptureJVMTerminationEventTest was hanging because of this issue.
karianna
requested changes
Apr 8, 2023
Member
karianna
left a comment
There was a problem hiding this comment.
I think DRY is being broken a little with the debugging implementation
...er/src/test/java/com/microsoft/gctoolkit/parser/ConcurrentMarkSweepPhaseParserRulesTest.java
Outdated
Show resolved
Hide resolved
karianna
requested changes
Apr 11, 2023
johnoliver
reviewed
Apr 11, 2023
johnoliver
reviewed
Apr 11, 2023
api/src/main/java/com/microsoft/gctoolkit/message/DataSourceParser.java
Outdated
Show resolved
Hide resolved
johnoliver
reviewed
Apr 11, 2023
...er/src/test/java/com/microsoft/gctoolkit/parser/ConcurrentMarkSweepPhaseParserRulesTest.java
Outdated
Show resolved
Hide resolved
This pull request was closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using loadDataSourceParser causes the code to skip loading DataSourceParsers using the SPI. We added addDataSourceParser which adds a DataSourceParser to the ones that are loaded with the SPI. Along the way, we noticed that the Aggregators are loaded in such a way that they might never actually be used, which would lead to a hang because the Phaser in AbstractVirtualMachine might never be decremented for those Aggregators that are never used. So, a good deal of this change is to fix that issue, which we did by having the DataSourceParser report what events it produces (added DataSourceParser#producesEvents()). Now the code can check if any DataSourceParsers produce the events that an Aggregator aggregates. If not, the Aggregator is not used.
So... The files to focus on are GCToolkit and AbstractJavaVirtualMachine