Java -agentlib:hprof=heap=sites classname Get heap usage information based on the allocation sites: Java -agentlib:hprof=cpu=samples,interval=20,depth=3 classname Get sample cpu information every 20 millisec, with a stack depth of 3: Option Name and Value Description Defaultįile= write data to file java.hprof HPROF: Heap and CPU Profiling Agent (JVMTI Demonstration Code) This code is located in the $JAVA_HOME/demo/jvmti/hprof directory. In addition to the HPROF library, the JDK release includes the source for HPROF as JVM TI demonstration code. In terms of diagnosing problems, HPROF is useful when analyzing performance, lock contention, memory leaks, and other issues. In addition, it can report complete heap dumps and states of all the monitors and threads in the Java virtual machine. The HPROF tool is capable of presenting CPU usage, heap allocation statistics, and monitor contention profiles. This information can be further processed by a profiler front-end tool. The tool writes profiling information either to a file or to a socket in ASCII or binary format. It is a dynamically linked library that interfaces with the Java VM using the Java Virtual Machine Tools Interface (JVM TI). The Heap Profiler (HPROF) tool is a simple profiler agent shipped with the JDK release. The chapter contains the following sections: Finally, the chapter explains how you can develop new tools using the APIs provided with the Java SE 6 platform. In addition, the chapter lists operating-system-specific tools that may be used in conjunction with these troubleshooting tools. This chapter describes in detail the troubleshooting tools that are available in Java SE 6. Summary of Tools in This Release Chapter2 Detailed Tool Descriptions Environment Variables and System Propertiesĭ. Integrating Signal and Exception HandlingĪ. Troubleshooting Hanging or Looping ProcessesĦ. 2.1.1 Heap Allocation Profiles ( heap=sites)Ģ.1.3 CPU Usage Sampling Profiles ( cpu=samples)Ģ.1.4 CPU Usage Times Profile ( cpu=times)Ģ.4.2 Attaching to a Core File on the Same MachineĢ.4.3 Attaching to a Core File or a Hung Process from a Different MachineĢ.5.1.7 Instance Counts for All Classes QueryĢ.7.4 Getting Information on the Permanent GenerationĢ.11.2 Printing Stack Trace From Core DumpĢ.17.4 Java Virtual Machine Tools InterfaceĢ.17.5 Java Platform Debugger Architectureĥ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |