Open Source Java Profilers

JavaProfiler

Java Problem Overview


What can you guys recommend to use with Java?

Only requirement is it should be open source, or has not too expensive academic licence .

Java Solutions


Solution 1 - Java

The VisualVM which comes with jdk6 has a basic profiler inside it. VisualVM is provided with the jdk, so if you have the jdk6 installed, you likely have it installed as well.

<https://visualvm.github.io/>

Solution 2 - Java

you've got a list here (listing them below, in-case link gets broken)

> - JMemProf > - JMP > - DrMem > - JTreeProfiler > - NetBeans Profiler > - JAMon API > - JBoss Profiler > - MessAdmin > - InfraRED > - TomcatProbe > - Java Interactive Profiler (JIP) > - Profiler4j > - Stopwatch > - JMeasurement > - DJProf > - TIJmp > - Allmon > - Appspy > - EurekaJ > - japex > - OKTECH Profiler > - Perf4j

Solution 3 - Java

Ah. Netbeans Profiler, developer.com's "Product of the Year" winner, in 2009.

Solution 4 - Java

Java has a basic built in profiler called HProf. I find it useful to compare the results it provides with results from more fully features profilers.

Solution 5 - Java

The open-source tool jvmtop does include a basic console profiler. Example output:

 JvmTop 0.7.0 alpha - 15:16:34,  amd64,  8 cpus, Linux 2.6.32-27, load avg 0.41
 http://code.google.com/p/jvmtop

 Profiling PID 24015: org.apache.catalina.startup.Bootstrap

  36.16% (    57.57s) hudson.model.AbstractBuild.calcChangeSet()
  30.36% (    48.33s) hudson.scm.SubversionChangeLogParser.parse()
   7.14% (    11.37s) org.kohsuke.stapler.jelly.JellyClassTearOff.parseScript()
   6.25% (     9.95s) net.sf.json.JSONObject.write()
   3.13% (     4.98s) ....kohsuke.stapler.jelly.CustomTagLibrary.loadJellyScri()

Solution 6 - Java

Solution 7 - Java

If you are looking for a no-frills, easy to use open source profiler, you may want to take a look at Jip (Java Interactive Profiler). It's published under a BSD license. I found it to be quite useful for small programs. At least, the results it gives are way more easy to understand than hprofs output.

Solution 8 - Java

Java Mission Control, it's free to use for development and it integrates with Eclipse. It has very low overhead (<1%) since it piggybacks on the data the JVM is gathering anyway.

It's very easy to use and it can also give a lot information you typically won't find in other profiling tools, e.g. latency profiling, online memory inspection, detailed gc statistics

Solution 9 - Java

This is quick, dirty, and very effective: just take a few thread dumps, or pause the program several times, and look at the stack traces.

Solution 10 - Java

Consider cutting-edge https://github.com/jvm-profiling-tools/async-profiler

> This project is a low overhead sampling profiler for Java that does not suffer from Safepoint bias problem. It features HotSpot-specific APIs to collect stack traces and to track memory allocations. The profiler works with OpenJDK, Oracle JDK and other Java runtimes based on HotSpot JVM.

It's also built-in into IntelliJ IDEA Ultimate: https://www.jetbrains.com/help/idea/cpu-profiler.html.


There is also similar https://github.com/jvm-profiling-tools/honest-profiler.

The comparison between async-profiler and honest-profiler: https://github.com/jvm-profiling-tools/async-profiler/issues/77

Solution 11 - Java

JVM Monitor is a Java profiler integrated with Eclipse to monitor CPU, threads and memory usage of Java applications.

If further deep analysis is needed, you may use other tools (e.g. TPTP, Memory Analyzer) as a next step.

Solution 12 - Java

Netbeans IDE includes a free profiler.

Also, if I remember correctly, the academic license for JProfiler is (relatively) inexpensive.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHamza YerlikayaView Question on Stackoverflow
Solution 1 - JavaChiView Answer on Stackoverflow
Solution 2 - JavaLB40View Answer on Stackoverflow
Solution 3 - JavaAdeel AnsariView Answer on Stackoverflow
Solution 4 - JavaPeter LawreyView Answer on Stackoverflow
Solution 5 - JavaMRalwasserView Answer on Stackoverflow
Solution 6 - JavalotharView Answer on Stackoverflow
Solution 7 - JavaMartin DirichsView Answer on Stackoverflow
Solution 8 - JavaKire HaglinView Answer on Stackoverflow
Solution 9 - JavaMike DunlaveyView Answer on Stackoverflow
Solution 10 - JavaVadzimView Answer on Stackoverflow
Solution 11 - JavaBarunView Answer on Stackoverflow
Solution 12 - JavaPaul MorieView Answer on Stackoverflow