简体   繁体   English

开源Java Profilers

[英]Open Source Java Profilers

What can you guys recommend to use with Java? 你们可以推荐什么用于Java?

Only requirement is it should be open source, or has not too expensive academic licence . 唯一的要求是它应该是开源的,或者没有太昂贵的学术许可。

The VisualVM which comes with jdk6 has a basic profiler inside it. jdk6附带的VisualVM里面有一个基本的探查器。 VisualVM is provided with the jdk, so if you have the jdk6 installed, you likely have it installed as well. VisualVM随jdk提供,所以如果你安装了jdk6,你也可能已经安装了它。

https://visualvm.github.io/ https://visualvm.github.io/

you've got a list here (listing them below, in-case link gets broken) 你在这里有一个列表(在下面列出它们,在案例链接被破坏)

  • JMemProf JMemProf
  • JMP JMP
  • DrMem DrMem
  • JTreeProfiler JTreeProfiler
  • NetBeans Profiler NetBeans Profiler
  • JAMon API JAMon API
  • JBoss Profiler JBoss Profiler
  • MessAdmin MessAdmin
  • InfraRED 红外线
  • TomcatProbe TomcatProbe
  • Java Interactive Profiler (JIP) Java Interactive Profiler(JIP)
  • Profiler4j Profiler4j
  • Stopwatch 跑表
  • JMeasurement JMeasurement
  • DJProf DJProf
  • TIJmp TIJmp
  • Allmon Allmon
  • Appspy Appspy
  • EurekaJ EurekaJ
  • japex JAPEX
  • OKTECH Profiler OKTECH Profiler
  • Perf4j 的Perf4

Ah. 啊。 Netbeans Profiler , developer.com's "Product of the Year" winner, in 2009. Netbeans Profiler ,developer.com的“年度产品”获奖者,2009年。

Java has a basic built in profiler called HProf . Java有一个名为HProf的基本内置分析器。 I find it useful to compare the results it provides with results from more fully features profilers. 我发现将它提供的结果与更全面的特征分析器的结果进行比较是有用的。

The open-source tool jvmtop does include a basic console profiler. 开源工具jvmtop包含一个基本的控制台分析器。 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()

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 ). 如果您正在寻找一个简单易用的开源分析器,您可能需要查看Jip( Java Interactive Profiler )。 It's published under a BSD license. 它是根据BSD许可证发布的。 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. 至少,它给出的结果比hprofs输出更容易理解。

Java Mission Control , it's free to use for development and it integrates with Eclipse. Java Mission Control ,它可以免费用于开发,并与Eclipse集成。 It has very low overhead (<1%) since it piggybacks on the data the JVM is gathering anyway. 它具有非常低的开销(<1%),因为它背负着JVM正在收集的数据。

It's very easy to use and it can also give a lot information you typically won't find in other profiling tools, eg latency profiling, online memory inspection, detailed gc statistics 它非常易于使用,它还可以提供您在其他分析工具中通常无法找到的大量信息,例如延迟分析,在线内存检查,详细的gc统计信息

很快,很脏,而且非常有效:只需要几次线程转储,或暂停程序几次,然后查看堆栈跟踪。

JVM Monitor is a Java profiler integrated with Eclipse to monitor CPU, threads and memory usage of Java applications. JVM Monitor是一个与Eclipse集成的Java分析器,用于监视Java应用程序的CPU,线程和内存使用情况。

If further deep analysis is needed, you may use other tools (eg TPTP , Memory Analyzer ) as a next step. 如果需要进一步深入分析,您可以使用其他工具(例如TPTPMemory Analyzer )作为下一步。

Consider cutting-edge https://github.com/jvm-profiling-tools/async-profiler 考虑尖端的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 . 该项目是Java的低开销采样分析器,不会受到Safepoint偏差问题的影响 It features HotSpot-specific APIs to collect stack traces and to track memory allocations. 它具有特定于HotSpot的API,用于收集堆栈跟踪和跟踪内存分配。 The profiler works with OpenJDK, Oracle JDK and other Java runtimes based on HotSpot JVM. 该探查器可与OpenJDK,Oracle JDK和基于HotSpot JVM的其他Java运行时一起使用。

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


There is also similar https://github.com/jvm-profiling-tools/honest-profiler . 还有类似的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 async-profilerhonest-profiler之间的比较: https//github.com/jvm-profiling-tools/async-profiler/issues/77

Netbeans IDE includes a free profiler. Netbeans IDE包含一个免费的分析器。

Also, if I remember correctly, the academic license for JProfiler is (relatively) inexpensive. 此外,如果我没记错的话,JProfiler的学术许可证(相对)便宜。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM