RFR: 8309296: jdk/jfr/event/runtime/TestAgentEvent.java fails due to "missing" dynamic JavaAgent
Erik Gahlin
egahlin at openjdk.org
Wed Jun 21 08:02:40 UTC 2023
Could I have a review of a test fix.
Problem is that events use another clock source than Recording::getStartTime().
I added -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps in case the Attach thread and the Main thread executes on different cores and there could be drift. The flags may, or may not, also fix the time source issue. Regardless, I think it's prudent to do time comparison against an event, not the recording timestamps, because they are different things conceptually and there are tweaks to the recording timestamps (to make them work well with Instant.now(), not the event clock source)
Testing: jdk/jdk/jfr/event/runtime/TestAgentEvent.java
Thanks
Erik
-------------
Commit messages:
- Initial
Changes: https://git.openjdk.org/jdk/pull/14572/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14572&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8309296
Stats: 38 lines in 1 file changed: 21 ins; 0 del; 17 mod
Patch: https://git.openjdk.org/jdk/pull/14572.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14572/head:pull/14572
PR: https://git.openjdk.org/jdk/pull/14572
More information about the hotspot-jfr-dev
mailing list