RFR: 8080: Add support for enabling jfr on native images [v3]

Christoph Langer clanger at openjdk.org
Tue Jun 13 16:35:58 UTC 2023


On Tue, 13 Jun 2023 14:13:53 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

>> This PR addresses JMC-8080 [[0]](https://bugs.openjdk.org/browse/JMC-8080), in which it would be nice to add support for enabling flight recorder on GraalVM native images.
>> 
>> Currently, trying to use the flight recording wizard on a connected native image ends up with an error dialog:
>> ![native-image](https://github.com/openjdk/jmc/assets/10425301/a04b49db-922c-451e-89d8-0cc951e3bbda)
>> 
>> The proposed solution here adds checks to determine if the vm is of type Substrate VM, and check if there is a flightrecording mbean registered.
>> 
>> [0] https://bugs.openjdk.org/browse/JMC-8080
>
> Alex Macdonald has updated the pull request incrementally with one additional commit since the last revision:
> 
>   run mvn:spotless apply

core/org.openjdk.jmc.common/src/main/java/org/openjdk/jmc/common/version/JavaVMVersionToolkit.java line 94:

> 92: 	 * @param vmName
> 93: 	 *            the JVM name to check.
> 94: 	 * @return {@code true} of it is a JRockit, {@code false} if it isn't or if it was not possible

Haha, as you touch it, you should also fix this typo: "of it is" -> "if it is" 😄

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

PR Review Comment: https://git.openjdk.org/jmc/pull/491#discussion_r1228413742


More information about the jmc-dev mailing list