Questions tagged [perf]

Perf is a profiler tool for Linux 2.6+ based systems.

Perf is a profiling tool for Linux 2.6+ based systems that uses the perf_events kernel interface to provide a command-line interface to underlying hardware, software and kernel performance counters. It abstracts away differences in performance counters implemented across different CPU architectures, allowing consistency across different hardware.

See also the perf wiki.

802 questions
46
votes
5 answers

linux perf: how to interpret and find hotspots

I tried out linux' perf utility today and am having trouble in interpreting its results. I'm used to valgrind's callgrind which is of course a totally different approach to the sampling based method of perf. What I did: perf record -g -p $(pidof…
milianw
  • 4,621
  • 2
  • 33
  • 39
41
votes
4 answers

Install "perf" on Mac

I need the "perf" utility to monitor the program on my Mac. I know linux comes with it, but is it available on Mac? I am working on a OSX 10.9 Mavericks and tried "port search" for perf or linux-tools, but I couldn't get any results.
wlhee
  • 1,798
  • 3
  • 16
  • 18
38
votes
3 answers

Linux perf events: cpu-clock and task-clock - what is the difference

Linux perf tools (some time ago named perf_events) has several builtin universal software events. Two most basic of them are: task-clock and cpu_clock (internally called PERF_COUNT_SW_CPU_CLOCK and PERF_COUNT_SW_TASK_CLOCK). But what is wrong with…
osgx
  • 80,853
  • 42
  • 303
  • 470
37
votes
3 answers

Why doesn't perf report cache misses?

According to perf tutorials, perf stat is supposed to report cache misses using hardware counters. However, on my system (up-to-date Arch Linux), it doesn't: [joel@panda goog]$ perf stat ./hash Performance counter stats for './hash': …
static_rtti
  • 46,349
  • 44
  • 123
  • 180
32
votes
3 answers

Can I get the python call stack with the linux perf?

For example, def test(): print "test" I used perf record -g -p $pid, but the result was just all about PyEval_EvalFrameEx. How can I get the real name "test" or if can not by using perf?
wuwl
  • 481
  • 1
  • 5
  • 10
32
votes
3 answers

What are perf cache events meaning?

I am trying to figure out why a modified C program is running faster than its non modified counter part (I am adding very few lines of code to perform some additional work). In this context, I suspect "cache effects" to be the main explanation…
Manuel Selva
  • 16,987
  • 21
  • 76
  • 127
28
votes
3 answers

why does perf stat show "stalled-cycles-backend" as ?

Running perf stat ls shows this: Performance counter stats for 'ls': 1.388670 task-clock # 0.067 CPUs utilized 2 context-switches # 0.001 M/sec 0…
oliver
  • 5,451
  • 8
  • 41
  • 48
28
votes
3 answers

Call stack in the perf profiler

I'm running "perf" in the following way: perf record -a --call-graph -p some_pid perf report --call-graph --stdio Then, I see this: 1.60% my_binary my_binary [.] my_func | --- my_func | …
erezz
  • 281
  • 1
  • 3
  • 3
27
votes
8 answers

How can I get perf to find symbols in my program

When using perf report, I don't see any symbols for my program, instead I get output like this: $ perf record /path/to/racket ints.rkt 10000 $ perf report --stdio # Overhead Command Shared Object Symbol # ........ ........ …
Sam Tobin-Hochstadt
  • 4,668
  • 1
  • 19
  • 43
26
votes
2 answers

perf: Couldn't record kernel reference relocation symbol

I have compiled perf for my kernel (3.11.10). During the compilation, some libraries were missing, so I have installed those. But now when I run perf, I get following message: Couldn't record kernel reference relocation symbol Symbol resolution may…
Martin Vegter
  • 489
  • 7
  • 24
  • 51
21
votes
1 answer

Understanding Linux perf report output

Though I can intuitively get most of the results, I'm having hard time fully understanding the output of the perf report command especially for what concerns the call graph, so I wrote a stupid test to solve this issue of mine once for all. The…
cYrus
  • 2,713
  • 5
  • 24
  • 44
20
votes
1 answer

How to use Intel Westmere 1GB pages on Linux?

Edit: I updated my question with the details of my benchmark For benchmarking purposes, I am trying to setup 1GB pages in a Linux 3.13 system running on top of two Intel Xeon 56xx ("Westmere") processors. For that I modified my boot parameters to…
Manuel Selva
  • 16,987
  • 21
  • 76
  • 127
20
votes
1 answer

Open perf.data in Kcachegrind

I read somewhere that it is possible to convert perf.data (output from linux perf record profiling tool) to a format that kcachegrind can parse/plot, however I didn't find an application capable of doing this convertion and neither does kcachegrind…
JohnTortugo
  • 5,435
  • 7
  • 33
  • 63
18
votes
1 answer

What restriction is perf_event_paranoid == 1 actually putting on x86 perf?

Newer Linux kernels have a sysfs tunable /proc/sys/kernel/perf_event_paranoid which allows the user to adjust the available functionality of perf_events for non-root users, with higher numbers being more secure (offering correspondingly less…
BeeOnRope
  • 51,419
  • 13
  • 149
  • 309
18
votes
1 answer

Sorting by self column in perf report

How do I sort by self column in perf report output? $ perf --version perf version 4.0.8-300.fc22.x86_64 $ uname -a Linux marko-desktop 4.0.8-300.fc22.x86_64 #1 SMP Fri Jul 10 21:04:56 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux Data was callected…
Marko Kevac
  • 2,572
  • 24
  • 46
1
2 3
53 54