Skip to content

Modify scavenger GC count #22180

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

Merged
merged 1 commit into from
Jul 10, 2025
Merged

Conversation

adpopescu
Copy link
Contributor

This change aligns openj9 usage of incrementScavengerStats to be consistent with a recent change in omr.

@adpopescu
Copy link
Contributor Author

@amicic These are the changes in openj9.

@adpopescu
Copy link
Contributor Author

This PR needs eclipse-omr/omr#7814

@@ -259,15 +259,15 @@ tgcHookLocalGcEnd(J9HookInterface** hook, uintptr_t eventNum, void* eventData, v
tgcExtensions->printf(" (micros) (micros) freelist freelist scanlist scanlist lock arrays arraysize copycache lists deep objs list\n");

scavengeTotalTime = event->incrementEndTime - event->incrementStartTime;
uintptr_t gcCount = extensions->scavengerStats._gcCount;
uintptr_t gcCount = extensions->incrementScavengerStats._gcCount;
Copy link
Contributor

@amicic amicic Jul 3, 2025

Choose a reason for hiding this comment

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

minor but let's call the local: gcIncrementCount, and thnt use it later when doing the participation check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced it with j9gc_get_unique_GC_count. I think that's what you meant?

@@ -61,7 +61,7 @@ tgcHookGlobalGcSweepEnd(J9HookInterface** hook, UDATA eventNum, void* eventData,
gcCount = extensions->globalGCStats.gcCount;
if (extensions->isStandardGC()) {
#if defined(J9VM_GC_MODRON_SCAVENGER)
gcCount += extensions->scavengerStats._gcCount;
gcCount += extensions->incrementScavengerStats._gcCount;
Copy link
Contributor

Choose a reason for hiding this comment

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

we probably want to be consistent with JFR counting (hence base it on cycle).
for the whole block, we should probably even just call j9gc_get_unique_GC_count

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced with unique gc count.

@adpopescu adpopescu force-pushed the jfr-gc-events branch 4 times, most recently from 1af8016 to c927901 Compare July 8, 2025 14:25
@adpopescu adpopescu requested a review from amicic July 8, 2025 14:29
@adpopescu
Copy link
Contributor Author

adpopescu commented Jul 8, 2025

Oh wait. I should add in a change to use the omr function in gc_get_unique before you run any tests.

Ok I added it in.

This change aligns openj9 usage of incrementScavengerStats to be consistent with a recent change in omr.

Signed-off-by: Adrian Popescu <[email protected]>
@amicic
Copy link
Contributor

amicic commented Jul 10, 2025

jenkins test sanity amac jdk21

@adpopescu adpopescu marked this pull request as ready for review July 10, 2025 14:57
@amicic amicic merged commit f8bcc26 into eclipse-openj9:master Jul 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants