<s>
ftrace	B-Application
(	O
Function	B-Application
Tracer	I-Application
)	O
is	O
a	O
tracing	O
framework	B-Architecture
for	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
.	O
</s>
<s>
Although	O
its	O
original	O
name	O
,	O
Function	B-Application
Tracer	I-Application
,	O
came	O
from	O
ftrace	B-Application
's	O
ability	O
to	O
record	O
information	O
related	O
to	O
various	O
function	O
calls	O
performed	O
while	O
the	O
kernel	B-Operating_System
is	O
running	O
,	O
ftrace	B-Application
's	O
tracing	O
capabilities	O
cover	O
a	O
much	O
broader	O
range	O
of	O
kernel	B-Operating_System
's	O
internal	O
operations	O
.	O
</s>
<s>
With	O
its	O
various	O
tracer	O
plugins	O
,	O
ftrace	B-Application
can	O
be	O
targeted	O
at	O
different	O
static	O
tracepoints	B-Application
,	O
such	O
as	O
scheduling	O
events	O
,	O
interrupts	B-Application
,	O
memory-mapped	B-Architecture
I/O	I-Architecture
,	O
CPU	O
power	O
state	O
transitions	O
,	O
and	O
operations	O
related	O
to	O
file	B-Application
systems	I-Application
and	O
virtualization	B-General_Concept
.	O
</s>
<s>
Also	O
,	O
dynamic	O
tracking	O
of	O
kernel	B-Operating_System
function	O
calls	O
is	O
available	O
,	O
optionally	O
restrictable	O
to	O
a	O
subset	O
of	O
functions	O
by	O
using	O
globs	B-Language
,	O
and	O
with	O
the	O
possibility	O
to	O
generate	O
call	B-Application
graphs	I-Application
and	O
provide	O
stack	B-General_Concept
usage	O
reports	O
.	O
</s>
<s>
At	O
the	O
same	O
time	O
,	O
ftrace	B-Application
can	O
be	O
used	O
to	O
measure	O
various	O
latencies	O
within	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
,	O
such	O
as	O
for	O
how	O
long	O
interrupts	B-Application
or	O
preemption	O
are	O
disabled	O
.	O
</s>
<s>
An	O
ftrace-enabled	O
Linux	B-Operating_System
kernel	I-Operating_System
is	O
built	O
by	O
enabling	O
the	O
kernel	B-Application
configuration	I-Application
option	O
.	O
</s>
<s>
The	O
entire	O
runtime	O
interaction	O
with	O
ftrace	B-Application
is	O
performed	O
through	O
readable	O
and	O
writable	O
virtual	O
files	O
contained	O
in	O
a	O
specifically	O
mounted	O
debugfs	B-Application
file	B-Application
system	I-Application
;	O
as	O
a	O
result	O
,	O
ftrace	B-Application
requires	O
no	O
specialized	O
userspace	B-Operating_System
utilities	O
to	O
operate	O
.	O
</s>
<s>
However	O
,	O
there	O
are	O
additional	O
userspace	B-Operating_System
utilities	O
that	O
provide	O
more	O
advanced	O
features	O
for	O
data	O
recording	O
,	O
analysis	O
and	O
visualization	O
;	O
examples	O
of	O
such	O
utilities	O
are	O
trace-cmd	B-Application
and	O
KernelShark	B-Application
.	O
</s>
<s>
Internally	O
,	O
ftrace	B-Application
relies	O
on	O
the	O
gcc	B-Application
's	O
profiling	O
mechanism	O
to	O
prepend	O
machine	B-Language
instructions	I-Language
to	O
the	O
compiled	B-Language
versions	O
of	O
all	O
source-level	O
kernel	B-Operating_System
functions	O
,	O
which	O
redirect	O
the	O
execution	O
of	O
functions	O
to	O
the	O
ftrace	B-Application
's	O
trampolines	B-General_Concept
and	O
tracer	O
plugins	O
that	O
perform	O
the	O
actual	O
tracing	O
.	O
</s>
<s>
These	O
"	O
entry	B-Language
point	I-Language
"	O
instructions	O
created	O
by	O
gcc	B-Application
are	O
altered	O
by	O
ftrace	B-Application
when	O
the	O
kernel	B-Operating_System
is	O
booted	B-Operating_System
,	O
and	O
varied	O
later	O
at	O
runtime	O
by	O
ftrace	B-Application
between	O
NOPs	B-Language
and	O
actual	O
jumps	B-General_Concept
to	O
the	O
tracing	O
trampolines	B-General_Concept
,	O
depending	O
on	O
the	O
tracing	O
types	O
and	O
options	O
configured	O
at	O
runtime	O
.	O
</s>
<s>
ftrace	B-Application
is	O
developed	O
primarily	O
by	O
Steven	O
Rostedt	O
,	O
and	O
it	O
was	O
merged	O
into	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
in	O
kernel	B-Operating_System
version	O
2.6.27	O
,	O
which	O
was	O
released	O
on	O
October	O
9	O
,	O
2008	O
.	O
</s>
