Java VisualVM official version is a Java troubleshooting tool with multiple JDK command lines. Java
The latest version of VisualVM is powerful and can help users quickly and effectively perform performance analysis, optimization and adjustment of JAVA applications. Java
VisualVM software also supports functions such as analyzing massive data, tracking memory leaks, monitoring garbage collectors, and CPU analysis, fully meeting the needs of Java developers.
Introduction to Java VisualVM functions
1. Key methods of characteristic analysis
1. Supervision: Supervision is a general way to check personal behavior when the application is executed
. Several views each display the CPU usage, memory usage, thread status and other useful information in real time, so that users can immediately find the cause of the problem.
2. Storage: The property analysis tool obtains the current situation data information from the memory and saves it to a file for static data property analysis. The Java program starts the migration operation by adding appropriate standard parameters when running the Java program. Contains the following three categories:
3. System software migration: The migration of local system software converted into JVM is also called key migration. Generally speaking, the amount of stored information in a system is very large and requires platform-related tools for analysis, such as windbg on Windows and gdb on Linux.
4. Java migration: The factory reset data generated internally by the JVM includes process information, type loading information and deposition statistics. It is also generally used to detect deadlocks.
5. Deposition storage: JVM stores the deposition content of all targets in documents.
2. Snapshot update
After the APP is run, the performance analysis tool begins to collect various operating data, some of which are directly displayed on the monitoring chart, and most of the data is stored internally until the user requests to obtain a snapshot update. Displays statistics based on these stored data. Snapshot updates include APP execution information within a period of time, and generally include CPU snapshot updates and running memory snapshot updates.
CPU Snapshot: Mainly includes the activation relationship and running time of application functions. This information can generally be viewed in the CPU Snapshot view.
Memory snapshot update: mainly includes the allocation and usage of memory, all types of transportation, existing target information and the introduction relationship between targets, etc. This information can generally be viewed in the memory snapshot update view.
3. Characteristics Analysis
Performance analysis helps developers improve the required parts of the program by collecting execution data when the program is executed, improving the program's operating speed and memory utilization efficiency. There are three main aspects:
CPU performance analysis: The main purpose of CPU performance analysis is to count the activation status and execution time of functions, or more simply, to statistically analyze the CPU usage of application software. Generally, there are two methods: CPU monitoring and CPU snapshot update to display the CPU characteristic analysis results.
Storage performance analysis: The main purpose of storage performance analysis is to detect possible storage leak problems through statistical analysis of storage usage, and to determine the direction of improving storage usage. Generally, there are two methods: memory monitoring and memory snapshot update to display the memory characteristic analysis results.
Process characterization analysis: Process characterization analysis is mainly used to identify memory issues in thread synchronization applications. It generally includes thread state changes, deadlock situations, and the distribution of situations within a process during its lifetime.
Java VisualVM software features
1. Memory analysis
VisualVM helps us analyze memory usage by detecting class and object information loaded in the JVM. We can use VisualVM’s monitoring tags and Profiler
Tags perform memory analysis on applications.
2. CPU analysis
VisualVM can monitor the CPU usage of the application over a period of time and display the CPU
Relevant data such as usage rate, method execution efficiency and frequency help us discover the performance bottlenecks of the application. We can monitor the application through VisualVM's monitoring tag and Profiler tag.
CPU performance analysis.
3. Thread analysis
Java
The language can implement multi-threaded applications very well. When we debug a multi-threaded application or do performance tuning in the later stages of development, we often need to understand the running status of all threads in the current program, whether there are deadlocks, hot locks, etc., so as to analyze possible problems in the system. question.
4. Snapshot analysis
We can use VisualVM
The snapshot function generates any performance analysis snapshot and saves it locally to assist us in performance analysis. Snapshots provide a very convenient way to capture application performance analysis data because once generated, the snapshot can be opened and viewed offline at any time, and can also be circulated to each other.
VisualVM provides two types of snapshots:
Profiler snapshot: When there is a performance analysis session (memory or CPU) in progress, we can generate a Profiler through the "Snapshot" button on the performance analysis results toolbar
Snapshots capture performance analysis data at that time.
Application snapshot: We can right-click Applications on the left
In the application node in the window, select "Application Snapshot" to generate an application snapshot. Application snapshots collect heap dumps, thread dumps and Profiler snapshots at a certain time, and also capture JVM
some basic information.
5. Dump function
Generation and analysis of thread dumps: VisualVM
It can generate thread dumps for running local applications and print out stack traces of active threads, helping us to effectively understand thread running conditions and diagnose deadlocks, application paralysis and other problems.
Generation and analysis of heap dumps: VisualVM can generate heap dumps and count JVM activity at a specific moment
The object information in it helps us analyze the reference relationships of objects, whether there are memory leaks, etc.
Java VisualVM installation tutorial
1. Install VisualVM
1. Unzip the VisualVM program installation compressed package to the local system software.
2. Navigate to the bin file directory of the VisualVM installation file, and then run jvisualvm.exe.
2. Install software on VisualVM
The VisualVM plug-in center provides many software for installation to add functions to VisualVM. Can be installed through the VisualVM application, or from VisualVM
Manually download the plug-in from the plug-in center and then install it offline. In addition, users can also install third-party software to add functions to VisualVM by downloading the plug-in distribution file (.nbm file).
1. VisualVM plug-in center installation software installation process:
Select "Special Tools" > "Software" from the main menu.
In the "Available software" icon, select the "Install" check box of the software. Click "Install".
Proceed gradually with the software program installation.
2. Select "Special Tools" > "Software" from the main menu.
In the "Downloaded" icon, click the "Add Software" button, select the downloaded software distribution file (.nbm) and open it.
Select the opened software distribution file and click the "Install" button to start installing the software program.
Java VisualVM update log
Optimize user feedback issues and improve detailed experience
Huajun editor recommends:
Java VisualVM is professional, simple to operate, and powerful. It is one of the leaders in the software industry. You are welcome to download it. This site also provides express software, .NET, cloud machine manager, etc. for you to download.