[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] How to make tracking CPU cache-miss on Xen?


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Minjun Hong <nickeysgo@xxxxxxxxx>
  • Date: Mon, 11 Dec 2017 14:59:35 +0900
  • Delivery-date: Mon, 11 Dec 2017 05:59:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello, I'm working on the 'credit scheduler' of Xen.
And I need to compare CPU cache misses between original Xen and my patching version.
But I failed all attempt even if I have tried many methods by googling.
When I typed 'perf list' with my 'perf' compiled by source code in the current kernel source code, it said:

nickeys@nickeys-linux-machine:~/ubuntu/tools/perf$ ./perf list
List of pre-defined events (to be used in -e):
  msr/pperf/                                         [Kernel PMU event]
  msr/smi/                                           [Kernel PMU event]
  msr/tsc/                                           [Kernel PMU event]
  power/energy-cores/                                [Kernel PMU event]
  power/energy-gpu/                                  [Kernel PMU event]
  power/energy-pkg/                                  [Kernel PMU event]
  power/energy-psys/                                 [Kernel PMU event]
  power/energy-ram/                                  [Kernel PMU event]
  rNNN                                               [Raw hardware event descriptor]
  cpu/t1=v1[,t2=v2,t3 ...]/modifier                  [Raw hardware event descriptor]
   (see 'man perf-list' on how to encode it)
  mem:<addr>[/len][:access]                          [Hardware breakpoint]
nickeys@nickeys-linux-machine:~/ubuntu/tools/perf$ 


Since there is no HW event in contrast with native environment, I should try 'Raw hardware event descriptor' option.
According to 'Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3B: System Programming Guide', I used 'r412e' raw hardware event to get LLC Misses which is in '18.2.1.2 Pre-defined Architectural Performance Events' section of the guide,
but I found out my 'perf' does not support the feature:

nickeys@nickeys-linux-machine:~/ubuntu/tools/perf$ sudo ./perf stat -e r412e sleep 1
 Performance counter stats for 'sleep 1':
   <not supported>      r412e                                                       
       1.002120111 seconds time elapsed
nickeys@nickeys-linux-machine:~/ubuntu/tools/perf$

 I could not understand why I cannot find out the number of cache-misses. When I did googling, I did not think there would be a problem because there were a lot of posts to get cache-misses in the Xen environment.

Below is my PC configuration:

CPU: Intel Core i7-6700 
OS: Ubuntu 16.04 LTS
Kernel: 4.10.17 from 'linux.org'
Xen:  4.9.0
 
Is there any other way to get CPU cache-misses in Xen environment?
Thanks for your help!

Minjun Hong
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.