Hi,
After some further debugging … here is what I got:
This very method : PAPI_library_init(PAPI_VER_CURRENT) — Prints "PAPI error -4”.
However,
int retval=0;
if((retval=PAPI_library_init(PAPI_VER_CURRENT)) != PAPI_VER_CURRENT) {
printf("[sysInitPerf] Library Initialization Error! %d \n", retval);
handle_error(retval);
}
The code inside the if statement is never ever reached.
The question is right now ….. ….. Why it prints PAP error -4 ??? Is this an error ?
I got it work and compile busing the libpapi.a instead of -lpapi option when gcc.
As to the question why I am using 32 bit : I am working on JikesRVM which almost only supports 32 bit version.
available components and hardware information.
--------------------------------------------------------------------------------
PAPI version : 5.6.1.0
Operating system : Linux 4.9.0-12-amd64
Vendor string and code : GenuineIntel (1, 0x1)
Model string and code : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz (79, 0x4f)
CPU revision : 1.000000
CPUID : Family/Model/Stepping 6/79/1, 0x06/0x4f/0x01
CPU Max MHz : 2201
CPU Min MHz : 1200
Total cores : 40
SMT threads per core : 2
Cores per socket : 10
Sockets : 2
Cores per NUMA region : 20
NUMA regions : 2
Running in a VM : no
Number Hardware Counters : 10
Max Multiplex Counters : 384
Fast counter read (rdpmc): no
--------------------------------------------------------------------------------
Compiled-in components:
Name: perf_event Linux perf_event CPU counters
Name: perf_event_uncore Linux perf_event CPU uncore and northbridge
\-> Disabled: Insufficient permissions for uncore access. Set /proc/sys/kernel/perf_event_paranoid to 0 or run as root.
Active components:
Name: perf_event Linux perf_event CPU counters
Native: 162, Preset: 60, Counters: 10
PMUs supported: ix86arch, perf, perf_raw, bdw_ep
--------------------------------------------------------------------------------
kmahmou1@jolteon:~/jikes/kjikes/JikesRVM-3.1.4$ sudo papi_component_avail
[sudo] password for kmahmou1:
Available components and hardware information.
--------------------------------------------------------------------------------
PAPI version : 5.6.1.0
Operating system : Linux 4.9.0-12-amd64
Vendor string and code : GenuineIntel (1, 0x1)
Model string and code : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz (79, 0x4f)
CPU revision : 1.000000
CPUID : Family/Model/Stepping 6/79/1, 0x06/0x4f/0x01
CPU Max MHz : 2201
CPU Min MHz : 1200
Total cores : 40
SMT threads per core : 2
Cores per socket : 10
Sockets : 2
Cores per NUMA region : 20
NUMA regions : 2
Running in a VM : no
Number Hardware Counters : 10
Max Multiplex Counters : 384
Fast counter read (rdpmc): no
--------------------------------------------------------------------------------
Compiled-in components:
Name: perf_event Linux perf_event CPU counters
Name: perf_event_uncore Linux perf_event CPU uncore and northbridge
Active components:
Name: perf_event Linux perf_event CPU counters
Native: 231, Preset: 60, Counters: 10
PMUs supported: ix86arch, perf, perf_raw, bdw_ep
Name: perf_event_uncore Linux perf_event CPU uncore and northbridge
Native: 781, Preset: 0, Counters: 97
PMUs supported: rapl, bdx_unc_cbo0, bdx_unc_cbo1, bdx_unc_cbo2, bdx_unc_cbo3, bdx_unc_cbo4, bdx_unc_cbo5
bdx_unc_cbo6, bdx_unc_cbo7, bdx_unc_cbo8, bdx_unc_cbo9, bdx_unc_ha0, bdx_unc_imc0, bdx_unc_imc1
bdx_unc_imc2, bdx_unc_imc3, bdx_unc_imc4, bdx_unc_pcu, bdx_unc_qpi0, bdx_unc_qpi1, bdx_unc_ubo
bdx_unc_r2pcie, bdx_unc_r3qpi0, bdx_unc_r3qpi1