RFR: 8327054: DiagnosticCommand Compiler.perfmap does not log on output() [v3]

Kevin Walls kevinw at openjdk.org
Mon Jul 22 14:43:33 UTC 2024


On Mon, 22 Jul 2024 13:45:49 GMT, Sonia Zaldana Calles <szaldana at openjdk.org> wrote:

>> Hi all, 
>> 
>> This is a small patch to address [8327054](https://bugs.openjdk.org/browse/JDK-8327054) making `CodeCache::write_perf_map` aware of which output stream errors and warning message should be going to.
>> 
>> Testing: 
>> - [x] Added test case passes. 
>> 
>> Thanks, 
>> Sonia
>
> Sonia Zaldana Calles has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Adding comment

test/hotspot/jtreg/serviceability/dcmd/compiler/PerfMapTest.java line 124:

> 122:             OutputAnalyzer output = new JMXExecutor().execute("Compiler.perfmap %s".formatted(path));
> 123:             output.shouldContain("Failed to create nonexistent/%s for perf map".formatted(test_dir));
> 124:             output.shouldNotHaveExitValue(0);

I'm curious if this exit value check works, as jcmd failures like this show "Command executed successfully" and return 0 for success.
These compiler tests have chosen JMXExecutor and PidJcmdExecutor which might be relevant.  Interested to know if JMXExecutor returns a non-zero exit value for this?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20257#discussion_r1686674484


More information about the serviceability-dev mailing list