Perf stat for a part of a program

Is it possible if perf only collects hardware counter statistics for a portion of the program execution? If so, how?

likwid offers a feature to detect named regions, but it would be great if this was possible on systems with performance installed.

Some of the previous questions returned relevant answers, but there are still some drawbacks:

  • Using the probe I am getting the same error and I am using a slightly newer kernel (3.13). Are these fixes available in a newer version?
  • Using perf_event_open I would like to keep the flexibility to define events on the command line. I also looked into the performance code, but it doesn't seem to set things up by calling perf_event_open.
+3
linux perf likwid


source to share


No one has answered this question yet

See similar questions:

26
How to get the number of CPU cycles in x86_64 from C ++?
ten
clock pulse counter wth GCC
7
Measure page faults from program c
3
Using a perforated probe to monitor performance characteristics at a specific function

or similar:

21
why does perf stat show "stalled-cycles-backend" as <not supported>?
five
Find out how many hardware performance counters a processor has
five
Monitoring performance counters while performing a specific function
3
How can I get the exit code of a performance program?
3
Accessing inaccessible area with mmap and / proc / mtrr
3
punching on AMD 15h
2
Perf Stat vs Perf Record
1
what's the point of annotating loops in perth stat
0
Can the perforation sampling rate be increased?
0
perf is not allowed to collect statistics



All Articles
Loading...
X
Show
Funny
Dev
Pics