Profiling Java Applications with JMC
Java Mission Control enables you to monitor and manage Java applications without introducing the performance overhead normally associated with these types of tools. It is quite easy to profile Java applications with JMC. Read more here
-First you need to start your application with additional options
$JAVA_HOME/bin/java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar test-app.jar
-Run JMC client on your machine
-New connection
-Enter details of your application host, port etc
-Test connection
-Once connected you can start JMX console and Flight recording
-You can set various options e.g. time for recording
-You can also save the Flight recordings
Note: If you want to profile a remote application make sure you have access to host and port