RFR: 8242188: [TESTBUG] error in jtreg test jdk/jfr/api/consumer/TestRecordedFrame.java on linux-aarch64

Nick Gasson nick.gasson at arm.com
Tue May 12 10:40:02 UTC 2020


Hi Erik,

> Looks reasonable (but perhaps still fragile??)
>

Yes it is a bit fragile. Another way of doing it is to remove the -Xcomp
and let main() loop enough to trigger OSR compilation. Something like
this:


    public static int counter = 0;
    
    public static void main(String[] args) throws IOException {
        if ("false".equals(System.getProperty("interpreted"))) {
            for (int i = 0; i < 100000; i++) {
                counter++;
            }
        }
        
        test(); // Records the line number and BCI for the main method/frame
    }


What do you think?

--
Thanks,
Nick


More information about the hotspot-jfr-dev mailing list