Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jones__Brian
New Contributor I
397 Views

Which perf-list events support Precise Event Based Sampling (PEBS)

Jump to solution

The Linux command perf list returns a long list of event names that I can use with the perf record command.

The Intel SDM (Combined Volumes May 2020) has Tables 18-10, 18-12 and 18-25 that list certain events that are PEBS-enabled, but those events do not correspond directly to the event names returned by perf list.

Many of the events returned by perf list say "This is a non-precise version (that is, does not use PEBS)." Two instructions (br_misp_retired.all_branches_pebs and br_misp_retired.all_branches_pebs) have "_pebs" postpended to their names. Can I assume that those events that do not say "This is a non-precise version (that is, does not use PEBS)" are PEBS-enabled?

Is there a list of which events returned by perf list are PEBS-enabled?

For those that are PEBS-enabled, is it also necessary to postpend p-colon or :pp to the event name when calling perf record?  Which events require colon-p and which events require :pp?  (Note I said p-colon because this system converts it to a frown face. 

 

0 Kudos
1 Solution
HadiBrais
New Contributor III
378 Views

The p event modifier is document at https://man7.org/linux/man-pages/man1/perf-list.1.html. It determines the precision level of the instruction pointer recorded in the samples. Usually, you want the maximum supported precision level. This depends on the microarchitecture, the event, and the perf version. If you specify a precision level that is not supported, no samples will be captured. In general, you can just use the P modifier (capital p) and let perf choose the maximum supported precision level. The P modifier only works on events that support precise sampling. Refer to the Intel SDM Volume 3 to determine which events support precise sampling. If the P modifier is appended to event that doesn't support precise sampling, no samples will be captured.

View solution in original post

4 Replies
HadiBrais
New Contributor III
392 Views

PEBS stands for "processor event-based sampling" since 2016. See: https://community.intel.com/t5/Software-Tuning-Performance/What-is-the-difference-between-processor-....

Modern versions of perf list show Intel event names in addition to perf event names (just scroll down a little bit beyond perf event names). The Intel event names are same names mentioned in the Intel manual and perf implements direct mapping between them.

It's not clear to me whether you're interested in events that support PEBS or events that support precise sampling, which are a subset of events that support PEBS. Either way, the Intel SDM Volume 3 distinguishes between the two. Events that support precise sampling are described as such in the "comment" column in the event tables.

Jones__Brian
New Contributor I
384 Views

Two resources I read today said to postpend a p OR a pp preceded by a colon to the end of the event name.  Under what conditions do I use p and when do I use pp?  The articles did not say. 

Thanks. 

 

 

HadiBrais
New Contributor III
379 Views

The p event modifier is document at https://man7.org/linux/man-pages/man1/perf-list.1.html. It determines the precision level of the instruction pointer recorded in the samples. Usually, you want the maximum supported precision level. This depends on the microarchitecture, the event, and the perf version. If you specify a precision level that is not supported, no samples will be captured. In general, you can just use the P modifier (capital p) and let perf choose the maximum supported precision level. The P modifier only works on events that support precise sampling. Refer to the Intel SDM Volume 3 to determine which events support precise sampling. If the P modifier is appended to event that doesn't support precise sampling, no samples will be captured.

View solution in original post

Jones__Brian
New Contributor I
369 Views

To follow up, when I run perf list -d -v --details > perf_list_detailed.txt I now get 50 events that are marked "Precise event" and 12 events that are marked "Must be precise."  Those appear to be the events I need. 

 

Reply