RFR: 8365630: jdk/jfr/tool/TestPrintContextual.java fails with wrong spanId

Aleksey Shipilev shade at openjdk.org
Mon Oct 6 07:46:05 UTC 2025


On Fri, 3 Oct 2025 16:33:31 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> Could I get a review of a test fix that emits events with unique timestamps, so the contextual information is printed in chronological order?
> 
> Testing: 500 *  jdk/jfr/tool/TestPrintContextual.java
> 
> Thanks
> Erik

test/jdk/jdk/jfr/tool/TestPrintContextual.java line 288:

> 286:                 Thread.sleep(1);
> 287:             } catch (InterruptedException e) {
> 288:                 // ignore

Why ignore, though? This would make the thread stuck even if someone actively tries to interrupt it. A common practice in these non-critical methods is to restore the interrupt status and return.


} catch (InterruptedException e) {
    Thread.currentThread().interrupt();
    return;
}

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27626#discussion_r2405211347


More information about the hotspot-jfr-dev mailing list