<s>
perf	B-Application
(	O
sometimes	O
called	O
perf_events	O
or	O
perf	B-Application
tools	O
,	O
originally	O
Performance	O
Counters	O
for	O
Linux	B-Operating_System
,	O
PCL	O
)	O
is	O
a	O
performance	O
analyzing	O
tool	O
in	O
Linux	B-Operating_System
,	O
available	O
from	O
Linux	B-Operating_System
kernel	I-Operating_System
version	O
2.6.31	O
in	O
2009	O
.	O
</s>
<s>
Userspace	B-Operating_System
controlling	O
utility	O
,	O
named	O
perf	B-Application
,	O
is	O
accessed	O
from	O
the	O
command	B-Application
line	I-Application
and	O
provides	O
a	O
number	O
of	O
subcommands	O
;	O
it	O
is	O
capable	O
of	O
statistical	O
profiling	O
of	O
the	O
entire	O
system	O
(	O
both	O
kernel	B-Operating_System
and	O
userland	O
code	O
)	O
.	O
</s>
<s>
It	O
supports	O
hardware	B-General_Concept
performance	I-General_Concept
counters	I-General_Concept
,	O
tracepoints	B-Application
,	O
software	O
performance	O
counters	O
(	O
e.g.	O
</s>
<s>
In	O
2012	O
,	O
two	O
IBM	O
engineers	O
recognized	O
perf	B-Application
(	O
along	O
with	O
OProfile	B-Application
)	O
as	O
one	O
of	O
the	O
two	O
most	O
commonly	O
used	O
performance	B-General_Concept
counter	I-General_Concept
profiling	O
tools	O
on	O
Linux	B-Operating_System
.	O
</s>
<s>
The	O
interface	O
between	O
the	O
perf	B-Application
utility	O
and	O
the	O
kernel	B-Operating_System
consists	O
of	O
only	O
one	O
syscall	B-Operating_System
and	O
is	O
done	O
via	O
a	O
file	B-Application
descriptor	I-Application
and	O
a	O
mapped	O
memory	O
region	O
.	O
</s>
<s>
Unlike	O
LTTng	B-Application
or	O
older	O
versions	O
of	O
oprofile	B-Application
,	O
no	O
service	O
daemons	B-Operating_System
are	O
needed	O
,	O
as	O
most	O
functionality	O
is	O
integrated	O
into	O
the	O
kernel	B-Operating_System
.	O
</s>
<s>
The	O
perf	B-Application
utility	O
dumps	O
raw	O
data	O
from	O
the	O
mapped	O
buffer	O
to	O
disk	O
when	O
the	O
buffer	O
becomes	O
filled	O
up	O
.	O
</s>
<s>
According	O
to	O
R	O
.	O
Vitillo	O
(	O
LBNL	O
)	O
,	O
profiling	O
performed	O
by	O
perf	B-Application
involves	O
a	O
very	O
low	O
overhead	O
.	O
</s>
<s>
,	O
architectures	O
that	O
provide	O
support	O
for	O
hardware	B-General_Concept
counters	I-General_Concept
include	O
x86	B-Operating_System
,	O
PowerPC64	O
,	O
UltraSPARC	B-General_Concept
(	O
III	B-General_Concept
and	O
IV	B-General_Concept
)	O
,	O
ARM	B-Architecture
(	O
v5	O
,	O
v6	O
,	O
v7	O
,	O
Cortex-A8	B-Application
and	O
-A9	B-Application
)	O
,	O
Alpha	B-Device
EV56	O
and	O
SuperH	O
.	O
</s>
<s>
Usage	O
of	O
Last	O
Branch	O
Records	O
,	O
a	O
branch	O
tracing	O
implementation	O
available	O
in	O
Intel	O
CPUs	O
since	O
Pentium	B-General_Concept
4	I-General_Concept
,	O
is	O
available	O
as	O
a	O
patch	O
.	O
</s>
<s>
Since	O
version	O
3.14	O
of	O
the	O
Linux	B-Operating_System
kernel	I-Operating_System
mainline	O
,	O
released	O
on	O
March	O
31	O
,	O
2014	O
,	O
perf	B-Application
also	O
supports	O
running	O
average	O
power	O
limit	O
(	O
RAPL	O
)	O
for	O
power	O
consumption	O
measurements	O
,	O
which	O
is	O
available	O
as	O
a	O
feature	O
of	O
certain	O
Intel	O
CPUs	O
.	O
</s>
<s>
Perf	B-Application
is	O
natively	O
supported	O
in	O
many	O
popular	O
Linux	B-Operating_System
distributions	O
,	O
including	O
Red	O
Hat	O
Enterprise	O
Linux	B-Operating_System
(	O
since	O
its	O
version	O
6	O
released	O
in	O
2010	O
)	O
and	O
Debian	O
in	O
the	O
linux-tools-common	O
package	O
(	O
since	O
Debian	O
6.0	O
(	O
Squeeze	O
)	O
released	O
in	O
2011	O
)	O
.	O
</s>
<s>
perf	B-Application
is	O
used	O
with	O
several	O
subcommands	O
:	O
</s>
<s>
report	O
:	O
analyze	O
file	O
generated	O
by	O
perf	B-Application
record	O
;	O
can	O
generate	O
flat	O
,	O
or	O
graph	O
profile	O
.	O
</s>
<s>
The	O
documentation	O
of	O
perf	B-Application
is	O
not	O
very	O
detailed	O
(	O
as	O
of	O
2014	O
)	O
;	O
for	O
example	O
,	O
it	O
does	O
not	O
document	O
most	O
events	O
or	O
explain	O
their	O
aliases	O
(	O
often	O
external	O
tools	O
are	O
used	O
to	O
get	O
names	O
and	O
codes	O
of	O
events	O
)	O
.	O
</s>
<s>
Perf	B-Application
tools	O
also	O
cannot	O
profile	O
based	O
on	O
true	O
wall-clock	O
time	O
.	O
</s>
<s>
The	O
perf	B-Application
subsystem	O
of	O
Linux	B-Operating_System
kernels	I-Operating_System
from	O
2.6.37	O
up	O
to	O
3.8.8	O
and	O
RHEL6	O
kernel	B-Operating_System
2.6.32	O
contained	O
a	O
security	O
vulnerability	O
(	O
)	O
,	O
which	O
was	O
exploited	O
to	O
gain	O
root	O
privileges	O
by	O
a	O
local	O
user	O
.	O
</s>
