-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8286707: JFR: Don't commit JFR internal jdk.JavaMonitorWait events #8883
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
8286707: JFR: Don't commit JFR internal jdk.JavaMonitorWait events #8883
Conversation
|
👋 Welcome back jnordstrom! A progress list of the required criteria for merging this PR into |
Webrevs
|
src/jdk.jfr/share/classes/jdk/jfr/internal/FileDeltaChangeLockObject.java
Outdated
Show resolved
Hide resolved
|
@dholmes-ora
|
|
/label add hotspot-jfr |
|
@dholmes-ora |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think any filtering should be handled internally to JFR not in the ObjectMonitor code.
|
@dholmes-ora The |
|
@jaokim This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@jaokim This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
|
/open |
|
@jaokim This pull request is now open |
|
I've re-opened this, and made slight alterations after suggestions from @mgronlun |
|
@jaokim This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 76 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@dholmes-ora, @egahlin) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still not happy about this approach. JFR is written in Java and so triggers numerous events that are defined for Java code - that is a simple consequence of implementing it in Java. If there is to be filtering of events that originate from JFR Java code then there should be a general purpose filtering mechanism available to say "exclude JFR code" or "include JFR code" as desired. And to me the filtering mechanism should reside in the event commit code inside the JFR code not in the event-posting code in the shared components of the VM.
|
There exist a general exclusion/inclusion mechanism already. But it is an all-or-nothing proposition. This particular case is a thread that we can't exclude because it runs the periodic events, upon being notified. It is the notification mechanism to run the periodic events that trigger this large amount of unnecessary MonitorWait events. Even should we change it to some util.concurrent construct, we are only pushing the problem, because we might be instrumenting them later too. To work with the existing exclusion mechanism, the system would have to introduce an additional thread, which will be excluded, which only handles the notification, and then by some other means triggers another periodic thread (included) to run the periodic events. |
|
@mgronlun my request is that this filtering be done inside the commit logic by the JFR code, not at the site where the event is generated - ie this internal-jfr-event filtering is internalized into the JFR code. |
|
@dholmes-ora I agree that would be preferable indeed. Unfortunately, it cannot be done without introducing overhead to all event types and all event commit sites. |
|
Would it be possible to add this filtering as part of the throttling mechanism? I guess it would push the meaning of throttling, and might be overkill for this specific use-case, but perhaps some new internal throttle-like approach could be implemented? |
|
I'm realizing that the monitor class isn't available elsewhere; it is in objectMonitor.cpp, and passed to private members in the |
dholmes-ora
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making the effort to investigate alternatives, it is appreciated.
|
Thank you for reviewing and comments, @dholmes-ora, @egahlin and @mgronlun! Would anyone of you sponsor this as well? Thanks! |
|
/integrate |
|
/sponsor |
|
Going to push as commit fc88957.
Your commit was automatically rebased without conflicts. |
Changed the JFR chunk rotation lock object to specific internal class. This allows that specific Object.wait() event to be skipped, thus not adding JFR internal noise to recordings.
Testing
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/8883/head:pull/8883$ git checkout pull/8883Update a local copy of the PR:
$ git checkout pull/8883$ git pull https://git.openjdk.org/jdk pull/8883/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 8883View PR using the GUI difftool:
$ git pr show -t 8883Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/8883.diff