Thanks for your answer, George.

What I want ultimately is cache misses from the guest, but even I could not
get the cache misses from dom0 also.
That's why I'm confused as I know, it should be possible to get
cache-misses from dom0 (is it right??).
I already enabled CONFIG_XEN_HAVE_VPMU of current kernel to get cache
misses. Is there anything what I miss during Xen install?

Minjun Hong

On Mon, Dec 11, 2017 at 7:54 PM, George Dunlap <dunl...@umich.edu> wrote:

> On Mon, Dec 11, 2017 at 5:59 AM, Minjun Hong <nickey...@gmail.com> wrote:
> > 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.
>
> It sounds like what you might want is the vPMU functionality.  CC'ing
> Boris Ostrovsky, who has worked on vPMU functionality before.
>
> However, are you sure that you want to be reading cache misses from
> the guest?  It seems like that is *probably* OK, but another option
> would be to instrument Xen to read and provide that information.
>
>  -George
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to