Skip to content

Conversation

jerboaa
Copy link
Collaborator

@jerboaa jerboaa commented Nov 9, 2022

This is needed in order to get correct memory limits detected for some code paths (one of which is JFR).

Closes: #5396

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 9, 2022
@jerboaa jerboaa changed the title Re-initialize JDKs cgroup subsystem classes Reset JDKs cgroup metrics instances Nov 10, 2022
Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jerboaa !

@jerboaa jerboaa force-pushed the containers_native_jfr_fix_2 branch from c811085 to d0a9565 Compare November 10, 2022 13:12
@fniephaus fniephaus changed the title Reset JDKs cgroup metrics instances [GR-42465] Reset JDKs cgroup metrics instances Nov 15, 2022
Copy link
Member

@fniephaus fniephaus left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@fniephaus fniephaus self-assigned this Nov 15, 2022
@jerboaa
Copy link
Collaborator Author

jerboaa commented Nov 15, 2022

Thank you!

This is needed in order to get correct memory limits detected
for some code paths (one of which is JFR).

Reset containerMetrics and initializationTriggered static
variables in JDKEvents class so as to not carry over build-time
information to runtime.

Similarly, reset RequestEngine.entries list to an empty list
so that initialization doesn't re-add hooks added at build time.

Closes: oracle#5396
@jerboaa jerboaa force-pushed the containers_native_jfr_fix_2 branch from d0a9565 to a7ea29b Compare November 22, 2022 15:19
@jerboaa
Copy link
Collaborator Author

jerboaa commented Nov 22, 2022

@fniephaus It's my understanding that jdk.Container* events can be ticked off on the list in #5410 too with this fix. /cc @roberttoyonaga

@roberttoyonaga
Copy link
Collaborator

It's my understanding that jdk.Container* events can be ticked off on the list in #5410 too with this fix

Yup they seem to be working now. I'll update the task list. Thank you!

@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 12, 2022

@fniephaus Are there any other issues with this patch that aren't addressed, yet? Thanks!

@fniephaus
Copy link
Member

Thanks for resolving the open issue and for the delay. I've asked for another internal review and will merge this when all is well.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 12, 2022

Thanks for the heads-up!

@fniephaus
Copy link
Member

The PR is now in our merge queue.

@fniephaus fniephaus added this to the 23.0.0 Release milestone Dec 13, 2022
@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 13, 2022

Thanks!

@fniephaus
Copy link
Member

This was merged via a01e8b7.

@fniephaus fniephaus closed this Dec 16, 2022
@jerboaa
Copy link
Collaborator Author

jerboaa commented Dec 16, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GR-42465] JFR jdk.ContainerConfiguration event reports wrong values in a container
5 participants