NAME

ptt_trace - PTT daemon


SYNOPSIS

ptt_trace [options] cmd [cmd_param...]


DESCRIPTION

Its primary function is to collect the data generated by the instrumented NPTL and to commit it in a file. It links cmd to the instrumented libpthread building in the installation process.


OPTIONS

-s size
set the buffer size

-h
display the help

-v
be verbose

-m max
split in files of max bytes. If 0, don't split file (default).

Warning: max is not a strict limit, but only an indication for the PTT daemon.

-f max
Keep only max file on the disk. The additional file will be erased.

-n name
Name of the prefix of the trace file. The default is trace_[date]_[pid].

-l level
set the log level

You can select multiple level with comma. For example if you want mutex and cond-var, use `LEVEL_MUTEX_ALL,LEVEL_COND_ALL'.

Following values can be used:

LEVEL_NONE to trace nothing
LEVEL_ALL to trace everything
LEVEL_IO to trace only function calls and returns
LEVEL_THREAD_ALL to trace everything about threads
LEVEL_THREAD_IO to trace only function calls and returns about threads
LEVEL_BARRIER_ALL to trace everything about barriers
LEVEL_BARRIER_IO to trace only function calls and returns about barriers
LEVEL_MUTEX_ALL to trace everything about mutexes
LEVEL_MUTEX_IO to trace only function calls and returns about mutexes
LEVEL_COND_ALL to trace everything about conditional variables
LEVEL_COND_IO to trace only function calls and returns conditional variables
LEVEL_SEM_ALL to trace everything about semaphores
LEVEL_SEM_IO to trace only function calls and returns semaphores
-ori
links cmd to the non-instrumented NPTL building in the installation process. Therefore, the trace mechanism won't be active. This can be useful to compare results with and without the trace mechanism (for example, to measure the impact of the instrumentation in the patched library). Other options will have no effect if you use -ori.

Note: This option is not available if PTT is built with the configure --with-ptt-friendly-glibc option.


BUGS

Stress programs sometimes hang when using PTT.

On some (rare) systems, dynamic linkage to libpthread won't work For such systems, relink your application to the instrumented glibc, using the following gcc flags:

-Wl,-dynamic-linker,/<path-to-glibc>/lib/ld-linux.so.2 -Wl,-rpath,/<path-to-glibc>/lib

Flags to apply for your system are written in the file patch_glibc/flags.txt created when building glibc.


SEE ALSO

ptt_level(1), ptt_view(1), ptt_paje(1)


AUTHOR

Matthieu CASTET, Nadege GRIESSER, Guillaume DURANCEAU