Skip to main content

Questions tagged [perf]

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

perf
0 votes
0 answers
14 views

Why does perf record --branch-any affect the CPU usage of the process?

The background is that I want to collect lbr events on the machine for pgo. But when I execute perf, I find that the CPU utilization of the processes running on the machine will increase. I am ...
zcfh's user avatar
  • 141
0 votes
0 answers
9 views

How to get llc misses using perf

In perf manual, I find two metrics to obtain llc misses: PERF_COUNT_HW_CACHE_MISSES Cache misses. Usually this indicates Last Level Cache misses; PERF_COUNT_HW_CACHE_LL for measuring Last-Level ...
陈青云's user avatar
1 vote
0 answers
49 views

Linux read() occasionally returns "No child processes" (errno 10) when reading perf counters after kernel update

I have C++ program that collects hardware counters using the perf_event_open and read methods on CentOS9 Stream. The code was working perfectly fine with kernel version 5.14.0-319.el9.x86_64. After a ...
esal26's user avatar
  • 11
1 vote
0 answers
71 views

Why am I getting cache miss while accessing a variable, only updated by the same thread?

I am trying to measure cache misses in a multi-threaded application using perf_event_open on Linux. The code involves two threads: Thread t1, that updates an aligned integer (x) and another thread t2 ...
Rishi Jain's user avatar
0 votes
1 answer
39 views

CPython: what happens when the take_gil function calls the drop_gil function

I'm using perf probes to profile the GIL contention in a multithreaded Python application and I find sequences where the take_gil function calls drop_gil as shown in the following perf script dump of ...
Olumide's user avatar
  • 5,717
0 votes
1 answer
20 views

perf report: Why is said my function is calling main?

This is an excerpt of a perf report: Samples: 47K of event 'cycles', Event count (approx.): 22843195013 Children Self Command Shared Object Symbol + 97.13% 0.01% ...
rafoo's user avatar
  • 1,590
3 votes
1 answer
61 views

perf on arm cortex-a7 produces no callstacks

I've written a small C++ test program that I want to profile using perf on an arm. Running and profiling the program on my x86 WSL produces expected perf results. However when I profile the program on ...
Max's user avatar
  • 41
0 votes
0 answers
15 views

How to Link (Simple)Perf Events for ARM CPUs on Android with Concise Metric Description?

Where can I get detailed information about (simple)perf events for ARM CPUs on Android? simpleperf list specifies many metrics to track: simpleperf list ...
fabian's user avatar
  • 1,707
0 votes
0 answers
21 views

How to use perf to collect performance metrics for cgroup?

I want to use --cgroup options with perf to collect performance metrics within a container. I created the cgroup in the following way: cgcreate -g cpu:/perf_test cgcreate -g perf_event:/perf_test ...
Frontier_Setter's user avatar
0 votes
0 answers
17 views

Perf only has power/energy-pkg

I am currently using CPU: AMD Ryzen 5800x3D Kernel: 6.9.6-zen1-1 Perf version: 6.9.2 and I am trying to use perf stat -e power/energy-ram but upon checking /sys/bus/event_source/devices/power/events I ...
Budi's user avatar
  • 1
0 votes
0 answers
16 views

Why perf starts to multiplex events even if there are more counters than events?

I was reading about event multiplexing in perf. In my understanding, multiplexing only happens when there is more events than counters. However, tracking the following 3 events already causes ...
yhdang's user avatar
  • 189
1 vote
1 answer
95 views

Using epoll on a sampling perf_event_open file descriptor returns EPOLLHUP

I am writing a program that uses the Linux perf api to measure the number of instructions run by a program, and I want to receive a notification once the child process reaches a given number of ...
Mikołaj Kołek's user avatar
0 votes
0 answers
20 views

Is it possible to exclude a pid from perf record (but capture all others)?

I want to run the perf record, but filter out a few pids. Reading the perf record doc I am little confused as to how to mention the pid filter. This does not seems to work: perf record -e cycles --...
kshitij's user avatar
  • 51
1 vote
0 answers
22 views

Using `perf` on the host machine, the symbols of the processes in the container cannot be displayed

My goal is to use perf record on the host machine to collect the hot symbols of all processes, including those in the container. But I found that the symbol column of the process in the container only ...
zcfh's user avatar
  • 141
2 votes
0 answers
86 views

How can I make perf find symbols in my golang program

I want to use perf and FlameGraph to generate a cpu usage flamegraph of my golang program. $ go build -gcflags=all="-N -l" -o my_program ./*.go # Compile with debug info. $ ./my_program $ ...
Yu-Ang Cao's user avatar

15 30 50 per page
1
2 3 4 5
74