-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8358750: JFR: EventInstrumentation MASK_THROTTLE* constants should be computed in longs #26028
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
Conversation
👋 Welcome back egahlin! A progress list of the required criteria for merging this PR into |
@egahlin 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 61 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. ➡️ To integrate this PR with the above commit message to the |
Webrevs
|
/integrate |
Going to push as commit 77e69e0.
Your commit was automatically rebased without conflicts. |
/backport :jdk25 |
@egahlin the backport was successfully created on the branch backport-egahlin-77e69e02-jdk25 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk25, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:
|
Could I have a review of a fix to the throttling mechanism added in JDK 25? Long values should be shifted instead of integer values when creating the masks.
During debugging, I found several issues, and I also strengthened the test.
The start time of the event needs to be stored if the event is being throttled. The reason is that the timestamp is reused later to determine if the event should be throttled or not. This happens with events that lack an end time.
The duration value that is written to the buffer must remove the mask if it is throttled. This is handled by
getDuration(blockCodeBuilder)
.I added a clarifying comment that when duration is compared to 0, it also prevents a new duration from being calculated if the event has been throttled (for an instant event).
The test now checks that the duration is not negative, that the start time is not before the test starts, and that the duration is not unreasonably large. The reason I multiply the recording duration by two is to give the test some slack in case we run into clock issues where the time taken for the event doesn't match the recording. Purpose of the check is to make sure we don't end up with the mask being added to the duration.
Testing:
test/jdk/jdk/jfr + tier1
I validated manually that the throttle rate works using a small test program I have (which can't be checked in due to stability issues).
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26028/head:pull/26028
$ git checkout pull/26028
Update a local copy of the PR:
$ git checkout pull/26028
$ git pull https://git.openjdk.org/jdk.git pull/26028/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26028
View PR using the GUI difftool:
$ git pr show -t 26028
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26028.diff
Using Webrev
Link to Webrev Comment