RFR: JDK-8290839: jdk/jfr/event/compiler/TestJitRestart.java failed with "RuntimeException: No JIT restart event found: expected true, was false"
Erik Gahlin
egahlin at openjdk.org
Mon Jul 25 12:53:16 UTC 2022
On Fri, 22 Jul 2022 11:55:04 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> In seldom cases the TestJitRestart.java JFR test failed because no Jitrestart event was seen in the test.
> Dean Long suggested to change the test a bit "How about changing the test to look at CodeCacheFull, compilation, and JitRestart events. It can test that no compilation events happen after CodeCacheFull unless a JitRestart comes first. So it would be testing the order of events and not absolute counts."
>
> So I adjusted the test (still succeeds after a JitRestart is seen, but in case it is not seen only fails in case of Compilation events after CodeCacheFull).
There is no guarantee that events will arrive in the recording file in the same order they were committed. If the test depends on there order(?), the events should be sorted, i.e. events.sort(Comparator.comparing(RecordedEvent::getEndTime)).
-------------
PR: https://git.openjdk.org/jdk/pull/9612
More information about the hotspot-jfr-dev
mailing list