Java 性能分析工具 VisualVM 1.3.3 發布

fmms 13年前發布 | 22K 次閱讀 Java

Java 性能分析工具 VisualVM 1.3.3 發布VisualVM是一個集成多個JDK命令行工具的可視化工具。可以作為Java應用程序性能分析和運行監控的工具。開發人員可以利用它來監控,分 析,獲 勝Thread-Dumps,瀏覽Heap dumps。系統管理員可以利用它來監測,控制Java應用程序橫跨整個網絡的情況。Java應用程序使用人員可以利用它來創建包含所有必要信息的Bug 報告。

Java 性能分析工具 VisualVM 1.3.3 發布

新版本主要改進包括:

  • 自動死鎖監測工具
  • 對沒個線程CPU進行采樣和內存分析
  • 支持 Eclipse IDE 3.6 或更新版本
項目地址: http://java.net/projects/visualvm/content/

Features

VisualVM is a tool to monitor and troubleshoot Java applications. It runs on Oracle/Sun JDK 6, but is able to monitor applications running on JDK 1.4 and higher. It utilizes various available technologies like jvmstat, JMX, the Serviceability Agent (SA), and the Attach API to get the data and automatically uses the fastest and most lightweight technology to impose minimal overhead on monitored applications.

With the out-of-the-box features it perfectly fits all the requirements of application developers, system administrators, quality engineers and - last but not least - application users submitting bug reports containing all the necessary information.

Demo

See a screencast to discover the most important VisualVM features!


Features

Display local and remote Java applications. VisualVM automatically detects and lists locally and remotely running Java applications (jstatd must be running on the remote host). You can also define applications manually by JMX connection. This way you can easily see what Java applications are running on your system or check if a remote J2EE server process is alive.


Display application configuration and runtime environment. For each application VisualVM shows basic runtime information: PID, main class, arguments passed to java process, JVM version, JDK home, JVM flags and arguments and system properties.


Monitor application performance and memory consumption. VisualVM monitors application CPU usage, GC activity, heap and permanent generation memory, number of loaded classes and running threads. You can easily detect suspicious memory consumption and take an action - invoke garbage collection in the application or take a heap dump and browse the contents of application heap.


Monitor application threads. All threads running in a Java process are displayed in a timeline and table. You can track thread activity and uncover inefficient patterns like blocked Event Dispatch Thread or unused worker threads.


Profile application performance or analyze memory allocation. VisualVM includes a built-in application profiler which can visualize where most of the time is being spent or which objects consume most of the memory by just one mouse click without any additional configuration.


Take and display thread dumps. Taking and displaying a thread dump is as easy as clicking a mouse button. You don't need to deal with the command line at all to determine what's currently happening in the application. Moreover, simultaneous thread dumps of multiple applications can be taken at once to start uncovering distributed deadlocks.


Take and browse heap dumps. When you need to browse contents of application memory or uncover a memory leak in your application, you'll find the built-in HeapWalker tool really handy. It can read files written in hprof format and is also able to browse heap dumps created by the JVM on an OutOfMemoryException.


Analyze core dumps. When a Java process crashes, a core dump can be generated by the JVM containing important information about application state at the time of the crash. VisualVM is able to display application configuration and runtime environment and to extract thread and heap dumps from the core dump.


Analyze applications offline. VisualVM is able to save application configuration and runtime environment together with all taken thread dumps, heap dumps and profiler snaphots into a single application snapshot which can be later processed offline. This is especially useful for bug reports where users can provide a single file containing all the necessary information to identify runtime environment and application state.

Extensibility

Since VisualVM is built on the NetBeans Platform, its architecture is modular and easy to extend with plugins. There are various plugins available on the VisualVM Plugin Center including 3rd party plugins, other plugins can be obtained as separate downloads from their respective authors. You can check the list of currently available plugins at the Plugins page.

If you need a special feature or support for a proprietary tool, you can implement your own plugin. It's easy and there is plenty of information and sample code available for both the NetBeans Platform and VisualVM APIs. A good place to start is the Developer Documentation page.

IDE Integration

VisualVM can be integrated with your IDE to monitor and analyze the code iteratively during development. Integration is available for these IDEs:

  • Eclipse IDE: VisualVM starts along with the monitored application and automatically opens it after startup to make the monitoring or profiling more convenient. See the Eclipse launcher for VisualVM page for more information and to get the plugin.
  • NetBeans IDE: Use the NetBeans profiler! NetBeans already provides basic monitoring capabilities and offers a fully-featured profiler tightly integrated into the IDE workflow. The extra features over the VisualVM include JDK 5 support, remote profiling, Java EE profiling, automated heap analysis, projects/sources integration and much more. See the profiler module home for more information.

Feature Matrix

Feature JDK 1.4.2
local/remote
JDK 5
local/remote
JDK 6
local
JDK 6
remote
Overview
System Properties (in Overview)      
Monitor
Threads  
Profiler      
Thread Dump      
Heap Dump      
Enable Heap Dump on OOME      
MBean Browser (plugin)  
Wrapper for JConsole plugins (plugin)  

 本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!