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
1 vote
0 answers
47 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 ...
user avatar
  • 141
1 vote
0 answers
22 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:...
user avatar
1 vote
0 answers
19 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, ...
user avatar
  • 1,172
1 vote
0 answers
225 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 ...
user avatar
  • 111
0 votes
0 answers
353 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-...
user avatar
1 vote
0 answers
289 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 ...
user avatar
  • 19
0 votes
1 answer
786 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: ...
user avatar
  • 101
17 votes
1 answer
9k 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 ...
user avatar
  • 1,883
5 votes
1 answer
6k 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 ...
user avatar
  • 151
1 vote
0 answers
93 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*...
user avatar
  • 61
8 votes
2 answers
12k 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 ...
user avatar
  • 273
2 votes
3 answers
5k 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!! ...
user avatar
3 votes
0 answers
120 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 ...
user avatar
  • 31
1 vote
2 answers
20k 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....
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 ...
user avatar
  • 463
1 vote
1 answer
498 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,...
user avatar
1 vote
1 answer
733 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 ...
user avatar
  • 11
1 vote
0 answers
681 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 ...
user avatar
2 votes
1 answer
237 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 ...
user avatar
  • 153
3 votes
1 answer
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 ...
user avatar
  • 645
3 votes
1 answer
10k 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-...
user avatar
  • 645
7 votes
2 answers
8k 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 ...
user avatar
  • 223
1 vote
1 answer
400 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
3k 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 ...
user avatar
4 votes
1 answer
543 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 ...
user avatar
  • 181
26 votes
1 answer
24k 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?
user avatar
6 votes
1 answer
21k 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 ...
user avatar