Error finding event LLC_REFERENCES in make test

Open discussion of PAPI.

Error finding event LLC_REFERENCES in make test

Postby hiratz » Wed Mar 18, 2015 2:12 pm

Hi
I'm a newbie and just start to use PAPI 5.4.1. There are no errors during the make. But when I run the simple test(make test), a big error happens and the test aborted. The error message is as follows:

Code: Select all
make[1]: Leaving directory `/root/tools/papi-5.4.1/src/ctests'
ctests/zero

PAPI Error: Error finding event LLC_REFERENCES, it is used in derived event PAPI_L2_DCM.
*** glibc detected *** ctests/zero: free(): invalid pointer: 0x000000000042fcbe ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x76a16)[0x2b3771b52a16]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x6c)[0x2b3771b577bc]
ctests/zero[0x41333e]
ctests/zero[0x413b65]
ctests/zero[0x417f8c]
ctests/zero[0x415278]
ctests/zero[0x40aeb4]
ctests/zero[0x408a45]
ctests/zero[0x4023d3]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)[0x2b3771afaead]
ctests/zero[0x4022b1]
======= Memory map: ========
00400000-00534000 r-xp 00000000 fe:00 661562                             /root/tools/papi-5.4.1/src/ctests/zero
00734000-0074b000 rw-p 00134000 fe:00 661562                             /root/tools/papi-5.4.1/src/ctests/zero
0074b000-04752000 rw-p 00000000 00:00 0
05608000-0562b000 rw-p 00000000 00:00 0                                  [heap]
2b37718ba000-2b37718da000 r-xp 00000000 fe:00 1308165                    /lib/x86_64-linux-gnu/ld-2.13.so
2b37718da000-2b3771909000 rw-p 00000000 00:00 0
2b3771ad9000-2b3771ada000 r--p 0001f000 fe:00 1308165                    /lib/x86_64-linux-gnu/ld-2.13.so
2b3771ada000-2b3771adb000 rw-p 00020000 fe:00 1308165                    /lib/x86_64-linux-gnu/ld-2.13.so
2b3771adb000-2b3771adc000 rw-p 00000000 00:00 0
2b3771adc000-2b3771c5e000 r-xp 00000000 fe:00 1308168                    /lib/x86_64-linux-gnu/libc-2.13.so
2b3771c5e000-2b3771e5e000 ---p 00182000 fe:00 1308168                    /lib/x86_64-linux-gnu/libc-2.13.so
2b3771e5e000-2b3771e62000 r--p 00182000 fe:00 1308168                    /lib/x86_64-linux-gnu/libc-2.13.so
2b3771e62000-2b3771e63000 rw-p 00186000 fe:00 1308168                    /lib/x86_64-linux-gnu/libc-2.13.so
2b3771e63000-2b3771e6a000 rw-p 00000000 00:00 0
2b3771e82000-2b3771e97000 r-xp 00000000 fe:00 1308164                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b3771e97000-2b3772097000 ---p 00015000 fe:00 1308164                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b3772097000-2b3772098000 rw-p 00015000 fe:00 1308164                    /lib/x86_64-linux-gnu/libgcc_s.so.1
2b3774000000-2b3774021000 rw-p 00000000 00:00 0
2b3774021000-2b3778000000 ---p 00000000 00:00 0
7ffff8e51000-7ffff8e72000 rw-p 00000000 00:00 0                          [stack]
7ffff8f1a000-7ffff8f1b000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
make: *** [test] Aborted


The information of my machine is:
CPU: Intel Core i7 4770R
Architecture: Haswell
OS: Debian wheezy (run in the Vmware as a virtual machine)
Linux kernel: Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1 x86_64 GNU/Linux
gcc version 4.7.2 (Debian 4.7.2-5)
glibc: ldd (Debian EGLIBC 2.13-38+deb7u6) 2.13
perf version 3.2.17

Can anybody help me? Thank you so much!
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Re: Error finding event LLC_REFERENCES in make test

Postby hiratz » Wed Mar 18, 2015 3:43 pm

When I upgrade glibc 2.13 to glibc 2.19, the error messages related o glibc disappeared. But the error still exists.

PAPI Error: Error finding event LLC_REFERENCES, it is used in derived event PAPI_L2_DCM.
*** Error in `ctests/zero': free(): invalid pointer: 0x000000000042f7fe ***
make: *** [test] Aborted
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Re: Error finding event LLC_REFERENCES in make test

Postby yarkhan » Wed Mar 18, 2015 4:28 pm

Hi,
I think that the first place I would look for problems is with the vmware setup.
There is a vmware component that needs to be configured and compiled into PAPI.
Look in src/components/vmware for information about how to use this component.

You should be configuring PAPI with some variant of
./configure --with-components="vmware"

The following notes are probably relevant to your situation.
VMware
* ESXi version must be 5.1 or higher.
* Virtual CPU Performance Counters must be enabled in the VM settings.
* Guest OS must be running Linux Kernel 2.6.32 or higher.
* Intel Nehalem Generation (Xeon Core i7) or later processor or AMD Opteron Generation 3 ("Greyhound") or later processor is installed.
* Intel VT-x or AMD-V is enabled in the BIOS so that hardware-assisted virtualization is possible.

If you are seeing problems, please send the output of the following utilities:
./papi_component_avail
./papi_avail
./papi_native_avail

Please send a message to the forum to let us know what happens.
Regards,
Asim
yarkhan
 
Posts: 12
Joined: Mon Aug 11, 2014 10:33 am

Re: Error finding event LLC_REFERENCES in make test

Postby hiratz » Fri Mar 20, 2015 12:54 pm

Hi Asim,
Sorry for a little late reply.

Before seeing your suggestions, I have updated my OS from deiban stable wheezy to debian testing jessie. So current machine information is as follows:

CPU: Intel Core i7 4770R (This processor supports Intel vt-x/vt-d and I have enabled it in BIOS) Architecture: Haswell
Vmware is Vmware workstation 11.1.0 build-2496824
Guest machine:
Processor number: 4
NOTE: the options state of cpu is as follows:
Preferred mode: Automatic
Disable acceleration for binary translation
(check box ia grayed and can't choose) Virtualize Intel VT-x/EPT or AMD-V/RVI
(check box ia grayed and can't choose) Vitrualize CPU performance counters
OS: Debian jessie
Linux kernel: 3.16.0-4-amd64
gcc version 4.9.2 (Debian 4.9.2-10)
glibc: ldd (Debian GLIBC 2.19-15) 2.19
perf version 3.16.0 (This time the perf is installed by installing linux-tools-3.16. Last time the installing was manually compiled from the perf source files in linux-source-3.2/tools/perf)

After seeing your suggestions, I run "./configure --with-components="vmware" and "make", then I get the following error messages:
Code: Select all
components/vmware/Rules.vmware:1: components/vmware/Makefile.vmware: No such file or directory
make: *** No rule to make target 'components/vmware/Makefile.vmware'.  Stop.


So I have to enter the directory ./component/vmware and read the installing file. As a result, the file says:
Code: Select all
Installation:
 12
 13 To make PAPI with the VMware component you must go to the PAPI_ROOT/papi/src/components/vmware directory and     configure with the flag: --with-vmware_incdir=<path>, where <path> is the path to the VMware Guest SDK for     your machine.
 14
 15 NOTE: The VMware Guest SDK is normally found in the following default vmware-tools path:
 16
 17     /usr/lib/vmware-tools/GuestSDK
 18
 19 or:
 20
 21     /opt/GuestSDK
 22
 23     e.g.: ./configure --with-vmware_incdir=/usr/lib/vmware-tools/GuestSDK
 24
 25
 26 After running configure in the vmware directory, go to PAPI_CVS_ROOT/papi/src and configure again using the     flag:
 27
 28     --with-components=vmware
 29
 30     e.g.: ./configure --with-components=vmware


However, I can't find the GuestSDK in /usr/lib/vmware-tools. So I look through the Vmware's website and found that it seems only vsphere has GuestSDK(https://www.vmware.com/support/pubs/sdk_pubs.html). But I indeed noticed the third item: VMware VIX API and this word "Compatible with VMware Workstation, ESXi, and vSphere.". I'm not sure whether this is the GuestSDK. So I have not installed it.

Next, I recompile papi without any options related to vmware and run "make test". The last error about LLC_REFERENCES disappered. Instead, another error message is:
Code: Select all
make[1]: Leaving directory '/root/tools/papi-5.4.1/src/ctests'
ctests/zero
test_utils.c                           FAILED
Line # 697
Error: Zero Counters Available!  PAPI Won't like this!


Makefile.inc:225: recipe for target 'test' failed
make: *** [test] Error 1


Then, I run ./papi_component_avail ./papi_avail ./papi_native_avail respectively. The output are as follows:

papi_component_avail
Code: Select all
Available components and hardware information.
--------------------------------------------------------------------------------
PAPI Version             : 5.4.1.0
Vendor string and code   : GenuineIntel (1)
Model string and code    : Intel(R) Core(TM) i7-4770R CPU @ 3.20GHz (70)
CPU Revision             : 1.000000
CPUID Info               : Family: 6  Model: 70  Stepping: 1
CPU Max Megahertz        : 3192
CPU Min Megahertz        : 3192
Hdw Threads per core     : 1
Cores per Socket         : 1
Sockets                  : 4
NUMA Nodes               : 1
CPUs per Node            : 4
Total CPUs               : 4
Running in a VM          : yes
VM Vendor:               : VMwareVMware
Number Hardware Counters : 0
Max Multiplex Counters   : 128
--------------------------------------------------------------------------------

Compiled-in components:
Name:   perf_event              Linux perf_event CPU counters
   \-> Disabled: sys_perf_event_open() failed, perf_event support for this platform may be broken
Name:   perf_event_uncore       Linux perf_event CPU uncore and northbridge
   \-> Disabled: No uncore PMUs or events found

Active components:

--------------------------------------------------------------------------------
component.c                             PASSED


papi_avail

Code: Select all
Available PAPI preset and user defined events plus hardware information.
--------------------------------------------------------------------------------
PAPI Version             : 5.4.1.0
Vendor string and code   : GenuineIntel (1)
Model string and code    : Intel(R) Core(TM) i7-4770R CPU @ 3.20GHz (70)
CPU Revision             : 1.000000
CPUID Info               : Family: 6  Model: 70  Stepping: 1
CPU Max Megahertz        : 3192
CPU Min Megahertz        : 3192
Hdw Threads per core     : 1
Cores per Socket         : 1
Sockets                  : 4
NUMA Nodes               : 1
CPUs per Node            : 4
Total CPUs               : 4
Running in a VM          : yes
VM Vendor:               : VMwareVMware
Number Hardware Counters : 0
Max Multiplex Counters   : 128
--------------------------------------------------------------------------------

================================================================================
  PAPI Preset Events
================================================================================
    Name        Code    Avail Deriv Description (Note)
PAPI_L1_DCM  0x80000000  No    No   Level 1 data cache misses
PAPI_L1_ICM  0x80000001  No    No   Level 1 instruction cache misses
PAPI_L2_DCM  0x80000002  No    No   Level 2 data cache misses
PAPI_L2_ICM  0x80000003  No    No   Level 2 instruction cache misses
PAPI_L3_DCM  0x80000004  No    No   Level 3 data cache misses
PAPI_L3_ICM  0x80000005  No    No   Level 3 instruction cache misses
PAPI_L1_TCM  0x80000006  No    No   Level 1 cache misses
PAPI_L2_TCM  0x80000007  No    No   Level 2 cache misses
PAPI_L3_TCM  0x80000008  No    No   Level 3 cache misses
PAPI_CA_SNP  0x80000009  No    No   Requests for a snoop
PAPI_CA_SHR  0x8000000a  No    No   Requests for exclusive access to shared cache line
PAPI_CA_CLN  0x8000000b  No    No   Requests for exclusive access to clean cache line
PAPI_CA_INV  0x8000000c  No    No   Requests for cache line invalidation
PAPI_CA_ITV  0x8000000d  No    No   Requests for cache line intervention
PAPI_L3_LDM  0x8000000e  No    No   Level 3 load misses
PAPI_L3_STM  0x8000000f  No    No   Level 3 store misses
PAPI_BRU_IDL 0x80000010  No    No   Cycles branch units are idle
PAPI_FXU_IDL 0x80000011  No    No   Cycles integer units are idle
PAPI_FPU_IDL 0x80000012  No    No   Cycles floating point units are idle
PAPI_LSU_IDL 0x80000013  No    No   Cycles load/store units are idle
PAPI_TLB_DM  0x80000014  No    No   Data translation lookaside buffer misses
PAPI_TLB_IM  0x80000015  No    No   Instruction translation lookaside buffer misses
PAPI_TLB_TL  0x80000016  No    No   Total translation lookaside buffer misses
PAPI_L1_LDM  0x80000017  No    No   Level 1 load misses
PAPI_L1_STM  0x80000018  No    No   Level 1 store misses
PAPI_L2_LDM  0x80000019  No    No   Level 2 load misses
PAPI_L2_STM  0x8000001a  No    No   Level 2 store misses
PAPI_BTAC_M  0x8000001b  No    No   Branch target address cache misses
PAPI_PRF_DM  0x8000001c  No    No   Data prefetch cache misses
PAPI_L3_DCH  0x8000001d  No    No   Level 3 data cache hits
PAPI_TLB_SD  0x8000001e  No    No   Translation lookaside buffer shootdowns
PAPI_CSR_FAL 0x8000001f  No    No   Failed store conditional instructions
PAPI_CSR_SUC 0x80000020  No    No   Successful store conditional instructions
PAPI_CSR_TOT 0x80000021  No    No   Total store conditional instructions                               [53/1910]
PAPI_MEM_SCY 0x80000022  No    No   Cycles Stalled Waiting for memory accesses
PAPI_MEM_RCY 0x80000023  No    No   Cycles Stalled Waiting for memory Reads
PAPI_MEM_WCY 0x80000024  No    No   Cycles Stalled Waiting for memory writes
PAPI_STL_ICY 0x80000025  No    No   Cycles with no instruction issue
PAPI_FUL_ICY 0x80000026  No    No   Cycles with maximum instruction issue
PAPI_STL_CCY 0x80000027  No    No   Cycles with no instructions completed
PAPI_FUL_CCY 0x80000028  No    No   Cycles with maximum instructions completed
PAPI_HW_INT  0x80000029  No    No   Hardware interrupts
PAPI_BR_UCN  0x8000002a  No    No   Unconditional branch instructions
PAPI_BR_CN   0x8000002b  No    No   Conditional branch instructions
PAPI_BR_TKN  0x8000002c  No    No   Conditional branch instructions taken
PAPI_BR_NTK  0x8000002d  No    No   Conditional branch instructions not taken
PAPI_BR_MSP  0x8000002e  No    No   Conditional branch instructions mispredicted
PAPI_BR_PRC  0x8000002f  No    No   Conditional branch instructions correctly predicted
PAPI_FMA_INS 0x80000030  No    No   FMA instructions completed
PAPI_TOT_IIS 0x80000031  No    No   Instructions issued
PAPI_TOT_INS 0x80000032  No    No   Instructions completed
PAPI_INT_INS 0x80000033  No    No   Integer instructions
PAPI_FP_INS  0x80000034  No    No   Floating point instructions
PAPI_LD_INS  0x80000035  No    No   Load instructions
PAPI_SR_INS  0x80000036  No    No   Store instructions
PAPI_BR_INS  0x80000037  No    No   Branch instructions
PAPI_VEC_INS 0x80000038  No    No   Vector/SIMD instructions (could include integer)
PAPI_RES_STL 0x80000039  No    No   Cycles stalled on any resource
PAPI_FP_STAL 0x8000003a  No    No   Cycles the FP unit(s) are stalled
PAPI_TOT_CYC 0x8000003b  No    No   Total cycles
PAPI_LST_INS 0x8000003c  No    No   Load/store instructions completed
PAPI_SYC_INS 0x8000003d  No    No   Synchronization instructions completed
PAPI_L1_DCH  0x8000003e  No    No   Level 1 data cache hits
PAPI_L2_DCH  0x8000003f  No    No   Level 2 data cache hits
PAPI_L1_DCA  0x80000040  No    No   Level 1 data cache accesses
PAPI_L2_DCA  0x80000041  No    No   Level 2 data cache accesses
PAPI_L3_DCA  0x80000042  No    No   Level 3 data cache accesses
PAPI_L1_DCR  0x80000043  No    No   Level 1 data cache reads                                           [19/1910]
PAPI_L2_DCR  0x80000044  No    No   Level 2 data cache reads
PAPI_L3_DCR  0x80000045  No    No   Level 3 data cache reads
PAPI_L1_DCW  0x80000046  No    No   Level 1 data cache writes
PAPI_L2_DCW  0x80000047  No    No   Level 2 data cache writes
PAPI_L3_DCW  0x80000048  No    No   Level 3 data cache writes
PAPI_L1_ICH  0x80000049  No    No   Level 1 instruction cache hits
PAPI_L2_ICH  0x8000004a  No    No   Level 2 instruction cache hits
PAPI_L3_ICH  0x8000004b  No    No   Level 3 instruction cache hits
PAPI_L1_ICA  0x8000004c  No    No   Level 1 instruction cache accesses
PAPI_L2_ICA  0x8000004d  No    No   Level 2 instruction cache accesses
PAPI_L3_ICA  0x8000004e  No    No   Level 3 instruction cache accesses
PAPI_L1_ICR  0x8000004f  No    No   Level 1 instruction cache reads
PAPI_L2_ICR  0x80000050  No    No   Level 2 instruction cache reads
PAPI_L3_ICR  0x80000051  No    No   Level 3 instruction cache reads
PAPI_L1_ICW  0x80000052  No    No   Level 1 instruction cache writes
PAPI_L2_ICW  0x80000053  No    No   Level 2 instruction cache writes
PAPI_L3_ICW  0x80000054  No    No   Level 3 instruction cache writes
PAPI_L1_TCH  0x80000055  No    No   Level 1 total cache hits
PAPI_L2_TCH  0x80000056  No    No   Level 2 total cache hits
PAPI_L3_TCH  0x80000057  No    No   Level 3 total cache hits
PAPI_L1_TCA  0x80000058  No    No   Level 1 total cache accesses
PAPI_L2_TCA  0x80000059  No    No   Level 2 total cache accesses
PAPI_L3_TCA  0x8000005a  No    No   Level 3 total cache accesses
PAPI_L1_TCR  0x8000005b  No    No   Level 1 total cache reads
PAPI_L2_TCR  0x8000005c  No    No   Level 2 total cache reads
PAPI_L3_TCR  0x8000005d  No    No   Level 3 total cache reads
PAPI_L1_TCW  0x8000005e  No    No   Level 1 total cache writes
PAPI_L2_TCW  0x8000005f  No    No   Level 2 total cache writes
PAPI_L3_TCW  0x80000060  No    No   Level 3 total cache writes
PAPI_FML_INS 0x80000061  No    No   Floating point multiply instructions
PAPI_FAD_INS 0x80000062  No    No   Floating point add instructions
PAPI_FDV_INS 0x80000063  No    No   Floating point divide instructions
PAPI_FSQ_INS 0x80000064  No    No   Floating point square root instructions
PAPI_FNV_INS 0x80000065  No    No   Floating point inverse instructions
PAPI_FP_OPS  0x80000066  No    No   Floating point operations
PAPI_SP_OPS  0x80000067  No    No   Floating point operations; optimized to count scaled single precision vector
 operations
PAPI_DP_OPS  0x80000068  No    No   Floating point operations; optimized to count scaled double precision vector
 operations
PAPI_VEC_SP  0x80000069  No    No   Single precision vector/SIMD instructions
PAPI_VEC_DP  0x8000006a  No    No   Double precision vector/SIMD instructions
PAPI_REF_CYC 0x8000006b  No    No   Reference clock cycles

================================================================================
  User Defined Events
================================================================================
    Name        Code    Avail Deriv Description (Note)
--------------------------------------------------------------------------------
Of 108 possible events, 0 are available, of which 0 are derived.

avail.c                                     PASSED


papi_native_avail

Code: Select all
Available native events and hardware information.
--------------------------------------------------------------------------------
PAPI Version             : 5.4.1.0
Vendor string and code   : GenuineIntel (1)
Model string and code    : Intel(R) Core(TM) i7-4770R CPU @ 3.20GHz (70)
CPU Revision             : 1.000000
CPUID Info               : Family: 6  Model: 70  Stepping: 1
CPU Max Megahertz        : 3192
CPU Min Megahertz        : 3192
Hdw Threads per core     : 1
Cores per Socket         : 1
Sockets                  : 4
NUMA Nodes               : 1
CPUs per Node            : 4
Total CPUs               : 4
Running in a VM          : yes
VM Vendor:               : VMwareVMware
Number Hardware Counters : 0
Max Multiplex Counters   : 128
--------------------------------------------------------------------------------


Total events reported: 0
native_avail.c                       PASSED
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Re: Error finding event LLC_REFERENCES in make test

Postby hiratz » Fri Mar 20, 2015 1:03 pm

Please note: I said "the third item" in my last reply which should be follow title "Guest Virtual Machines" immediately in the website I listed.

Acoording to the output of those three commands, apparently there are no avaiabley counters. So does that mean papi cannot be used in the vmware workstation? Must it be vmware vSphere?

On the other hand, though Intel Core i7 4770R is not a server processor but a desktop one, it should have PMU according to "https://software.intel.com/en-us/articles/intel-performance-counter-monitor"

So I guess the problem should lie in the Vmware, right?
Last edited by hiratz on Fri Mar 20, 2015 1:20 pm, edited 1 time in total.
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Re: Error finding event LLC_REFERENCES in make test

Postby hiratz » Fri Mar 20, 2015 1:38 pm

The output of "perf test":

Code: Select all
 1: vmlinux symtab matches kallsyms                        : FAILED!
 2: detect open syscall event                              : Ok
 3: detect open syscall event on all cpus                  : Ok
 4: read samples using the mmap interface                  : Ok
 5: parse events tests                                     :  Warning: [xen:xen_mmu_set_pte] function sizeof not
 defined
  Warning: [xen:xen_mmu_set_pte_atomic] function sizeof not defined
  Warning: [xen:xen_mmu_set_domain_pte] function sizeof not defined
  Warning: [xen:xen_mmu_set_pte_at] function sizeof not defined
  Warning: [xen:xen_mmu_set_pmd] function sizeof not defined
  Warning: [xen:xen_mmu_set_pud] function sizeof not defined
  Warning: [xen:xen_mmu_set_pgd] function sizeof not defined
  Warning: [xen:xen_mmu_ptep_modify_prot_start] function sizeof not defined
  Warning: [xen:xen_mmu_ptep_modify_prot_commit] function sizeof not defined
 FAILED!
 6: x86 rdpmc test                                         :Error: sys_perf_event_open() syscall returned with $1 (No such file or directory)
 FAILED!
 7: Validate PERF_RECORD_* events & perf_sample fields     : FAILED!
 8: Test perf pmu format parsing                           : Ok
 9: Test dso data read                                     : Ok
10: Test dso data cache                                    : Ok
11: Test dso data reopen                                   : Ok
12: roundtrip evsel->name check                            : Ok
13: Check parsing of sched tracepoints fields              : Ok
14: Generate and check syscalls:sys_enter_open event fields: Ok
15: struct perf_event_attr setup                           : Ok
16: Test matching and linking multiple hists               : Ok
17: Try 'use perf' in python, checking link problems       : FAILED!
18: Test breakpoint overflow signal handler                : Ok
19: Test breakpoint overflow sampling                      : Ok
20: Test number of exit event of a simple workload         : FAILED!
21: Test software clock events have valid period values    : Ok
22: Test converting perf time to TSC                       : FAILED!
23: Test object code reading                               : FAILED!
24: Test sample parsing                                    : Ok
25: Test using a dummy software event to keep tracking     : (not supported) Ok
26: Test parsing with no sample_id_all bit set             : Ok
27: Test dwarf unwind                                      : FAILED!
28: Test filtering hist entries                            : Ok
29: Test mmap thread lookup                                : Ok
30: Test thread mg sharing                                 : Ok
31: Test output sorting of hist entries                    : Ok
32: Test cumulation of child hist entries                  : Ok
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Re: Error finding event LLC_REFERENCES in make test

Postby yarkhan » Fri Mar 20, 2015 2:04 pm

It was just pointed out to me that there is a page on the PAPI wiki that deals with VMware.
http://icl.cs.utk.edu/projects/papi/wik ... _Platforms
Specifically, virtualized counters need to be enabled (see the wiki page above), which may explain why you are not seeing any counters yet.
..... On the Virtual Hardware tab, expand CPU and enable virtualized CPU performance counters.

Also, this page discusses performance on virtual machines.
http://icl.cs.utk.edu/projects/papi/wik ... erformance

For reference, this is the main page for the PAPI wiki.
http://icl.cs.utk.edu/projects/papi/wiki/Main_Page

Regards,
Asim
yarkhan
 
Posts: 12
Joined: Mon Aug 11, 2014 10:33 am

Re: Error finding event LLC_REFERENCES in make test

Postby hiratz » Sat Mar 21, 2015 7:32 am

Hi Asim,
Thank you for the key hint. After I enabled the virtualized CPU perfromance counters, the perf now can work normally. But papi is still not OK.

perf test
Code: Select all
1: vmlinux symtab matches kallsyms                        : FAILED!
 2: detect open syscall event                              : Ok
 3: detect open syscall event on all cpus                  : Ok
 4: read samples using the mmap interface                  : Ok
 5: parse events tests                                     :  Warning: [xen:xen_mmu_set_pte] function sizeof not
 defined
  Warning: [xen:xen_mmu_set_pte_atomic] function sizeof not defined
  Warning: [xen:xen_mmu_set_domain_pte] function sizeof not defined
  Warning: [xen:xen_mmu_set_pte_at] function sizeof not defined
  Warning: [xen:xen_mmu_set_pmd] function sizeof not defined
  Warning: [xen:xen_mmu_set_pud] function sizeof not defined
  Warning: [xen:xen_mmu_set_pgd] function sizeof not defined
  Warning: [xen:xen_mmu_ptep_modify_prot_start] function sizeof not defined
  Warning: [xen:xen_mmu_ptep_modify_prot_commit] function sizeof not defined
 Ok
 6: x86 rdpmc test                                         : Ok
 7: Validate PERF_RECORD_* events & perf_sample fields     : FAILED!
 8: Test perf pmu format parsing                           : Ok
 9: Test dso data read                                     : Ok
10: Test dso data cache                                    : Ok
11: Test dso data reopen                                   : Ok
12: roundtrip evsel->name check                            : Ok
13: Check parsing of sched tracepoints fields              : Ok
14: Generate and check syscalls:sys_enter_open event fields: Ok
15: struct perf_event_attr setup                           : Ok
16: Test matching and linking multiple hists               : Ok
17: Try 'use perf' in python, checking link problems       : FAILED!
18: Test breakpoint overflow signal handler                : Ok
19: Test breakpoint overflow sampling                      : Ok
20: Test number of exit event of a simple workload         : Ok
21: Test software clock events have valid period values    : Ok
22: Test converting perf time to TSC                       : Ok
23: Test object code reading                               : (no vmlinux) Ok
24: Test sample parsing                                    : Ok
25: Test using a dummy software event to keep tracking     : Ok
26: Test parsing with no sample_id_all bit set             : Ok
27: Test dwarf unwind                                      : FAILED!
28: Test filtering hist entries                            : Ok
29: Test mmap thread lookup                                : Ok
30: Test thread mg sharing                                 : Ok
31: Test output sorting of hist entries                    : Ok
32: Test cumulation of child hist entries                  : Ok


a simple test
Code: Select all
root@debian:~# perf stat ./test

 Performance counter stats for './test':

          2.409062      task-clock (msec)         #    0.724 CPUs utilized         
                 0      context-switches          #    0.000 K/sec                 
                 0      cpu-migrations            #    0.000 K/sec                 
                41      page-faults               #    0.017 M/sec                 
         2,335,011      cycles                    #    0.969 GHz                   
   <not supported>      stalled-cycles-frontend 
   <not supported>      stalled-cycles-backend   
         1,609,337      instructions              #    0.69  insns per cycle       
           277,058      branches                  #  115.007 M/sec                 
             3,692      branch-misses             #    1.33% of all branches       

       0.003328475 seconds time elapsed

root@debian:~# perf stat -e L1-icache-load-misses ./test

 Performance counter stats for './test':

             7,511      L1-icache-load-misses                                       

       0.003347774 seconds time elapsed


About this, does "<not supported>" mean my cpu can't support this event?

Then, I entered the src/components/vmware and run "./configure" without the option" --with-vmware_incdir=/usr/lib/vmware-tools/GuestSDK" becasue I have no GuestSDK, it is done normally and then I backed the directory "src", ran "./configure --with-components=vmware" and "make", the new errors appeared and the "make" failed.

Code: Select all
gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so.5.4.1.0 -Xlinker "-rpath" -Xlinker "/usr/local/lib" -Wl,-rpath-link -Wl,/root/tools/papi-5.4.1/src/libpfm4/lib -I. -g -DSTATIC_PAPI_EVENTS_TABLE -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS  -Wall -Ilibpfm4/include -Wextra -I -DVMGUESTLIB= -DVMWARE_INCDIR=\"\" -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -DPAPI_NO_MEMORY_MANAGEMENT x86_cpuid_info.c papi_libpfm4_events.c papi.c papi_internal.c papi_hl.c extras.c sw_multiplex.c papi_fwrappers.c papi_fwrappers_.c papi_fwrappers__.c upper_PAPI_FWRAPPERS.c threads.c cpus.c linux-memory.c linux-timer.c linux-common.c  papi_preset.c papi_vector.c papi_memory.c components/perf_event/perf_event.c components/perf_event/pe_libpfm4_events.c components/perf_event_uncore/perf_event_uncore.c components/perf_event_uncore/peu_libpfm4_events.c components/vmware/vmware.c  -o libpapi.so.5.4.1.0 -Bdynamic -L/root/tools/papi-5.4.1/src/libpfm4/lib -lpfm  -ldl
threads.c: In function ‘_papi_hwi_shutdown_global_threads’:
threads.c:461:16: warning: variable ‘our_tid’ set but not used [-Wunused-but-set-variable]
  unsigned long our_tid;
                ^
papi_preset.c: In function ‘papi_load_derived_events’:
papi_preset.c:1058:6: warning: variable ‘preset’ set but not used [-Wunused-but-set-variable]
  int preset = 0;
      ^
components/vmware/vmware.c:1264:24: error: ‘_vmware_init’ undeclared here (not in a function)
  .init_thread =        _vmware_init,
                        ^
components/vmware/vmware.c:292:12: warning: ‘use_guestlib’ defined but not used [-Wunused-variable]
 static int use_guestlib=0;
            ^
Makefile.inc:60: recipe for target 'libpapi.so.5.4.1.0' failed
make[1]: *** [libpapi.so.5.4.1.0] Error 1
make[1]: Leaving directory '/root/tools/papi-5.4.1/src'
Rules.pfm4_pe:41: recipe for target '/root/tools/papi-5.4.1/src/libpfm4/lib/libpfm.a' failed
make: *** [/root/tools/papi-5.4.1/src/libpfm4/lib/libpfm.a] Error 2


So is this error related to GuestSdk? I indeed can't find it. Or is it only available to vSphere rather than vmware Workstation?

I'm so confused and really appreciated your help.

yarkhan wrote:It was just pointed out to me that there is a page on the PAPI wiki that deals with VMware.
http://icl.cs.utk.edu/projects/papi/wik ... _Platforms
Specifically, virtualized counters need to be enabled (see the wiki page above), which may explain why you are not seeing any counters yet.
..... On the Virtual Hardware tab, expand CPU and enable virtualized CPU performance counters.

Also, this page discusses performance on virtual machines.
http://icl.cs.utk.edu/projects/papi/wik ... erformance

For reference, this is the main page for the PAPI wiki.
http://icl.cs.utk.edu/projects/papi/wiki/Main_Page

Regards,
Asim
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Re: Error finding event LLC_REFERENCES in make test

Postby yarkhan » Mon Mar 23, 2015 3:03 pm

Good to hear that you have had some progress here.

About your question
"does "<not supported>" mean my cpu can't support this event?"
I do not know. It may be that the event is not available through the virtual machine, or it is not supported on the cpu.
This stackoverflow link has some additional information for "not supported" events.
http://stackoverflow.com/questions/2271 ... -supported.


About your second problem compiling PAPI with the vmware component, the GuestSDK would be required since this error shows up.
"componrnts/vmware/vmware.c:1264:24: error: ‘_vmware_init’ undeclared here (not in a function)
.init_thread = _vmware_init,"
There is some information from the VMWare knowledge base that talks about installing the VMWare Tools.
General VMware Tools installation instructions (1014294)
http://kb.vmware.com/selfservice/search ... Id=1014294

The VMWare Tools should include the GuestSDK.

Hopefully this information will let you make some more progress.
Asim
yarkhan
 
Posts: 12
Joined: Mon Aug 11, 2014 10:33 am

Re: Error finding event LLC_REFERENCES in make test

Postby hiratz » Sat Mar 28, 2015 5:04 pm

Hi Asim,
There are a lot of significant progress. Many confusing facts are ignored and I must point them here in order to make others avoid such failures and go to the wrong road.

1 About GuestSDK. After I asked my friend in VMware, I eventually knew that the GuestSDK has been remove from the vmware-tools package long ago(I and my friend both don't know the reason.) and it now must be download independently. No one has told me about this fact even I posted a post in VMware's community forum. So I have to ask for my friend's help. Now I downloaded a GuestSDK from somewhere in Internet: VMware-GuestSDK-9.7.2-1919049.tar.gz. The reason why I don't download the latest version from official VMware website is that the download link is not available. The download request needs to be reviewed and the page gave a message which said my register profile must be updated and then the sdk can be downloaded, but after I updated my profile, it still can't be downloaded. So unlucky. If you are interested in trying it, see the download link:

https://developercenter.vmware.com/web/ ... here-guest

Moreover, my friend don't say the Guest SDK from vSphere is not suitable for VMware Workstation.

2 About the error "componrnts/vmware/vmware.c:1264:24: error: ‘_vmware_init’ undeclared here (not in a function)
.init_thread = _vmware_init,"
This is not related to Guest SDK or vmware tools. This is related to your "component/vmware/vmware.c". Specifically, in line 1264 of vmware.c:
Code: Select all
.init_thread =        _vmware_init,

There is no such a function called _vmware_init in this file. There is a function called _vmware_init_thread and I guess this is exactly the function which should be assigned to the .init_thread. So I changed this line into:
Code: Select all
.init_thread =        _vmware_init_thread

Then, this error disappeared. This is a bug, right?

3 About the include path of vmware component.
According to "components/vmware/VMwareComponentDocument.txt", the right configuration should be:
Code: Select all
./configure --with-vmware_incdir=/usr/lib/vmware-tools/GuestSDK

So I copy the directory of GuestSDK to /usr/lib/vmwre-tools. The GuestSDK contains the following directories:
Code: Select all
bin docs include lib vmGuestLibJava

The include and lib are what I need.

After I run "./configure --with-vmware_incdir=/usr/lib/vmware-tools/GuestSDK", I got the messages:
Code: Select all
checking for vmGuestLib.h... no
configure: WARNING: vmGuestLib.h not found

So I have to change the include path into "/usr/lib/vmware-tools/GuestSDK/include", then the configure found vmGuestLib.h.
Next, I backed to the "src" and ran "./configure --with-components=vmware" and "make", it finished normally. Then, I ran "make test", I got the following errors:
Code: Select all
gcc -I.. -I../testlib -I.. -g -DSTATIC_PAPI_EVENTS_TABLE -DPEINCLUDE="libpfm4/include/perfmon/perf_event.h" -D_R
EENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS  -Wall -Ilibpfm4/include -Wextra -I/usr/lib/vmware-tools/GuestSDK/incl
ude -DVMGUESTLIB=1 -DVMWARE_INCDIR="/usr/lib/vmware-tools/GuestSDK/include" -DPAPI_NO_MEMORY_MANAGEMENT -O0 api.
c ../testlib/libtestlib.a ../libpapi.a -ldl  -o api
make[1]: Leaving directory '/root/tools/papi-5.4.1/src/ctests'
ctests/zero
dlopen of libvmGuestLib.so failed: 'libvmtools.so: cannot open shared object file: No such file or directory'
dlopen of /usr/lib/vmware-tools/GuestSDK/include/lib/lib64/libvmGuestLib.so failed: '/usr/lib/vmware-tools/Guest
SDK/include/lib/lib64/libvmGuestLib.so: cannot open shared object file: No such file or directory'
dlopen of /usr/lib/vmware-tools/GuestSDK/include/lib/lib32/libvmGuestLib.so failed: '/usr/lib/vmware-tools/Guest
SDK/include/lib/lib32/libvmGuestLib.so: cannot open shared object file: No such file or directory'
Test case 0: start, stop.
-----------------------------------------------
Default domain is: 1 (PAPI_DOM_USER)

Apparently the vmware component of papi couldn't identify the right lib path of GuestSDK. So then I had to search all possible Makefiles related to vmware from multiple directories such "src" "ctests' and "testlib" and eventually found one, that is, "components/vmware/Makefile.vmware. I opened it and found the definitions:
Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/include
  2 VMGUESTLIB = 1

So I changed it into the following: (I tried multiple modifications):
Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK
  2 VMGUESTLIB = 1

Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/inlcude /usr/lib/vmware-tools/GuestSDK
  2 VMGUESTLIB = 1

Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/include /usr/lib/vmware-tools/GuestSDK/lib64
  2 VMGUESTLIB = 1

Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/include: /usr/lib/vmware-tools/GuestSDK/lib64
  2 VMGUESTLIB = 1

Code: Select all
VMWARE_INCDIR = /usr/lib/vmware-tools/GuestSDK/lib64
  2 VMGUESTLIB = 1

Unfortunately, none of them works. The errors still existed!
Next, I had to copy all the files in "include" and "lib/lib64" of GuestSDK to "GuestSDK". And I "make clean clobber" and reconfigured with"/usr/lib/vmware-tools/GuestSDK" and remake and make test. Thanks God, this error eventually disappeared!

BUT, BUT, new failure began to appear(Why are there so many failures and errors along with me?! Oh My God!)
Please see the following messages:
Code: Select all
EENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS  -Wall -Ilibpfm4/include -Wextra -I/usr/lib/vmware-tools/GuestSDK -DVM
GUESTLIB=1 -DVMWARE_INCDIR="/usr/lib/vmware-tools/GuestSDK" -DPAPI_NO_MEMORY_MANAGEMENT -O0 api.c ../testlib/lib
testlib.a ../libpapi.a -ldl  -o api
make[1]: Leaving directory '/root/tools/papi-5.4.1/src/ctests'
ctests/zero
UpdateInfo failed: VMware Guest API is not enabled on the host
Test case 0: start, stop.
-----------------------------------------------
Default domain is: 1 (PAPI_DOM_USER)
Default granularity is: 1 (PAPI_GRN_THR)
Using 20000000 iterations of c += a*b
-------------------------------------------------------------------------
Test type    :             1
PAPI_TOT_INS :      220000194
PAPI_TOT_CYC :      206748205
Real usec    :          59479
Real cycles  :      189893921
Virt usec    :          59526
Virt cycles  :      190006992
-------------------------------------------------------------------------
Verification: PAPI_TOT_CYC should be roughly real_cycles
NOTE: Not true if dynamic frequency scaling is enabled.
Verification: PAPI_FP_INS should be roughly 40000000
PAPI_TOT_INS Error of 450.00%
zero.c                                       FAILED
Line # 130
Error: FLOPS validation

Makefile.inc:225: recipe for target 'test' failed
make: *** [test] Error 1


Please pay attention to this word: "VMware Guest API is not enabled on the host". Only from this word, I can't judge whether it is related to PAPI or VMware Workstation. Now I have to stop because I really don't know anymore. This installation is really a tough process for me. I feel so tired...

The other topic, about
Code: Select all
<not supported>      stalled-cycles-frontend 
   <not supported>      stalled-cycles-backend

I saw your link and some other pages I found from google. No clear decisions and reasons are answered. Few people encounter this problem and fewer people care about this. The reason why I care about it so much is that my research area is microprocessor architecture. I also again installed my linux(The kernel is still 3.16) on bare metal machine and the "perf stat" still showed this "<not supported>". As a comparison, my roommate's linux on bare metal linux(kernel is 3.19) showed perfect support to the two non-architectural metrics. But his cpu is very old. So the only left possible reason may be my lower linux kernel version whose perf still can't support my new cpu architecture, that is, Haswell. I'll try the linux with 3.19 and if it still doesn't show support to my cpu, I will have to switch to other tools.

By the way, the installation of perf is also a tough process in order to make the "perf test" get all the pass. As of now, I have not sawn such "all pass" appears in all machines I can use, at least five machines including some advanced Intel Xeon Servers.

To be continued.

hiratz

yarkhan wrote:Good to hear that you have had some progress here.

About your question
"does "<not supported>" mean my cpu can't support this event?"
I do not know. It may be that the event is not available through the virtual machine, or it is not supported on the cpu.
This stackoverflow link has some additional information for "not supported" events.
http://stackoverflow.com/questions/2271 ... -supported.


About your second problem compiling PAPI with the vmware component, the GuestSDK would be required since this error shows up.
"componrnts/vmware/vmware.c:1264:24: error: ‘_vmware_init’ undeclared here (not in a function)
.init_thread = _vmware_init,"
There is some information from the VMWare knowledge base that talks about installing the VMWare Tools.
General VMware Tools installation instructions (1014294)
http://kb.vmware.com/selfservice/search ... Id=1014294

The VMWare Tools should include the GuestSDK.

Hopefully this information will let you make some more progress.
Asim
hiratz
 
Posts: 7
Joined: Wed Mar 18, 2015 1:52 pm

Next

Return to General discussion (read-only)

Who is online

Users browsing this forum: No registered users and 0 guests