Skip to content

Conversation

@adpopescu
Copy link
Contributor

@adpopescu adpopescu commented Dec 8, 2025

This change adds all the necessary structures to add some new
GC JFR events. Also adding JFR OldGarbageCollection event and test.

Depends on #23074

@adpopescu
Copy link
Contributor Author

adpopescu commented Dec 8, 2025

This is the JFR part of this PR: #22553
@tajila @amicic please review.

This change add a new api for a unique cycle ID. This should set the ID
consistently for use throughout the entirety of the cycle. Also moving
GC count to be incremented just before cycle start to be consistent with
 how it's now being done in OMR see
 eclipse-omr/omr#8065

Signed-off-by: Adrian Popescu <adpopescu@ibm.com>
This change adds all the necessary structures to add some new
GC JFR events. Also adding JFR OldGarbageCollection event and test.

Signed-off-by: Adrian Popescu <adpopescu@ibm.com>
}

/**
* API to return a unique GC ID based on what is set in cycle state. Returns 0 if there is no active GC cycle.
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend to put information about the return value next to @return.

<output type="success" caseSensitive="yes" regex="no">classLoader</output>
<output type="failure" caseSensitive="yes" regex="no">jfr print: could not read recording</output>
</test>
<test id="test jfr OldGarbageCollection - approx 30 seconds">
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be tests for the other new events as well?

* @param userData[in] the registered user data
*/
static void
jfrOldGarbageCollection(J9HookInterface **hook, UDATA eventNum, void *eventData, void* userData)
Copy link
Contributor

Choose a reason for hiding this comment

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

void *userData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants