RFR: 8358080: Print thread stack with -Xlog:exceptions=trace [v3]
David Holmes
dholmes at openjdk.org
Thu May 29 20:59:51 UTC 2025
On Thu, 29 May 2025 20:41:30 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> This makes it easier to analyze exceptions without modifying the JVM or the app to print call stacks:
>>
>>
>> $ java -Xlog:exceptions=trace -cp foo.jar Foo
>> [2.047s][info ][exceptions] Exception <a 'java/lang/NullPointerException'{0x00000004736ab200}>
>> [ ] thrown in interpreter method <{method} {0x000070488c9f2a50} 'isLoggable' '(Ljava/lang/System$Logger$Level;)Z' in 'jdk/internal/logger/AbstractLoggerWrapper'>
>> [ ] at bci 5 for thread 0x000070499802e730 (DestroyJavaVM)
>> [2.048s][trace][exceptions] at jdk.internal.logger.AbstractLoggerWrapper.isLoggable([java.base at 25-internal](mailto:java.base at 25-internal)/AbstractLoggerWrapper.java:68)
>> [2.048s][trace][exceptions] at java.lang.ProcessBuilder.start([java.base at 25-internal](mailto:java.base at 25-internal)/ProcessBuilder.java:1093)
>> [2.048s][trace][exceptions] at java.lang.ProcessBuilder.start([java.base at 25-internal](mailto:java.base at 25-internal)/ProcessBuilder.java:1044)
>> [2.048s][trace][exceptions] at jdk.internal.misc.CDS$ProcessLauncher.execWithJavaToolOptions([java.base at 25-internal](mailto:java.base at 25-internal)/CDS.java:548)
>
> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>
> Added test case
test/hotspot/jtreg/runtime/logging/ExceptionsTest.java line 2:
> 1: /*
> 2: * Copyrightest() 2015, 2025, Oracle and/or its affiliates. All rights reserved.
This looks like a typo
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25522#discussion_r2114739651
More information about the hotspot-dev
mailing list