Questions tagged [perf]

perf is Linux profiling tool for both Linux kernel and underlying hardware (hardware counters).

0
votes
1answer
26 views

What does `perf stat` option `--cpu` is actually showing?

I am trying to understand the --cpu option of perf-stat. In the man pages it says: Count only on the list of CPUs provided. Multiple CPUs can be provided as a comma-separated list with no space: ...
5
votes
1answer
248 views

Security implications of changing “perf_event_paranoid”

I'd like to use the perf utility to gather measurements for my program. It runs on a shared cluster machine with Debian 9 where by default the /proc/sys/kernel/perf_event_paranoid is set to 3, ...
2
votes
1answer
82 views

How long time does a context switch take in Linux (ubuntu 18.04)

I'm interessted in getting the number of context switches a two processes in a KVM vm takes on a singel CPU over some time. Earlier i have used perf, is this best practice? And how much time is used ...
1
vote
0answers
23 views

Determine average and maximum execution time of a task by using ftrace/perf

I've gathered some traces containing scheduling events ('sched:*') by using ftrace and perf record. By analyzing the results many of my questions could already be answered. However, I was wondering ...
1
vote
0answers
38 views

Does `perf trace -p <PID>` trace all threads?

strace -f -p <PID> traces system calls in all threads of a multi-threaded process. (This also follows forks, there is an option -b execve that tries to address that). Does perf trace -p <...
0
votes
1answer
22 views

Is there a command to show tracepoints “live”, which includes the PID?

I have tried looking at the documentation for perf script, perf trace, and trace-cmd, including the list of commands in "SEE ALSO". I can trace e.g. sched:sched_process_exec "live" using perf trace -...
3
votes
0answers
161 views

Perf Tool monitoring by PID

I'm using linux perf tool to monitor the performance of some processes. The documentation tells that you can flag it to collect profiles on per-thread, per-process and per-cpu basis. I get that the ...
1
vote
1answer
258 views

Why 'perf' needs to match the exact running Linux kernel version?

If you try to run a random perf binary that does not match your currently running Linux kernel, it says: $ perf WARNING: perf not found for kernel 4.13.0-45 Of course, if I get the perf for this ...
0
votes
0answers
208 views

unresolved symbols sudo perf record/report

I am trying to use perf to profile a program that I have written on a work server. I have sudo privilege but should limit what I do with it. $ rm perf.data $ perf record ./catch-hedging ...
2
votes
1answer
445 views

Why does `perf stat` show 0 context switches?

I ran a shell pipeline under perf stat, using taskset 0x1 to pin the whole pipeline to a single CPU. I know taskset 0x1 had an effect, because it more than doubled the throughput of the pipeline. ...
1
vote
1answer
593 views

Why does `perf stat -a` show clock (Ghz) lower than my cpu is rated?

Why does perf stat -a show a clock speed three times lower than my CPU is rated for? I don't think power management is an issue, because I made sure the test ran for a whole second to allow the cpu ...
1
vote
1answer
415 views

Perf Error While Loading Shared Libraries

I was on CentOS 7.3 on x86_64 using perf compiled on the system itself from Kernel 4.13.7 source. It worked without any issue and was able to profile whichever application I wanted to. For some ...
1
vote
0answers
69 views

How could I add support for an event modifier in perf

I need to account power for the kernel space, but unfortunately the k modifier are not supported for the power/energy-cores/. I have an example of what I'm trying to do below. I'm reading the source ...
0
votes
1answer
706 views

How to show the report of Linux perf record -g without call graph data?

I collected a performance profile of an application with perf record -g. By default, perf report displays call chain data: 100.00% 0.00% htop htop [.] main | ...
0
votes
1answer
2k views

How do I generate the /sys/kernel/debug/tracing folder in kernel with yocto project?

I was tying to use perf on Renesas target and I configured the yocto "local.conf" as showed in this link. #avoid stripping binaries INHIBIT_PACKAGE_STRIP = "1" #add the debug information ...
0
votes
0answers
299 views

Run “perf top” on another user's process

We have a CentOS 7 system with two user accounts: Sally, to run production jobs. Tanya, for monitoring and interactive jobs. Sally runs a specific job that Tanya needs to monitor using perf top. ...
1
vote
1answer
460 views

Building .deb package for Linux perf?

There is a convenient Linux kernel makefile target "make deb-pkg" to build kernel, modules, headers as .deb. Then I can install/remove via dpkg command. However, for perf compilation, there is only ...
7
votes
2answers
15k views

perf interrupt took too long but perf not being installed

I just now checked my dmesg because my server starts to crash now and then. There I read the following line: perf interrupt took too long (2528 > 2500), lowering kernel.perf_event_max_sample_rate ...
2
votes
0answers
247 views

Recording a process with perf using PID doesn't work

When I do performance profiling using perf, normally this works: perf record -g -F99 $BINARY_NAME Upon completion, the command says: [ perf record: Captured and wrote 0.006 MB output.data (37 ...
1
vote
0answers
116 views

Perf tool usage on A7 and A15 cores (Big.Little) on XU3/XU4 boards

Many people have posted on odroid forum and elsewhere on how to enable "perf" on XU3 and XU4 boards. After months of trials, one final solution was presented in http://forum.odroid.com/viewtopic.php?f=...
1
vote
0answers
61 views

perf-like assembly reading tool

perf has a very friendly terminal interface for performance analysis. It has a very helpful feature that the branch target is annotated with beautiful arrows, showing where this branch is going to (if ...
4
votes
0answers
755 views

perf cycles not supported

I am trying to use perf for profiling in a Linux virtual machine. However, I am receiving the following output: [vagrant@localhost ~]$ perf stat -d ls / bin boot dev etc home lib lib64 lost+...
1
vote
1answer
858 views

Understanding the CPU time spent by process in user/kernel space

I have an application which normally reports (time command reports): real 1.59 user 1.42 sys 4.73 But when I load a shared library and run it then the time goes up quite high (time command reports): ...
4
votes
1answer
3k views

perf fails to work on really large process

I use perf quite often to profile my applications. Recently I got a few new machine with ~750G RAM each. I am trying to profile a process that uses about 400G of ram on one of them. This works fine on ...
3
votes
1answer
2k views

How to resolve <not counted> problem in perf tool?

perf stat -d ./sample.out Output is: Performance counter stats for './sample.out': 0.586266 task-clock (msec) # 0.007 CPUs utilized 2 context-...
1
vote
0answers
135 views

perf_events over ssh (osx -> linux) freezing and unresponsive

I'm using linux perf_events and sometimes am having trouble with the perf report (which is a terminal application) view freezing up. I'm interacting with a remote linux server which is running perf ...
2
votes
2answers
3k views

Why can't I find hardware cache event in my perf list?

I have a problem in using linux perf on a newly bought laptop: there is no available hardware cache effect in my perf list!!! Well, this is really all important information that I wish to sample!! ...
4
votes
0answers
737 views

How to interpret perf -e cache-misses:pp?

I find the behavior of perf top -e cache-misses:pp -p <my_pid> quite confusing. I own an Intel i5-3230M, running kernel 4.4.5 64 bit. If I just run that commmand, I get basically no samples ...
2
votes
1answer
331 views

perf record -a: why don't I see a sample per core on every sample?

I have some before/after perf traces provided to me and I'm trying to understand why they have radically different (about 2x) numbers of samples in each trace. The traces were collected via the same ...
1
vote
1answer
2k views

Understanding Linux Perf sched-switch and context-switches

I've been trying to enable context switch events on perf and use perf script's dump from perf.data to investigate thread blocked time. So far the only two recording options that seem to be helpful ...
1
vote
0answers
100 views

Running perf on a custom kernel that does not come with /tools or gcc

I need to run some benchmarks on a hypervisor (Xtratum) Linux partition. The kernel version is 3.4.4-xm and comes as an SDK which I only need to path include in the hypervisor makefile. As noted in ...
0
votes
1answer
220 views

Linux tools for perf (install linux-tools-3.15.0)

I use Linaro version of Linux (Linaro 12.11) on my embedded target with ARM9 Core. For a certain profiling, I need to use the perf tool. perf require linux-tools-3.15.0 to be installed on my device. ...
1
vote
1answer
1k views

How to Cross Compile elfutils

My system (uname --all) Linux shyamdaramubtnb 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux My target ARM Cortex A7 I am in the process of cross ...
0
votes
2answers
3k views

member ../lib/lk/liblk.a(debugfs.o) in archive is not an object, error while cross compiling perf

i get the following error when i try to cross compile perf tool for arm ../lib/lk/liblk.a: member ../lib/lk/liblk.a(debugfs.o) in archive is not an object what i have done ? cd stable-kernel/tools/...
2
votes
0answers
671 views

Capturing screen of “perf top” or other interactive programs

I'm trying to write a script to capture output of perf top Similar to top, perf top detects the screen size and fill information to the screen. But sadly unlike top which has a batch mode, perf does ...
1
vote
0answers
82 views

Is the perfmon2 tool obsolete due to the same functionality being included in the current Linux kernel?

I was having some issues with the PAPI tool and multiplex and this answer by the PAPI creator led me to check out perfmon2: http://lists.eecs.utk.edu/pipermail/ptools-perfapi/2008-April/000900.html ...
1
vote
0answers
565 views

RHEL6 Idle Thread Behavior

I am doing some cpu performance profiling with the perf tool on a RHEL6 box running weblogic12g. It looks like the idle threads are presented as native_safe_halt in the stack profile but ...
1
vote
1answer
414 views

Incoherent measures with perf record

While trying to get some measures from HPC with perf record, I'm getting some incoherent values, I think. I'm using the next command to get some mesures: perf record -T -F997 -e cache-misses:u,...
2
votes
1answer
283 views

Using `perf` repeatedly with file input

perf can be used to analyze the performance of a program. Say you want to test the performance of a program prgrm, with input from a file, you can run: perf stat prgrm < inp.dat Now when you ...
1
vote
1answer
535 views

perf error: failed to mmap with 25 (Inappropriate ioctl for device)

I am trying to use perf in a system with 3.8 linux kernel. When I used the following command, error happens: $ perf record -c 100000 -e '{cycles,instructions}:S' ./nonloop 1000 failed to mmap with 25 ...
1
vote
0answers
475 views

Perf Tool Linux - Not counting cycles-t and cycles-ct

am using the Linux Perf tool to monitor certain events for my benchmarking runs. In the event list argument -e, I added cycles-t and cycles-ct since I want to capture them. But both of them always ...
1
vote
1answer
474 views

Does perf includes some “graphing” abilities?

It's possible to create a bitmap or a vector image out of the data collected by the perf profiler under linux ?
2
votes
1answer
153 views

Understanding Unit Masks on Perf

I'm counting events with perf stat -e. I consulted my processor manufacturer's manual and found the event I'm interested in. However, not only does it have the event number, but it also has a list of ...
3
votes
1answer
1k views

Getting correct perf version

I'm trying to run perf on my Ubuntu Precise box, which I recently upgraded to kernel 3.11.10-03111002 (manual install). The problem is that perf and kernel versions must match, and the requested ...
3
votes
1answer
2k views

Understanding Perf tool output

I recently installed Perf tool On my platform and wanted to use it for profiling my platform. I started profiling a standalone application. Below is the command I used: perf start ./helloworld ...
3
votes
1answer
8k views

Where Do I get Source package for Perf tool

I am looking for source package of perf tool ,which I wanted to compile for ARM Linux ,I have already set up the cross compile tool chain. I have compiled the the oprofile and got it source(Oprofile-...
0
votes
1answer
4k views

How can I install perf 3.4.25?

By installing perf using sudo apt-get install linux-tools-common sudo apt-get install linux-tools-3.2.0.23 gave me perf version 3.2.14 How can I install perf 3.4.25? Is it related to kernel ...
4
votes
2answers
4k views

What stream does perf use?

What stream does the perf command use!? I've been trying to capture it with (perf stat -x, -ecache-misses ./a.out>/dev/null) 2> results following https://stackoverflow.com/q/13232889/50305, ...
12
votes
2answers
2k views

How to make linux 'perf record' work for libc and libstdc++ symbols?

I'm using perf record -g on x86-64 Linux to profile a program. Several symbols in libc or libstdc++ have 0 as a parent: __GI___strcmp_ssse3 (libc) and strcmp@plt (libstdc++) for example. (I can ...