RFR: 8334492: DiagnosticCommands (jcmd) should accept %p in output filenames and substitute PID [v3]

Laurence Cable larry.cable at oracle.com
Thu Jul 18 16:22:30 UTC 2024



On 7/17/24 10:03 PM, Thomas Stuefe wrote:
> On Thu, 18 Jul 2024 00:45:24 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>
>>> Sonia Zaldana Calles has updated the pull request incrementally with one additional commit since the last revision:
>>>
>>>    Updates based on feedback
>> src/hotspot/share/code/codeCache.cpp line 1791:
>>
>>> 1789:
>>> 1790: #ifdef LINUX
>>> 1791: void CodeCache::write_perf_map(const char* filename, outputStream* out) {
>> I don't think that it is a right place ti expand arguments here. I think it is more consistent to do it in diagnosticCommand.cpp for any jcmd command.  So this logic might be the same for any _filename processing. Moreover it would be better be add 'FileArgument' like 'MemorySizeArgument' that correctly parse patterns like %p for all file arguments, used be all commands and be extensible for new macroses if needed.
> That's a good idea.

+1

>
> -------------
>
> PR Review Comment: https://git.openjdk.org/jdk/pull/20198#discussion_r1682118709



More information about the serviceability-dev mailing list