1. jcmd (base) PS C:\Users\zishi> jcmd -h Usage: jcmd <pid | main class> <command …|PerfCounter.print|-f file> or: jcmd -l or: jcmd -h command must be a valid jcmd command for the selected jvm. Use the command “help” to see which commands are available. If the pid is 0, commands will be sent to all Java […]
Tag: jvm
JVM source code analysis: processing details of soft, weak and virtual references
Table of Contents Write in front: Source code analysis: Java level: JVM level: Danger points of use: Summarize: Version Information: jdk version: jdk8u40 Garbage collector: Serial new/old Write in front: Different garbage collectors have different algorithms and different efficiencies. The default is ParallelScavenge new/old in JDK8. The author used Serial new/old when writing the article. […]
7.2Loading timing of jvm class
Class loading timing–based on jdk1.8 1. Under what circumstances will a class be loaded? 1. Encounter the following 4 bytecode instructions 2. Use reflection to make a reflective call to a certain type 3. When initializing a class, if it is found that its parent class has not been initialized, you need to trigger the […]
Remember the jvm tuning process in detail
Cpu usage is too high If the CPU usage is too high, we need to discuss it on a case-by-case basis. Is it because there is a business activity, and suddenly a large amount of traffic comes in, and the CPU usage drops after the activity is over. If this is the case, you don’t […]
Java Virtual Machine (JVM)
JVM Introduction to JVM Overall structure of JVM JVM runtime data area program counter Java virtual machine stack native method stack heap method area Class loading mechanism 1. Loading 2. Verification 3. Preparation 4. Resolution 5. Initialization class loader Bootstrap ClassLoader Extension ClassLoader: Application ClassLoader: Parent delegation mechanism Introduction to JVM JVM (Java Virtual Machine) […]
Troubleshooting and analysis of JVM Native memory leaks (64M problem)
We have an online project that occupied more than 1.5G just after it was started. Use the top command to check that RES occupied more than 1.5G. This is obviously unreasonable, so we did some analysis and found the root cause. The following is the complete analysis process. I hope it will help. You helped. […]
Multi-level cache JVM process cache
1. What is multi-level cache The traditional caching strategy is generally to query Redis after the request reaches Tomcat. If there is no hit, query the database, as shown in the figure: The following problems exist: The request needs to be processed by Tomcat, and the performance of Tomcat becomes the bottleneck of the entire […]
JVM performance optimization – class loader, manually implement hot loading of classes
1. Hierarchy of class loading mechanism Each written class file with the “.java” extension stores the program logic that needs to be executed. These “.java” files are compiled into files with the extension “.class” by the Java compiler. The “.class” files are saved in According to the virtual machine instructions after the Java code is […]
[jvm] Dynamic link of virtual machine stack
Directory 1. Description 2. Code examples 3. Generated bytecode 4. Bytecode description 4.1 Constant pool 4.1 Method call 4.3 Variables 4.4 String 4.5 Parent class Object 4.6 System class 1. Description 1. Method reference pointing to the runtime constant pool 2. Each stack frame contains a reference to the method to which the stack frame […]
[Transfer] Change the world and use JavaAgent to deceive your JVM
This article is reprinted from the article on the WeChat public account Nong Ginseng. Use JavaAgent to deceive your JVM. The following is the text: Friends who are familiar with Spring should be familiar with aop. Aspect-oriented programming allows us to weave the logic we want to execute before and after the target method. The […]