IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > Tracing Java applications and the JVM > Where does the data go?
Writing trace data to memory buffers
Using memory buffers for holding trace data is an efficient method of running trace. The reason is that no file I/O is performed until a problem is detected or until the buffer content is intentionally stored in a file.
Buffers are allocated on a per-thread principle. This principle removes contention between threads, and prevents trace data for an individual thread from being mixed in with trace data from other threads. For example, if one particular thread is not being dispatched, its trace information is still available when the buffers are dumped or snapped. Use the -Xtrace:buffers=<size> option to control the size of the buffer allocated to each thread. Buffers allocated to a thread are discarded when that thread terminates.
Note: On some systems, power management affects the timers that trace uses, and might result in misleading information. For reliable timing information, disable power management.
To examine the trace data captured in these memory buffers, you must snap or dump the data, then format the buffers.
- Snapping buffers
- Under default conditions, a running JVM collects a small amount of trace data in special wraparound buffers. This data is sent to a snap trace file under certain conditions:
- An uncaught OutOfMemoryError occurs.
- An operating system signal or exception occurs.
- The com.ibm.jvm.Trace.snap() Java™ API is called.
- The JVMRI TraceSnap function is called.
The resulting snap trace file is placed into the current working directory, with a name in the format Snapnnnn.yyyymmdd.hhmmssth.process.trc, where nnnn is a sequence number reset to 0001 at JVM startup, yyyymmdd is the current date, hhmmssth is the current time, and process is the process identifier. This file is in a binary format, and requires the use of the supplied trace formatter so that you can read it.
You can use the -Xdump:snap option to vary the events that cause a snap trace file to be produced.
- Extracting buffers from system dump
- You can extract the buffers from a system dump core file by using the Dump Viewer.
Parent: Where does the data go?
Error 404 - Not Found Error 404 - Not Found
The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.