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

Fix JFR synchronization issues #20593

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Fix JFR synchronization issues #20593

merged 1 commit into from
Nov 15, 2024

Conversation

tajila
Copy link
Contributor

@tajila tajila commented Nov 13, 2024

  • Assert that VM access is always held while interacting with JFR buffer
  • Previously, we stored classhashtable entries. Class hashtable can grow and these entries become stale. Instead use romClass as the key for the package table
  • Previously, we iterated ClassEntry hashtables while adding entries to them (see fixupShallowEntries), this results in corruption. Instead we now make a list of the classes we need to scan (findShallowEntries), then walk the list and add scan entries after.
  • Dont create tables with J9HASH_TABLE_ALLOW_SIZE_OPTIMIZATION since we cant use that flag and iterate them.

Other fixes:

  • dont assume moduleName is always non-NULL
  • skip thread flush if the buffer is NULL
  • add aserts to non-sensible events

@tajila tajila requested a review from gacholio November 13, 2024 23:36
@tajila
Copy link
Contributor Author

tajila commented Nov 13, 2024

jenkins test funcitonal.sanity xlinux jdk17

1 similar comment
@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

jenkins test funcitonal.sanity xlinux jdk17

@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

jenkins test sanity xlinux jdk17

@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

jenkins test sanity xlinux jdk11

@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

@tajila tajila force-pushed the jfr3 branch 3 times, most recently from 9e23786 to 0b67634 Compare November 14, 2024 14:27
@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

@gacholio Please review these changes

runtime/vm/jfr.cpp Outdated Show resolved Hide resolved
@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

@gacholio changes ready for another look

- Assert that VM access is always held while interacting with JFR buffer
- Previously, we stored classhashtable entries. Class hashtable can grow
and these entries become stale. Instead use romClass as the key for the
package table
- Previously, we iterated ClassEntry hashtables while adding entries to
them (see fixupShallowEntries), this results in corruption. Instead we
now make a list of the classes we need to scan (findShallowEntries),
then walk the list and add scan entries after.
- Dont create tables with J9HASH_TABLE_ALLOW_SIZE_OPTIMIZATION since we
cant use that flag and iterate them.

Other fixes:
- dont assume moduleName is always non-NULL
- skip thread flush if the buffer is NULL
- add aserts to non-sensible events

Signed-off-by: Tobi Ajila <[email protected]>
@tajila
Copy link
Contributor Author

tajila commented Nov 14, 2024

Looks like my changes werent published. Ill push them now.

@gacholio
Copy link
Contributor

jenkins test sanity xlinux jdk21

@gacholio gacholio merged commit 9464ff3 into eclipse-openj9:master Nov 15, 2024
6 checks passed
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