RFR: 8314029: Add file name parameter to Compiler.perfmap [v8]
Dean Long
dlong at openjdk.org
Wed Dec 13 20:54:45 UTC 2023
On Mon, 11 Dec 2023 22:41:56 GMT, Yi-Fan Tsai <duke at openjdk.org> wrote:
>> `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: `/tmp/perf-%d.map`. This change adds an optional argument for specifying a file name.
>>
>> `jcmd PID help Compiler.perfmap` shows the following usage.
>>
>>
>> Compiler.perfmap
>> Write map file for Linux perf tool.
>>
>> Impact: Low
>>
>> Syntax : Compiler.perfmap [<filename>]
>>
>> Arguments:
>> filename : [optional] Name of the map file (STRING, no default value)
>>
>>
>> The following section of man page is also updated. (`man -l src/jdk.jcmd/share/man/jcmd.1`)
>>
>>
>> Compiler.perfmap [arguments] (Linux only)
>> Write map file for Linux perf tool.
>>
>> Impact: Low
>>
>> arguments:
>>
>> · filename: (Optional) Name of the map file (STRING, no default value)
>>
>> If filename is not specified, a default file name is chosen using the pid of the target JVM process. For example, if the pid is 12345, then
>> the default filename will be /tmp/perf-12345.map.
>
> Yi-Fan Tsai has updated the pull request incrementally with one additional commit since the last revision:
>
> Update copyright of PerfMapTest
The man page says "no default value" but then right below describes the default value, which is confusing. I would remove "no default value".
The code already deals with patterns, so why not allow a pattern like /dir/perf-%x.map and document that the platform-specific process id will be passed to String.format() to expand any formatting tokens in the string?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15871#issuecomment-1854683037
More information about the hotspot-dev
mailing list