Presentation is loading. Please wait.

Presentation is loading. Please wait.

Profile, HAT, Wireless Toolkit’s Profile Sookmyung Women’s Univ. PSLAB Choi yoonjeong.

Similar presentations


Presentation on theme: "Profile, HAT, Wireless Toolkit’s Profile Sookmyung Women’s Univ. PSLAB Choi yoonjeong."— Presentation transcript:

1 Profile, HAT, Wireless Toolkit’s Profile Sookmyung Women’s Univ. PSLAB Choi yoonjeong

2 Java Profile Generate Need to generate a profile report.  The simplest report to generate is a text profile.  To generate a text profile run the application with the -Xhprof parameter.  In the final release of the Java 2 platform software, this option was renamed -Xrunhprof.  To see a list of the currently available options run the command

3

4 Java Profile This file contains the following types of records: THREAD START THREAD END mark the lifetime of Java threads TRACE  represents a Java stack trace. Each trace consists of a series of stack frames. Other records refer to TRACEs to identify  where object allocations have taken place,  the frames in which GC roots were found,  frequently executed methods.

5 Java Profile What is a Java stack trace?  A Java stack trace is a user-friendly snapshot of the threads and monitors in a Java1 Virtual Machine (JVM).1 HEAP DUMP  is a complete snapshot of all live objects in the Java heap.  Following distinctions are made: ROOT root set as determined by GC CLS classes OBJ instances ARR arrays

6 Java Profile SITES  is a sorted list of allocation sites. This identifies the most heavily allocated object types, and the TRACE at which those allocations occurred. CPU SAMPLES  is a statistical profile of program execution. The VM periodically samples all running threads, and assigns a quantum to active TRACEs in those threads. Entries in this record are TRACEs ranked by the percentage of total quanta they consumed; top- ranked TRACEs are typically hot spots in the program.

7 Java Profile CPU TIME  is a profile of program execution obtained by measuring the time spent in individual methods (excluding the time spent in callees), as well as by counting the number times each method is called.  Entries in this record are TRACEs ranked by the percentage of total CPU time. The "count" field indicates the number of times each TRACE is invoked.

8 Java Profile MONITOR TIME  is a profile of monitor contention obtained by measuring the time spent by a thread waiting to enter a monitor.  Entries in this record are TRACEs ranked by the percentage of total monitor contention time and a brief description of the monitor. The "count" field indicates the number of times the monitor was contended at that TRACE.

9 Java Profile MONITOR DUMP  is a complete snapshot of all the monitors and threads in the System.

10 The Heap Analysis Tool The Heap Analysis tool can analyze the same data for you, but requires a binary report file as input. You can generate a binary report file as follows:  java -Xrunhprof:file=TableExample3.hprof,format=b TableExample3 To generate the binary report, close the TableExample3 window. The binary report file TableExample3.hprof is created when the program exits. The Heap Analysis tool starts an HTTP Server that analyzes the binary profile file and displays the results in HTML that you can view with a browser.

11 The Heap Analysis Tool HAT shows three items  The default report view contains a list of all the classes.  At the bottom of this initial page are the following two key report options: Show all members of the rootset Show instance counts for all classes

12

13

14

15

16 Reference http://www.physics.orst.edu/~bulatov/HyperProf/ This is home of my hyperbolic browser of Java profile. It allows to represent results of Java profiling in more readable way, as well as it offers cool interactive hyperbolic representation of packages, classes, methods and calls of your Java program.


Download ppt "Profile, HAT, Wireless Toolkit’s Profile Sookmyung Women’s Univ. PSLAB Choi yoonjeong."

Similar presentations


Ads by Google