Questions tagged [perf-event]

perf_event is the Linux kernel library and tool to simplify access to performance monitoring utilities infrastructure.

Filter by
Sorted by
Tagged with
0 votes
1 answer
154 views

Unable to find any information about TLB on my computer or obtain information about hardware counters about TLB

The Ubuntu version I am using is Ubuntu 18.04.6 LTS, and the kernel version is 5.4.0-148 generic. My processor is 12th Gen Intel (R) Core (TM) i7-12700. I would like to know the number of TLB ...
citrusyi's user avatar
0 votes
0 answers
615 views

Unable to use perf to find L3 Cache miss rate

I am trying to get the L3 cache miss rate when I try to use perf. The following is the command I run: perf stat -e instructions,LLC-load-misses,LLC-loads ./program <arg1> <arg2> <arg3&...
darkdante's user avatar
1 vote
1 answer
560 views

how to use metrics with perf stat

perf list shows a bunch of what it calls metrics. The list starts off with List of pre-defined events (to be used in -e): Metrics: BAClear_Cost [Average Branch Address Clear Cost (fraction ...
rkg1's user avatar
  • 15
0 votes
1 answer
268 views

what is the difference between itlb_misses.miss_causes_a_walk, itlb_misses.walk_completed, and itlb_misses.walk_pending

I ran perf stat -e itlb_misses.miss_causes_a_walk,itlb_misses.walk_completed,itlb_misses.walk_pending grep Hecuba /storage/nvme6/complete_shakespeare_4096_times and got Performance counter stats ...
rkg1's user avatar
  • 15
1 vote
0 answers
214 views

Archlinux, 'kernel.perf_event_paranoid' it not respected

When reading the Performance Counters (PMC) on CPUS, the kernel.perf_event_paranoid must be <=1 (see Kernel doc) The program below reads the PMC and should exit early with 1, if it cannot open the ...
Joel's user avatar
  • 141
1 vote
0 answers
64 views

Linux CPU Utilization Reporting Tool (Linux CURT)

I am trying to use linux curt (https://github.com/open-power-sdk/curt) tool for monitoring CPU utilization values of threads. On running this command ''' perf record -e '{raw_syscalls:*,sched:...
I192100 Mayra Ahmad's user avatar
1 vote
0 answers
110 views

linux perf: limiting to just some small periods of time

I'm writing a video game, and have used perf(1) and flame graphs to get some decent "whole program performance" information. However, I also want to investigate specific worst-case periods, ...
jwd's user avatar
  • 1,437
1 vote
0 answers
354 views

How to take stack samples using `perf` based on wall-clock time

I am trying to use Linux's perf_events framework to investigate an issue with an application on one of our servers. Based on my reading about the perf tool, collecting stacks is relatively ...
zac's user avatar
  • 111
0 votes
0 answers
521 views

High-frequency performance counter sampling using perf record/report

I want to retrieve performance counter counts at a high frequency (i.e. 100-200Hz) using the perf tool (similar in functionality to https://github.com/RRZE-HPC/likwid/wiki/likwid-perfctr#the-timeline-...
Justin Borromeo's user avatar
1 vote
0 answers
444 views

Perf tool, used for profiling, crashes on heavy load

When I am using "perf record -F 99 -g -p -- sleep 300" during average load, I am getting the perf.data file without any problem. But when the load is high, it is crashing. The only way to get an ok ...
kaevin's user avatar
  • 19
0 votes
1 answer
1k 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: ...
adamm's user avatar
  • 101
19 votes
1 answer
12k views

What are Kernel PMU event-s in perf_events list?

Searching for what one can monitor with perf_events on Linux, I cannot find what Kernel PMU event are? Namely, with perf version 3.13.11-ckt39 the perf list shows events like: branch-instructions OR ...
xealits's user avatar
  • 2,113
5 votes
1 answer
8k 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 ...
Shlomi's user avatar
  • 151
1 vote
0 answers
116 views

Bash check if firefox use internet

I want to check how much internet use Firefox with a shell script. Here I found good examples to see performances. #!/bin/sh free -m | awk 'NR==2{printf "Memory Usage: %s/%sMB (%.2f%%)\n", $3,$2,$3*...
Gab's user avatar
  • 71
10 votes
2 answers
17k views

Missing stack symbols with perf_event's perf report, despite -fno-omit-frame-pointer compilation

I'm struggling getting perf_events to give me stack traces with symbols, despite reading many tutorials on the subject and doing (I think) all the necessary things. It's possible that my local install ...
Kulluk007's user avatar
  • 293
2 votes
3 answers
7k 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!! ...
Zheyuan Li's user avatar
3 votes
0 answers
182 views

Problem in making Perf Kernel Counter work

I have written a kernel module which creates a performance counter via "perf_event_create_kernel_counter" API and then periodically reads its value. My application works on Kernel version-4.0.9 (and ...
Skidro's user avatar
  • 31
2 votes
2 answers
22k views

View current kernel parameters?

I saw in my syslog kernel.perf_event_max_sample_rate get changed. I was wondering if I could write a quick script to log this variable every few minutes. Currently it is: sysctl -a | grep kernel....
pwnyrainbow's user avatar
2 votes
0 answers
1k views

How does performance measurement tool 'perf' actually work?

perf is a tool which accesses the performance counter registers of an machine and gives out metrics to user to analyze the system performance. What I am curious about is, when I read the parts of ...
kakeh's user avatar
  • 483
1 vote
1 answer
535 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,...
Alberto Garcia's user avatar
1 vote
1 answer
824 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 ...
wm8120's user avatar
  • 11
1 vote
0 answers
781 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 ...
user68843's user avatar
2 votes
1 answer
298 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 ...
iomartin's user avatar
  • 163
3 votes
1 answer
3k 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 ...
Ram's user avatar
  • 655
3 votes
1 answer
11k 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-...
Ram's user avatar
  • 655
7 votes
2 answers
9k views

Measure disk IO latencies of a running process

I'm trying to measure the disk IO latencies of a running process to make a histogram. I could do this with DTrace in operating systems that provide it (e.g. as in this Joyent paper), but my ...
ajduff574's user avatar
  • 223
1 vote
1 answer
423 views

Where is the documentation for perf events?

I cant seem to find documentation on the events listed when you do perf list; can someone point me in the right direction?
user avatar
4 votes
2 answers
4k views

How to analyze profile data from `perf record --a` (system-wide collection)?

I am using perf from linux-2.6.36-gentoo-r4. The /proc/sys/kernel/perf_event_paranoid is set to 0, so there should be no problems from there. Because long-running application I am profiling ...
Jakub Narębski's user avatar
4 votes
1 answer
557 views

Fail to install perf on slackware 13.1

I was trying to install perf on slackware 13.1 When I first ran make at /usr/src/linux/tools/perf I got some errors. And I found this patch http://www.valimar.it/repo/linux/perf_fix-2.6.33.patch And ...
sleetdrop's user avatar
  • 181
30 votes
1 answer
27k views

Do I need root (admin) permissions to run userspace 'perf' tool? (perf events are enabled in Linux kernel)

Do I need to have to run perf userspace tool as system administrator (root), or can I run it (or at least some subcommands) as an ordinary user?
Jakub Narębski's user avatar
6 votes
1 answer
22k views

How to check that perf events are enabled in Linux kernel, and how to install perf userland as non-root?

From what I have checked it looks like kernel side of 'perf' subsystem is enabled on computer I work on. Checking kernel configuration shows the following $ zgrep "_PERF[_= ]" /proc/config.gz ...
Jakub Narębski's user avatar