you seem to have a variety of different issues here.
For one, PAPI gets its event values from libpfm4, so if the events aren't
appearing in PAPI then we need to get that fixed upstream in libpfm4.
I don't have access to a Sapphire Rapids machine, but it looks like a few
topdown events should show up in papi_native_avail, for example
TOPDOWN:SLOTS
TOPDOWN:BACKEND_BOUND_SLOTS
TOPDOWN:MEMORY_BOUND_SLOTS
and similar. Do those events appear for you, and can you add them?
What do you mean that you can't access the values when multiplexing? It
won't let you add the events, or do you get some sort of error?
The oddly large values from papi_command_line shouldn't be happening,
that's a bit odd. What version of PAPI are you using? Does this only
happen when you are multiplexing by having lots of events, or does it
happen on the topdown events if you run them one at a time?
Vince Weaver
vincent...@maine.edu
On Tue, 23 Jul 2024, Ian Lumsden wrote:
> I have a bit of an update on this.
>
> I managed to access these counters by using their raw codes, which I got
> from this file
> <
https://github.com/torvalds/linux/blob/e9680017b2dc8686a908ea1b51941a91b6da9f1d/arch/x86/events/intel/core.c#L480>
> in the Linux kernel. However, I've now run into a pair of other issues.
> First, I've found that I cannot access any of the counters I need when
> using PAPI's multiplexing. Second, the values I'm getting for these
> counters are all gigantic numbers (on the order of billions or larger) with
> only the least significant digits (e.g., through the low thousands)
> differing. As a result, my top-down calculations are ending up being
> roughly 0.25 for each of the level 1 metrics.
>
> How can I work around these issues?
>
> In case it helps, these are the specific metrics (in PAPI) format that I'm
> using:
>
> - perf::slots
> - perf::topdown-retiring
> - perf::topdown-bad-spec
> - perf::topdown-be-bound
> - INT_MISC:UOP_DROPPING
> - perf_raw::r8400 (raw version of topdown-heavy-ops)
> - perf_raw::r8500 (raw version of topdown-br-mispredict)
> - perf_raw::r8600 (raw version of topdown-fetch-lat)
> - perf_raw::r8700 (raw version of topdown-mem-bound)
>
> Also, here are two examples of the values I'm getting. The first image is
> the output of `papi_command_line`. The second image is a printout of a
> Caliper trace showing the values we get for some of these metrics.
>
> Thanks,
>
> Ian Lumsden
>
> On Thursday, July 18, 2024 at 12:35:11 PM UTC-7 Ian Lumsden wrote:
>
> > Hello,
> >
> > I am trying to update the top-down service in LLNL's Caliper tool to
> > support Sapphire Rapids. Currently, this service uses PAPI to access
> > counters and native events. I've managed to work out how to use PAPI to
> > access the necessary native events for the first level top-down metrics
> > (i.e., frontend bound, backend bound, bad speculation, and retiring).
> > However, I cannot figure out how to access the following native events,
> > which I need for the second level top-down metrics:
> >
> > - topdown-fetch-lat
> > - topdown-br-mispredict
> > - topdown-mem-bound
> > - topdown-heavy-ops
> >
> > How can I access these events through PAPI?
> >
> > In case it helps, I've confirmed that the filesystem entries for these
> > events exist in /sys/devices/cpu/events, and I've confirmed that these
> > events do *not* show up in papi_native_avail. I've also found the event
> > *Global Computing Laboratory <
https://globalcomputing.group/>*
> > Department of Electrical Engineering and Computer Science
> > University of Tennessee, Knoxville
> >
>
> --
> You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
ptools-perfap...@icl.utk.edu.
> To view this discussion on the web visit
https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/6100b8a1-f196-4eea-a186-17d2a8f42c50n%40icl.utk.edu.
>
Vince Weaver
vincent...@maine.edu
Associate Professor, Electrical and Computer Engineering
http://web.eece.maine.edu/~vweaver/