diff --git a/docs/html/tools/debugging/debugging-tracing.jd b/docs/html/tools/debugging/debugging-tracing.jd index f0d0c0b52d6e1..7d750cf9cd04b 100644 --- a/docs/html/tools/debugging/debugging-tracing.jd +++ b/docs/html/tools/debugging/debugging-tracing.jd @@ -18,15 +18,6 @@ parent.link=index.html -
Figure 2. The Traceview Profile Panel
-Tracing creates two distinct pieces of output: a data file, which holds the trace - data, and a key file, which provides a mapping from binary identifiers to thread and - method names. The files are concatenated when tracing completes, into a single .trace - file.
- -Note: The previous version of Traceview did not concatenate
- these files for you. If you have old key and data files that you'd still like to trace, you can
- concatenate them yourself with cat mytrace.key mytrace.data >
- mytrace.trace.
The data file is binary, structured as follows (all values are stored in little-endian - order):
-
-* File format:
-* header
-* record 0
-* record 1
-* ...
-*
-* Header format:
-* u4 magic 0x574f4c53 ('SLOW')
-* u2 version
-* u2 offset to data
-* u8 start date/time in usec
-*
-* Record format:
-* u1 thread ID
-* u4 method ID | method action
-* u4 time delta since start, in usec
-
-
- The application is expected to parse all of the header fields, then seek to "offset to data" - from the start of the file. From there it just reads 9-byte records until EOF is reached.
- -u8 start date/time in usec is the output from gettimeofday(). It's mainly there so
- that you can tell if the output was generated yesterday or three months ago.
method action sits in the two least-significant bits of the method word. The - currently defined meanings are:
- -An unsigned 32-bit integer can hold about 70 minutes of time in microseconds.
- -The key file is a plain text file divided into three sections. Each section starts with a - keyword that begins with '*'. If you see a '*' at the start of a line, you have found the start - of a new section.
- -An example file might look like this:
--*version -1 -clock=global -*threads -1 main -6 JDWP Handler -5 Async GC -4 Reference Handler -3 Finalizer -2 Signal Handler -*methods -0x080f23f8 java/io/PrintStream write ([BII)V -0x080f25d4 java/io/PrintStream print (Ljava/lang/String;)V -0x080f27f4 java/io/PrintStream println (Ljava/lang/String;)V -0x080da620 java/lang/RuntimeException <init> ()V -[...] -0x080f630c android/os/Debug startMethodTracing ()V -0x080f6350 android/os/Debug startMethodTracing (Ljava/lang/String;Ljava/lang/String;I)V -*end --
The following list describes the major sections of a key file:
-clock=global, indicates that we use a common clock across all threads. A future
- version may use per-thread CPU time counters that are independent for every thread.Neither the threads nor methods sections are sorted.
-To use Traceview, you need to generate log files containing the trace information you want to @@ -269,9 +152,6 @@ clock=global
When using the Android emulator, you must specify an SD card when you create your AVD because the trace files are written to the SD card. Your application must have permission to write to the SD card as well. -
The format of the trace files is previously described in this - document.
-After your application has run and the system has created your trace files
@@ -297,7 +177,7 @@ traceview /tmp/calc
You can use the Proguard mapping.txt file to figure out the original unobfuscated names. For more information
on this file, see the Proguard documentation.
dmtracedump is a tool that gives you an alternate way of generating
graphical call-stack diagrams from trace log files. The tool uses the Graphviz Dot utility to
@@ -399,4 +279,4 @@ dmtracedump [-ho] [-s sortable] [-d trace-base-name] [-g outfile] <trace-base
-
\ No newline at end of file
+