Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Harry_L_
Beginner
152 Views

pcm-core.x error: Access to Intel(r) Performance Counter Monitor has denied (Unknown error).

Jump to solution

Hi,

I installed PCM 2.11 on an Ubuntu system with kernel 4.8.0. All PCM commands work fine except pcm-core.x. It complains that Access to Intel PCM had denied with "Unknown error". The message from pcm-core.x is listed below. I don't understand why all other PCM commands works fine except this one. Could someone help answer why and how to resolve the problem? 

Thanks in advance,

Harry

====================

root@perf104:/home/tools/IntelPerformanceCounterMonitor-V2.11# ./pcm-core.x

 Intel(r) Performance Counter Monitor: Core Monitoring Utility 

 Copyright (c) 2009-2016 Intel Corporation

Number of physical cores: 88
Number of logical cores: 88
Number of online logical cores: 88
Threads (logical cores) per physical core: 1
Num sockets: 4
Physical cores per socket: 22
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 8
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2200000000 Hz
Package thermal spec power: 150 Watt; Package minimum power: 62 Watt; Package maximum power: 330 Watt; 
Socket 0: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Socket 1: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Socket 2: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Socket 3: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Trying to use Linux perf events...
Linux Perf: Error on programming generic event #0 error: Invalid argument
Access to Intel(r) Performance Counter Monitor has denied (Unknown error).
Cleaning up
 Freeing up all RMIDs
root@perf104:/home/tools/IntelPerformanceCounterMonitor-V2.11# 

0 Kudos
1 Solution
Roman_D_Intel
Employee
152 Views

This is an error from perf API of Linux kernel.

As a workaround you can disable using perf API in PCM Makefile. Comment out the line with "CXXFLAGS += -DPCM_USE_PERF" and recompile.

Thanks,

Roman

View solution in original post

3 Replies
Roman_D_Intel
Employee
153 Views

This is an error from perf API of Linux kernel.

As a workaround you can disable using perf API in PCM Makefile. Comment out the line with "CXXFLAGS += -DPCM_USE_PERF" and recompile.

Thanks,

Roman

View solution in original post

Harry_L_
Beginner
152 Views

Thanks Roman, the workaround works well.

I have a follow up question. With the same configuration, I am trying to collect CPU_CLK_UNHALTED.REF_TSC event with following command line, but all output values are 0. I tried another event, cpu/umask=0x01,event=0x3C,name=CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY,any=1/, and it works well. Did I miss anything here?

Thanks,

Harry

root@perf104:/home/tools/IntelPerformanceCounterMonitor-V2.11# ./pcm-core.x  -e cpu/umask=0x03,event=0x00,name=CPU_CLK_UNHALTED.REF_TSC/ -e cpu/umask=0x01,event=0x3C,name=CPU_CLK_THREAD_UNHALTED.REF_XCLK/

 Intel(r) Performance Counter Monitor: Core Monitoring Utility 

 Copyright (c) 2009-2016 Intel Corporation

Number of physical cores: 88
Number of logical cores: 88
Number of online logical cores: 88
Threads (logical cores) per physical core: 1
Num sockets: 4
Physical cores per socket: 22
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 8
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2200000000 Hz
Package thermal spec power: 150 Watt; Package minimum power: 62 Watt; Package maximum power: 330 Watt; 
Socket 0: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Socket 1: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Socket 2: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
Socket 3: 2 memory controllers detected with total number of 8 channels. 3 QPI ports detected.
1: cpu
2: umask=0x03,event=0x00,name=CPU_CLK_UNHALTED.REF_TSC
1: cpu
2: umask=0x01,event=0x3C,name=CPU_CLK_THREAD_UNHALTED.REF_XCLK
Socket 0
Max QPI link 0 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 1 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 2 speed: 19.2 GBytes/second (9.6 GT/second)
Socket 1
Max QPI link 0 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 1 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 2 speed: 19.2 GBytes/second (9.6 GT/second)
Socket 2
Max QPI link 0 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 1 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 2 speed: 19.2 GBytes/second (9.6 GT/second)
Socket 3
Max QPI link 0 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 1 speed: 19.2 GBytes/second (9.6 GT/second)
Max QPI link 2 speed: 19.2 GBytes/second (9.6 GT/second)

Detected Intel(R) Xeon(R) CPU E7-8880 v4 @ 2.20GHz "Intel(r) microarchitecture codename Broadwell-EP"
Update every 1.0 seconds
Time elapsed: 1004 ms
txn_rate: 1
Event0: CPU_CLK_UNHALTED.REF_TSC (raw 0x430300)
Event1: CPU_CLK_THREAD_UNHALTED.REF_XCLK (raw 0x43013c)

Core | IPC | Instructions  |  Cycles  | Event0  | Event1  | Event2  | Event3 
   0   2.31        1207 M      523 M       0        26 M       0         0  
   1   0.31         223 K      727 K       0        60 K       0         0  
   2   0.44         142 K      320 K       0        26 K       0         0  
   3   0.42         100 K      242 K       0        20 K       0         0  
   4   0.36         173 K      476 K       0        39 K       0         0  
   5   0.40         156 K      395 K       0        32 K       0         0  
   6   0.52         102 K      198 K       0        16 K       0         0  

Roman_D_Intel
Employee
152 Views

There is a technical detail: this event (0x00) is measured on the fixed PMU counter (unfortunately pcm-core does not recognize it yet). As a workaround you manually add printing getRefCycles value (similar to getCycles) in print_custom_stats function. getRefCycles returns CPU_CLK_UNHALTED.REF_TSC event count.

Thanks,

Roman

Reply