성능이 제대로 작동하는 것 같지만 PAPI에는 Ubuntu에서 사용할 수 있는 이벤트가 없습니다.

성능이 제대로 작동하는 것 같지만 PAPI에는 Ubuntu에서 사용할 수 있는 이벤트가 없습니다.

내 컴퓨터에 PAPI를 설치하려고 합니다.

$ uname -a
Linux XXXXXX 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

그리고 어떤 이벤트도 감지하지 못합니다.

$ papi_avail

...

Of 108 possible events, 0 are available, of which 0 are derived.

No events detected!  Check papi_component_avail to find out why.

$ papi_component_avail

Available components and hardware information.
--------------------------------------------------------------------------------
PAPI version             : 7.0.1.0
Operating system         : Linux 5.19.0-35-generic
Vendor string and code   : GenuineIntel (1, 0x1)
Model string and code    : 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (140, 0x8c)
CPU revision             : 1.000000
CPUID                    : Family/Model/Stepping 6/140/1, 0x06/0x8c/0x01
CPU Max MHz              : 4800
CPU Min MHz              : 400
Total cores              : 8
SMT threads per core     : 2
Cores per socket         : 4
Sockets                  : 1
Cores per NUMA region    : 8
NUMA regions             : 1
Running in a VM          : no
Number Hardware Counters : 19
Max Multiplex Counters   : 384
Fast counter read (rdpmc): yes
--------------------------------------------------------------------------------

Compiled-in components:
Name:   perf_event              Linux perf_event CPU counters
Name:   perf_event_uncore       Linux perf_event CPU uncore and northbridge
   \-> Disabled: No uncore PMUs or events found
Name:   sysdetect               System info detection component

Active components:
Name:   perf_event              Linux perf_event CPU counters
                                Native: 165, Preset: 0, Counters: 19
                                PMUs supported: ix86arch, perf, perf_raw, icl

Name:   sysdetect               System info detection component
                                Native: 0, Preset: 0, Counters: 0


--------------------------------------------------------------------------------

Ubuntu 시스템의 INSTALL.txt 파일에 있는 지침에 따라 이를 추가하고 KERNEL=="perfctr", MODE="0666"실행하여 설정했습니다./etc/udev/rules.d/40-permissions.rules/proc/sys/kernel/perf_event_paranoid-1$ sudo sh -c "echo -1 > /proc/sys/kernel/perf_event_paranoid"$ sudo sh -c 'echo kernel.perf_event_paranoid=-1 > /etc/sysctl.d/local.conf'

papi가 perf를 통해 이러한 이벤트에 액세스한다는 것을 내가 이해하는 한 대부분의 테스트는 제대로 작동하는 것 같습니다.

$ perf test                
  1: vmlinux symtab matches kallsyms            : Skip
  2: Detect openat syscall event                : Skip (permissions)
  3: Detect openat syscall event on all cpus    : Skip (permissions)
  4: Read samples using the mmap interface      : Skip (permissions)
  5: Test data source output                    : Ok
  6: Parse event definition strings             :
  6.1: Test event parsing                       : Skip (permissions)
  6.2: Test parsing of "hybrid" CPU events      : Skip (not hybrid)
  6.3: Parsing of all PMU events from sysfs     : Ok
  6.4: Parsing of given PMU events from sysfs   : Ok
  6.5: Parsing of aliased events from sysfs     : Skip (no aliases in sysfs)
  6.6: Parsing of aliased events                : Ok
  6.7: Parsing of terms (event modifiers)       : Ok
  7: Simple expression parser                   : Ok
  8: PERF_RECORD_* events & perf_sample fields  : Ok
  9: Parse perf pmu format                      : Ok
 10: PMU events                                 :
 10.1: PMU event table sanity                           : Ok
 10.2: PMU event map aliases                            : Ok
 10.3: Parsing of PMU event table metrics               : Ok
 10.4: Parsing of PMU event table metrics with fake PMUs: Ok
 11: DSO data read                              : Ok
 12: DSO data cache                             : Ok
 13: DSO data reopen                            : Ok
 14: Roundtrip evsel->name                      : Ok
 15: Parse sched tracepoints fields             : FAILED!
 16: syscalls:sys_enter_openat event fields     : FAILED!
 17: Setup struct perf_event_attr               : Skip
 18: Match and link multiple hists              : Ok
 19: 'import perf' in python                    : Ok
 20: Breakpoint overflow signal handler         : Ok
 21: Breakpoint overflow sampling               : Ok
 22: Breakpoint accounting                      : Ok
 23: Watchpoint                                 :
 23.1: Read Only Watchpoint                     : Skip (missing hardware support)
 23.2: Write Only Watchpoint                    : Ok
 23.3: Read / Write Watchpoint                  : Ok
 23.4: Modify Watchpoint                        : Ok
 24: Number of exit events of a simple workload : Ok
 25: Software clock events period values        : Ok
 26: Object code reading                        : FAILED!
 27: Sample parsing                             : Ok
 28: Use a dummy software event to keep tracking: Ok
 29: Parse with no sample_id_all bit set        : Ok
 30: Filter hist entries                        : Ok
 31: Lookup mmap thread                         : Ok
 32: Share thread maps                          : Ok
 33: Sort output of hist entries                : Ok
 34: Cumulate child hist entries                : Ok
 35: Track with sched_switch                    : Ok
 36: Filter fds with revents mask in a fdarray  : Ok
 37: Add fd to a fdarray, making it autogrow    : Ok
 38: kmod_path__parse                           : Ok
 39: Thread map                                 : Ok
 40: LLVM search and compile                    :
 40.1: Basic BPF llvm compile                    : Skip
 40.2: kbuild searching                          : Skip
 40.3: Compile source for BPF prologue generation: Skip
 40.4: Compile source for BPF relocation         : Skip
 41: Session topology                           : Ok
 42: BPF filter                                 :
 42.1: Basic BPF filtering                      : Skip
 42.2: BPF pinning                              : Skip (clang isn't installed or environment missing BPF support)
 42.3: BPF prologue generation                  : Skip (clang isn't installed or environment missing BPF support)
 43: Synthesize thread map                      : Ok
 44: Remove thread map                          : Ok
 45: Synthesize cpu map                         : Ok
 46: Synthesize stat config                     : Ok
 47: Synthesize stat                            : Ok
 48: Synthesize stat round                      : Ok
 49: Synthesize attr update                     : Ok
 50: Event times                                : Ok
 51: Read backward ring buffer                  : Skip
 52: Print cpu map                              : Ok
 53: Merge cpu map                              : Ok
 54: Probe SDT events                           : Skip
 55: is_printable_array                         : Ok
 56: Print bitmap                               : Ok
 57: perf hooks                                 : Ok
 58: builtin clang support                      :
 58.1: builtin clang compile C source to IR        : Skip (not compiled in)
 58.2: builtin clang compile C source to ELF object: Skip (not compiled in)
 59: unit_number__scnprintf                     : Ok
 60: mem2node                                   : Ok
 61: time utils                                 : Ok
 62: Test jit_write_elf                         : Ok
 63: Test libpfm4 support                       :
 63.1: test of individual --pfm-events          : Skip (not compiled in)
 63.2: test groups of --pfm-events              : Skip (not compiled in)
 64: Test api io                                : Ok
 65: maps__merge_in                             : Ok
 66: Demangle Java                              : Ok
 67: Demangle OCaml                             : Ok
 68: Parse and process metrics                  : Ok
 69: PE file support                            : Skip
 70: Event expansion for cgroups                : Ok
 71: Convert perf time to TSC                   :
 71.1: TSC support                              : Ok
 71.2: Perf time to TSC                         : Ok
 72: dlfilter C API                             : Skip
 73: Sigtrap                                    : Ok
 74: x86 rdpmc                                  : Ok
 75: Test dwarf unwind                          : FAILED!
 76: x86 instruction decoder - new instructions : Ok
 77: Intel PT packet decoder                    : Ok
 78: x86 bp modify                              : Ok
 79: x86 Sample parsing                         : Ok
failed to open shell test directory: /usr/libexec/perf-core/tests/shell

성능 버전을 확인하려고 시도했지만 다음과 같은 결과만 얻습니다.

$ perf --version
perf version 

또한 APT와 git repo를 통해 PAPI 설치를 시도했지만 정확히 동일하게 작동하는 것 같습니다.

시도해 볼 아이디어가 부족하므로 내 구성에 문제가 있을 수 있다는 피드백을 주시면 매우 감사하겠습니다.

관련 정보