NAME

ptt_contention - PTT contention measurement tool


SYNOPSIS

ptt_contention [options] input_file


DESCRIPTION

Its primary function is to give some information about traced applications contention. This information is extracted from the binary data collected by ptt_trace(1).

It provides three kinds of information:

elapsed time: difference between the last and first trace point timestamps in the binary file
contention time per thread.
contention time per NPTL object (mutex, barrier, cond-var, semaphore).

Percentages displayed show the impact of each thread or NPTL object in the contention. For threads, percentage of waiting time in relation to the elapsed time is also given.


OPTIONS

-a alias_file
alias_file contains couples (address, name). In ptt_contention(1) output, objects that have an address existing in alias_file will be replaced by the corresponding name.

See ptt_view(1) for an example of how to create an alias file.

-c
Display contention time per couple [thread - NPTL object]. For each thread, waiting time on every object it uses is given.

-z start:end
event filter. This filter only displays end - start events skipping start events. The syntax -z :end or -z start: is also supported and implies start=0 or end=infinity.

Warning: the filter is applied to a group of events for performance issue, so the count is not always exact. You can have up to 3 more events than requested.

-Z start:end
time filter. This filter only displays events that occurred after start microseconds and before end microseconds. The syntax -Z :end or -Z start: is also supported and imply start=0 or end=infinity.


NOTE

The global contention is the sum of each thread contention. The sum of each NPTL object contention can be lower than the global contention. Indeed, some contention doesn't come from NPTL objects. The more obvious example is with the use of pthread_join. The main thread generally launches child threads and wait for them to complete their job with pthread_join. The waiting time is not due to NPTL objects here. There is also some contention due to NPTL internal mechanisms.


LIMITATION

Given information is accurate only if the binary input file was generated by ptt_trace(1) with the maximum level of trace (LEVEL_ALL) selected.

Note: if you are interested in contention due to only one type of object, you can trace with the maximum level corresponding to this object (LEVEL_MUTEX_ALL for mutexes, ...).


SEE ALSO

ptt_trace(1), ptt_view(1), ptt_stat(1)


AUTHOR

Guillaume DURANCEAU