From Fedora Project Wiki

(update with info on jmc package retiring and copr repo)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
== DEPRECATION ==
Effective August 2021, the JDK Mission Control (JMC) packages in Fedora have been retired.
Unfortunately, at the time JMC packages were orphaned there was some incompatibility with the (also retired) Eclipse packages, and as a result the JMC that is currently installable in Fedora is broken. It is known that Flight Recorder support in the Fedora-supplied JMC application is not available or functioning properly, and there is currently no way of updating the packages to amend this.
As a workaround, there is a copr repository [https://copr.fedorainfracloud.org/coprs/almac/jmc8/ [0<nowiki>]</nowiki>] that rpm-wraps AdoptOpenJDK JMC builds [https://adoptopenjdk.net/jmc.html [1<nowiki>]</nowiki>] for use in Fedora. The "Running JMC" portion of this wiki will still apply to the copr repo.
The steps to install and use the copr repo are:
Enable the copr repo:
`$ dnf copr enable almac/jmc8`
Install JDK Mission Control:
`$ sudo dnf install jmc`
Run JDK Mission Control:
`$ jmc`
[0] https://copr.fedorainfracloud.org/coprs/almac/jmc8/
[1] https://adoptopenjdk.net/jmc.html
== Abstract ==
== Abstract ==
This page provides information about '''JMC''' installations on Fedora. (See also [https://fedoraproject.org/wiki/Java Java].)
This page provides information about '''JMC''' installations on Fedora. (See also [https://fedoraproject.org/wiki/Java Java].)
Line 10: Line 36:
JFR is part of the JVM, and is available in OpenJDK 11 or Oracle JDK 7u4 or later. Therefore to generate a flight recording to be loaded into JMC for analysis, the target application needs to run on OpenJDK 11 or OracleJDK 7u4 or later.
JFR is part of the JVM, and is available in OpenJDK 11 or Oracle JDK 7u4 or later. Therefore to generate a flight recording to be loaded into JMC for analysis, the target application needs to run on OpenJDK 11 or OracleJDK 7u4 or later.


== Installing JMC ==
== Installing JMC (deprecated) ==


JMC is available as a module on Fedora 29+. There are currently two streams. 'latest' tracks the latest commit in upstream jmc/jmc and is updated quarterly. '7' tracks the 7.x stable release commit in jmc/jmc7.
JMC is available as a module on Fedora 29+. There are currently two streams. 'latest' tracks the latest commit in upstream jmc/jmc and is updated quarterly. '7' tracks the 7.x stable release commit in jmc/jmc7.
Line 20: Line 46:
`
`


Alternatively, install the '7' stream via:
Or, install the '7' stream via:


`
`
sudo dnf module install jmc:7/default
sudo dnf module install jmc:7/default
`
`
To switch between streams, first reset the module via:
`
sudo dnf module reset jmc
`
== Running JMC ==


Run JMC using the default system JDK via:
Run JMC using the default system JDK via:

Latest revision as of 17:28, 24 August 2021

DEPRECATION

Effective August 2021, the JDK Mission Control (JMC) packages in Fedora have been retired.

Unfortunately, at the time JMC packages were orphaned there was some incompatibility with the (also retired) Eclipse packages, and as a result the JMC that is currently installable in Fedora is broken. It is known that Flight Recorder support in the Fedora-supplied JMC application is not available or functioning properly, and there is currently no way of updating the packages to amend this.

As a workaround, there is a copr repository [0] that rpm-wraps AdoptOpenJDK JMC builds [1] for use in Fedora. The "Running JMC" portion of this wiki will still apply to the copr repo.

The steps to install and use the copr repo are:

Enable the copr repo:

$ dnf copr enable almac/jmc8

Install JDK Mission Control:

$ sudo dnf install jmc

Run JDK Mission Control:

$ jmc

[0] https://copr.fedorainfracloud.org/coprs/almac/jmc8/

[1] https://adoptopenjdk.net/jmc.html

Abstract

This page provides information about JMC installations on Fedora. (See also Java.)

This page will discuss JDK Mission Control (JMC) and how to install and run it on Fedora.

What is JMC

JDK Mission Control is a powerful profiling application for HotSpot JVMs and has an advanced set of tools that enables efficient and detailed analysis of the extensive data collected by Flight Recorder (JFR). JMC requires JDK 8 or later.

JFR is part of the JVM, and is available in OpenJDK 11 or Oracle JDK 7u4 or later. Therefore to generate a flight recording to be loaded into JMC for analysis, the target application needs to run on OpenJDK 11 or OracleJDK 7u4 or later.

Installing JMC (deprecated)

JMC is available as a module on Fedora 29+. There are currently two streams. 'latest' tracks the latest commit in upstream jmc/jmc and is updated quarterly. '7' tracks the 7.x stable release commit in jmc/jmc7.

Install the 'latest' stream via:

sudo dnf module install jmc:latest/default

Or, install the '7' stream via:

sudo dnf module install jmc:7/default

To switch between streams, first reset the module via:

sudo dnf module reset jmc

Running JMC

Run JMC using the default system JDK via:

$ jmc

Run JMC using a specific JDK via:

$ jmc -vm /path/to/jdk/bin

For example, OpenJDK 11 is available on Fedora 29 and later through the package ‘java-11-openjdk. Install via:

$ sudo dnf install java-11-openjdk

Now we can run JMC with OpenJDK 11 via:

$ jmc -vm /usr/lib/jvm/jre-11-openjdk/bin