NPTL Trace Tool

GENERATING TRACES

Home

User Manual

Goals
Trace events
Inside
Example

Internals

Forum

Download

Sourceforge project info

Licence

 
  

Creating a trace file is done in two steps:

  1. trace coding: data are collected.
  2. trace decoding: trace is visualized.

Coding: Trace collect mechanism

When the user program is running, traces data are collected in a buffer. When this buffer is full, it is copied in a binary file. The mechanism is stopped when the user program finishes. To achieve this, the user launches an external daemon ptt_trace, which regularly flushes the buffer to the disk.

The trace level can be dynamically changed thanks to ptt_level.

Decoding: Visualizing traces

To visualize traces, the binary file has to be read and decoded. This step is achieved by ptt_view (to decode in a text file) or the ptt_paje (to create an input file for Pajé). The output format and filter options can be chosen by setting ptt's options.

ptt_contention provides three kinds of information to measure contention in an application:

  • global contention time: waiting time for all threads of the application.
  • contention time per thread: waiting time for each thread.
  • contention time per NPTL objects: waiting time for each mutex, barrier, cond_var and semaphores.

ptt_stat gives information on the binary data.

ptt_seq is a little tool which gives the timestamp of the first event in the binary file. This can be usesul when trace splitting is enabled in ptt_trace, and so, when several binary files are created.

 
 

Page hosted by :
SourceForge.net Logo