-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracepoints.tex
19 lines (17 loc) · 942 Bytes
/
tracepoints.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
\chapter{Tracepoints}
\section{What is a Tracepoint}
A tracepoint provides a hook to call a function (probe) everytime a
tracepoint is encountered. This probes can be supplied by e.g. {\em perf}
counting or recording variables associated to a specific tracepoint or
can be added programmatically at run time.
{\tt Tracepoints} can be {\tt on} (probe attached) or {\tt off} (probe not
attached). When {\tt on} beware that probes are run everytime a
tracepoint is encountered and executed in the context of the
caller. If the probe contains heavy computation the execution of the
traced binary will be slowed down.
When {\tt off} there is a tiny time penalty (check a condition for a branch)
\starttyping
if (tracepoint_on) { tracepoint_probe(); }
\stoptyping
and a minor space penalty for a auxiliary data structure. For {\tt Tracepoints} to work properly with {\em perf} one needs to install the
debug symbols for the to examined binary.