Hi Stephane, Thanks for the update. It looks like the memory bandwidth metrics (dram_channel_data_controller_x) are not supported on AMD nodes either. Is it possible to add support for these metrics as well?
To mitigate this in the meantime, I am curious if a raw event with a umask could be used for events that are not supported. However, I'm unsure which libpfm4 APIs would be appropriate for this purpose. Could you provide some guidance? Thanks. On Sat, Mar 9, 2024 at 8:23 AM Stephane Eranian <eran...@googlemail.com> wrote: > Hi, > > At this point. libpfm4 does not support AMD L3 PMU events. They should > be added shortly. > > On Wed, Mar 6, 2024 at 3:40 PM Yunzhao Li via perfmon2-devel > <perfmon2-devel@lists.sourceforge.net> wrote: > > > > Hello, > > > > I am encountering an issue where the pfm_get_os_event_encoding() API > could not find l3_misses or l3_accesses perf events by running the > following simple code: > > ~$ pfm_test l3_misses 0 > > pfm_test: cannot get encoding: event not found > > ~$ pfm_test cache-misses 0 > > cache-misses event supported by libpfm > > > > ``` > > #include <err.h> > > #include <inttypes.h> > > #include <perfmon/pfmlib.h> > > #include <stdlib.h> > > #include <string.h> > > > > int main(int argc, char **argv) > > { > > pfm_pmu_encode_arg_t arg; > > int ret; > > char *event_name; > > int os_encoding; > > > > if (argc != 3) { > > fprintf(stderr, "Usage: %s <event_name> <os_encoding>\n", > argv[0]); > > return 1; > > } > > > > event_name =argv[1]; > > os_encoding = atoi(argv[2]); > > > > ret = pfm_initialize(); > > if (ret != PFM_SUCCESS) > > errx(1, "cannot initialize library %s", pfm_strerror(ret)); > > > > memset(&arg, 0, sizeof(arg)); > > char* fqstr = malloc(256); > > if (!fqstr) { > > errx(1, "Failed to allocate memory for fully qualified > string"); > > } > > > > arg.fstr = &fqstr; > > arg.size = sizeof(arg); > > > > ret = pfm_get_os_event_encoding(event_name, PFM_PLM0|PFM_PLM3, > os_encoding, &arg); > > if (ret != PFM_SUCCESS) > > errx(1, "cannot get encoding: %s", pfm_strerror(ret)); > > else > > printf("%s event supported by libpfm\n", event_name); > > > > free(fqstr); > > return 0; > > } > > > > > > However, these events can be successfully monitored using the perf CLI > tool: > > > > ``` > > ~$sudo perf stat -a -e l3_misses,l3_accesses -- sleep 1 > > > > Performance counter stats for 'system wide': > > > > 1,122,395,814 l3_misses > > 4,398,985,531 l3_accesses > > > > 1.005054759 seconds time elapsed > > ``` > > The environment is running on a kernel version 6.1 with an AMD EPYC 7642 > 48-Core Processor. > > > > Any suggestions? > > _______________________________________________ > > perfmon2-devel mailing list > > perfmon2-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel >
_______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel