RFR: 7506: Incorrect numeric formatting of PID by JMC

Suchita Chaturvedi schaturvedi at openjdk.org
Tue May 28 06:14:09 UTC 2024


On Mon, 27 May 2024 11:59:15 GMT, Marcus Hirt <hirt at openjdk.org> wrote:

>> This PR is to fix the formatting issue of the JVM PID on JVM information screen. JVM PID attribute is received as NUMBER from JFR and hence the JMC application is treating is as number. When the number is smaller , the PID is displayed using commas and when the number is larger, its converted to exponential format. This is a long pending bug in product.
>> 
>> The PID (Process Id) attribute is present in JMC as part of System Process event also where the data type is correct i.e. String. So in order to maintain consistency, we have made the content type of PID attribute of JVM Information event also as String. We are converting the number value of PID to string and then storing it. 
>> 
>> We have also introduced a new aggregator PID which will contain the value of Identifier in plain text format instead of number format. This new aggregator is displayed on JVM Information page.
>
> core/org.openjdk.jmc.flightrecorder/src/main/java/org/openjdk/jmc/flightrecorder/jdk/JdkAggregators.java line 118:
> 
>> 116: 	// VM Info
>> 117: 	public static final IAggregator<String, ?> JVM_NAME = distinctAsString(VM_INFO, JdkAttributes.JVM_NAME);
>> 118: 	public static final IAggregator<IQuantity, ?> JVM_PID = min(JdkAttributes.JVM_PID.getName(), null, VM_INFO,
> 
> Part of the public API. Perhaps better to deprecate?

Do you mean to use @deprecated tag here instead of deleting it completely?

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

PR Review Comment: https://git.openjdk.org/jmc/pull/565#discussion_r1616646286


More information about the jmc-dev mailing list