RFR: 8358080: Print thread stack with -Xlog:exceptions=trace [v3]
Ioi Lam
iklam at openjdk.org
Thu May 29 20:41:30 UTC 2025
> 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
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25522/files
- new: https://git.openjdk.org/jdk/pull/25522/files/d91a6f37..0182a988
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25522&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25522&range=01-02
Stats: 19 lines in 2 files changed: 13 ins; 0 del; 6 mod
Patch: https://git.openjdk.org/jdk/pull/25522.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25522/head:pull/25522
PR: https://git.openjdk.org/jdk/pull/25522
More information about the hotspot-dev
mailing list