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

Add Evacuation workers getter for G1 GC #366

Merged
merged 1 commit into from
Jul 2, 2024
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
18 changes: 18 additions & 0 deletions api/src/main/java/com/microsoft/gctoolkit/event/g1gc/G1Young.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public class G1Young extends G1RealPause {

private double parallelPhaseDuration = -1.0d;
private int gcWorkers;
private int evacuationWorkersUsed;
private int evacuationWorkersAvailable;
private double codeRootFixupDuration = -1.0d;
private double codeRootMigrationDuration = -1.0d;
private double codeRootPurgeDuration = -1.0d;
Expand Down Expand Up @@ -62,6 +64,14 @@ public void setGcWorkers(int count) {
this.gcWorkers = count;
}

public void setEvacuationWorkersUsed(int evacuationWorkersUsed) {
this.evacuationWorkersUsed = evacuationWorkersUsed;
}

public void setEvacuationWorkersAvailable(int evacuationWorkersAvailable) {
this.evacuationWorkersAvailable = evacuationWorkersAvailable;
}

public void setCodeRootFixupDuration(double duration) {
this.codeRootFixupDuration = duration;
}
Expand Down Expand Up @@ -107,6 +117,14 @@ public int getGcWorkers() {
return gcWorkers;
}

public int getEvacuationWorkersUsed() {
return evacuationWorkersUsed;
}

public int getEvacuationWorkersAvailable() {
return evacuationWorkersAvailable;
}

public double getCodeRootFixupDuration() {
return codeRootFixupDuration;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,11 @@ private void fillInPhases(G1Young collection) {
postEvacuateCSetPhaseNames().forEach(name -> collection.addPostEvacuationCollectionPhase(name, postEvacuateCSetPhaseDuration(name)));
}

private void fillInWorkers(G1Young collection) {
collection.setEvacuationWorkersUsed(evacuationWorkersUsed);
collection.setEvacuationWorkersAvailable(evacuationWorkersAvailable);
}

private DateTimeStamp pausePhaseDuringConcurrentCycleTime = null;
private double pausePhaseDuringConcurrentCycleDuration = -1.0d;

Expand Down Expand Up @@ -772,6 +777,7 @@ private G1Young buildYoung(G1Young collection) {
fillInRegionSummary(collection);
fillInMetaspaceStats(collection);
fillInPhases(collection);
fillInWorkers(collection);
if (toSpaceExhausted) collection.toSpaceExhausted();
if (hasReferenceGCSummary())
collection.add(generateReferenceGCSummary());
Expand Down