RFR: 8323546: Clarify docs for Compiler.perfmap filename parameter, and other misc related jcmd doc cleanups [v4]

Serguei Spitsyn sspitsyn at openjdk.org
Fri Jan 12 10:30:23 UTC 2024


On Fri, 12 Jan 2024 02:07:47 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> The jcmd docs for Compiler.perfmap currently say:
>> 
>>     - *filename*: (Optional) The name of the map file (STRING, no default value)
>> 
>> However, there is a default, so not only should that be made more clear in the above, but also some descriptive text as to how the default is generated should be added.
>> 
>> VM.cds has a similar issue, but already has the descriptive text, so just the "no default value" part needs to be fixed.
>> 
>> Another change needed is to consistently use *filename* (italics) instead of `filename` (monospace). Note this is how html formatting is done. For the man page formatting, *filename* does no formatting and `filename` is displayed in color if supported. Personally I prefer `filename`, but it seems that there is already a strong precedence for using italics in the *arguments* list. For example:
>> 
>>     *arguments*:
>> 
>>     - *flag name*: The name of the flag that you want to set (STRING, no
>>         default value)
>> 
>>     - *string value*: (Optional) The value that you want to set (STRING, no
>>         default value)
>
> Chris Plummer has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fix default filename issue

src/hotspot/share/services/diagnosticCommand.cpp line 866:

> 864:   const char* filename = _filename.value();
> 865:   if (strncmp(filename, DEFAULT_PERFMAP_FILENAME, strlen(DEFAULT_PERFMAP_FILENAME)) == 0) {
> 866:       filename = nullptr; // use the default filename based on the pid

Nit: the indent has to be 2, not 4.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17359#discussion_r1450203634


More information about the hotspot-runtime-dev mailing list