This is the mail archive of the
mailing list for the glibc project.
[ANNOUNCE] PTT : a trace tool for the NPTL
- From: Nadege Griesser <nadege dot griesser at bull dot net>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 27 Jun 2005 13:13:40 +0200
- Subject: [ANNOUNCE] PTT : a trace tool for the NPTL
- References: <42B978D6.firstname.lastname@example.org> <42B97DE7.email@example.com>
PTT (POSIX Thread Trace Toolkit) is a library-level trace tool for the
NPTL, published under LGPL. It aims to help analyzing the behavior of
multi-threaded applications in order to solve correction or performance
problems. The tool keeps track of all NPTL related events such as thread
creation or lock acquisition, with little impact on the application
(overhead is between 4 and 17 % for a standard application with full
No change is required in the kernel or in the user application to use
the tool. The native NPTL is turned into a traced library thanks to
patches. One patch inserts trace points in the source code and the other
adds the function in charge of registrering trace points.
The multi-threaded application is launched with the "ptt-trace" command
that starts an external daemon. This daemon is in charge of storing the
traces in a binary file. The daemon and the NPTL communicate through a
buffer allocated in shared memory (size is approximately 40 MB for
common machines). The buffer is managed with synchronization variables
that are modified by atomic operations.
Several log levels are available. There are two levels per NPTL object :
one for tracing function calls and one for tracing all then events
related to the object. Levels can be combined. Switching dynamically
from a light trace to a richer of full trace is possible with the
"ptt-level" command. Using a low level enables to reduce the impact of
the tool on the application.
The trace can be stored in files having a given size. So it is possible
to monitor continuously an application and to keep only the last traces.
The binary file can be translated into different formats : a machine
readable textual format ("ptt-view" command), a human readable textual
format ("ptt-view -t" command) and a trace file for the visualization
tool Pajé ("ptt-paje" command), that displays traces produced during the
execution of multithreaded programs with a space-time diagram. Pajé is
an interactive tool that makes it possible to interrogate each entity
represented on the screen for more information.
Several options are provided to analyze the trace.
- It can be filtered on various criteria (time, number of events, name
or kind of objet, name of event, pid, ...).
- It can be split in files according to pid or tid.
The current version runs on IA32, IA64 and PowerPC architectures. Redhat
and Debian packages are available for the IA32 architecture.
Pajé software can be downloaded from objectweb at
http://forge.objectweb.org/projects/paje/ or is available as a debian
The tool and its documentation can be found at
Comments and suggestions are welcome.