RFR: 8364667: JFR: Throttle doesn't work with dynamic events

Erik Gahlin egahlin at openjdk.org
Mon Aug 4 22:31:26 UTC 2025


Could I have a review of a PR that fixes a bug with dynamic events and the new `@Throttle` annotation?

If a class is in the boot class loader (isJDK), it only checks for a static commit method and does not check if the `@Throttle` annotation exists (which it does  for dynamic events).

I added a test, and I also noticed that there is no check to see if there are zero events when shouldCommit is false, so I added that as well.

Testing: jdk/jdk/jfr

Thanks
Erik

-------------

Commit messages:
 - Move test in file
 - Initial

Changes: https://git.openjdk.org/jdk/pull/26632/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26632&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8364667
  Stats: 52 lines in 3 files changed: 46 ins; 4 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/26632.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26632/head:pull/26632

PR: https://git.openjdk.org/jdk/pull/26632


More information about the hotspot-jfr-dev mailing list