RFR: 8344165: Trace exceptions with a complete call-stack [v4]
Ioi Lam
iklam at openjdk.org
Mon Jun 9 23:27:28 UTC 2025
On Fri, 30 May 2025 06:47:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use -Xlog:exceptions+stacktrace instead; fixed typo in comments
>
> test/hotspot/jtreg/runtime/logging/ExceptionsTest.java line 48:
>
>> 46: static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
>> 47: OutputAnalyzer output = new OutputAnalyzer(pb.start());
>> 48: System.out.println(output.getStdout());
>
> Debugging code?
>
> If you really want to always print the output then the more common pattern is to use `out.reportDiagnosticSummary()` after all the checks have been done and so the test has passed (failing tests will print it anyway).
The output is printed only if the failure happens in `OutputAnalyzer::shouldMatch()`, etc. I've updated the test so failures can happen other ways, so I cannot rely on this anymore.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25522#discussion_r2136662352
More information about the hotspot-dev
mailing list