On Thu, 21 Sep 2023 20:43:56 GMT, Yi-Fan Tsai <d...@openjdk.org> wrote:

> `jcmd Compiler.perfmap` uses the hard-coded file name for a perf map: 
> `/tmp/perf-%d.map`. This change adds an option for specifying a file name.
> 
> The help message of Compiler.perfmap:
> 
> Compiler.perfmap
> Write map file for Linux perf tool.
> 
> Impact: Low
> 
> Syntax : Compiler.perfmap [options]
> 
> Options: (options must be specified using the <key> or <key>=<value> syntax)
>         filename : [optional] Name of the map file (STRING, no default value)

src/hotspot/share/code/codeCache.cpp line 1805:

> 1803: CodeCache::DefaultPerfMapFile::DefaultPerfMapFile() {
> 1804:   // Perf expects to find the map file at /tmp/perf-<pid>.map.
> 1805:   jio_snprintf(_name, sizeof(_name), "/tmp/perf-%d.map", 
> os::current_process_id());

Please change the comment to:

// Perf expects to find the map file at /tmp/perf-<pid>.map.
// It is used as the default file name.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15871#discussion_r1334437849

Reply via email to