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

Kevin Walls kevinw at openjdk.org
Mon Aug 19 14:14:57 UTC 2024


On Fri, 16 Aug 2024 23:05:16 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

>> I think the only reason for the change from STRING to FILE was to support shared code (not per dcmd code) doing the %p expansion. See the following change:
>> 
>> https://github.com/openjdk/jdk/pull/20198/files#diff-4f9f273d22b9cf7af6e58a5770b95cc758e8c8e9c257b56b9ac95bfa359c16f2
>> 
>> I wonder if it is possible to do this without the addition of FILE. Maybe most of the code can be shared, but we need a bit of dcmd specific code to invoke this filename expansion code.
>
>> I wonder if it is possible to do this without the addition of FILE. Maybe most of the code can be shared, but we need a bit of dcmd specific code to invoke this filename expansion code.
> 
> In JFR/JMC we have made the distinction between data type and content type [1]. In this case, the data type would be STRING, but the content type would be FILE. Maybe something similar could be added to the dcmd framework?
> 
> [1] https://docs.oracle.com/en/java/javase/22/docs/api/jdk.jfr/jdk/jfr/ContentType.html

Thanks @egahlin I did some investigating, will long a jbs entry for this and try to summarise the issues. 8-)

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

PR Comment: https://git.openjdk.org/jdk/pull/20198#issuecomment-2296681845


More information about the serviceability-dev mailing list