perfc: count number of explicit vcpu yields
PATCH 1/1 perfc: count number of explicit vcpu yields
--- xen/common/schedule.c | 1 + xen/include/xen/perfc_defn.h | 1 + 2 files changed, 2 insertions(+)
xen/common/schedule.c +1 -0
@@ -896,6 +896,7 @@ long vcpu_yield(void)struct vcpu * v=current;spinlock_t *lock =vcpu_schedule_lock_irq (v); +SCHED_STAT_CRANK (sched_yield);SCHED_OP (VCPU2OP (v), yield, v);vcpu_schedule_unlock_irq (lock, v);
xen/include/xen/perfc_defn.h +1 -0
@@ -16,6 +16,7 @@ PERFCOUNTER(ipis, "#IPIs") PERFCOUNTER(sched_irq, "sched: timer") PERFCOUNTER(sched_run, "sched: runs through scheduler") PERFCOUNTER(sched_ctx, "sched: context switches") +PERFCOUNTER(sched_yield, "sched: vcpu yield") PERFCOUNTER(schedule, "sched: specific scheduler") PERFCOUNTER(dom_init, "sched: dom_init")PERFCOUNTER (dom_destroy,"sched: dom_destroy" )
Signature · 1 line
2.1.4
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 09.11.15 at 15:00, <[email protected]> wrote:
Signed-off-by Ian Campbell <[email protected]>
Quoted 1 line · Ian Campbell
Signed-off-by Ian Campbell <[email protected]>
Quoted 30 lines
--- xen/common/schedule.c | 1 + xen/include/xen/perfc_defn.h | 1 + 2 files changed, 2 insertions(+)xen/common/schedule.c +1
-0@@ -896,6 +896,7 @@ long vcpu_yield(void)struct vcpu * v=current;spinlock_t *lock =vcpu_schedule_lock_irq (v); +SCHED_STAT_CRANK (sched_yield);SCHED_OP (VCPU2OP (v), yield, v);vcpu_schedule_unlock_irq (lock, v);xen/include/xen/perfc_defn.h +1
-0@@ -16,6 +16,7 @@ PERFCOUNTER(ipis, "#IPIs") PERFCOUNTER(sched_irq, "sched: timer") PERFCOUNTER(sched_run, "sched: runs through scheduler") PERFCOUNTER(sched_ctx, "sched: context switches") +PERFCOUNTER(sched_yield, "sched: vcpu yield") PERFCOUNTER(schedule, "sched: specific scheduler") PERFCOUNTER(dom_init, "sched: dom_init")PERFCOUNTER (dom_destroy,"sched: dom_destroy" )
Quoted 2 lines · Ian Campbell
Signed-off-by Ian Campbell <[email protected]>
And, while we're here, I've been thinking since a while to try implementing an xl interface for these counters... How bad of an idea is that?
Is something like that possible already via Boris' PMU work?
Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 10 lines · Dario Faggioli
Quoted 2 lines · Ian Campbell
Signed-off-by Ian Campbell <[email protected]>Reviewed-by Dario Faggioli <[email protected]>And, while we're here, I've been thinking since a while to try implementing an xl interface for these counters... How bad of an idea is that?
Is something like that possible already via Boris' PMU work?
VPMU only covers CPU's hardware counters and this patch deals with software events in the hypervisor.
As far as xl accessibility --- doesn't xenperf already read them out?
-boris
Quoted 11 lines · Boris Ostrovsky
Quoted 10 lines · Dario Faggioli
Quoted 2 lines · Ian Campbell
Signed-off-by Ian Campbell <[email protected]>Reviewed-by Dario Faggioli <[email protected]>And, while we're here, I've been thinking since a while to try implementing an xl interface for these counters... How bad of an idea
is that?
Quoted 5 lines
Quoted 1 line
Is something like that possible already via Boris' PMU work?
VPMU only covers CPU's hardware counters and this patch deals with software events in the hypervisor.
Right, I just wanted to be sure (I've planned to familiarize with that work, but haven't got to doing it yet).
Quoted 2 lines
As far as xl accessibility --- doesn't xenperf already read them out?
Mmm... ISTR having tried without much luck, and having heard that it wasn't functional any longer, but maybe I'm confusing it with something else. I'll try again.
Thanks and Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Dario Faggioli
Quoted 2 lines
As far as xl accessibility --- doesn't xenperf already read them out?
Mmm... ISTR having tried without much luck, and having heard that it wasn't functional any longer, but maybe I'm confusing it with something else. I'll try again.
I happened to have an xterm with this in its scroll buffer from earlier:
root@marilith-n0:~# xenperf invalid hypercalls T= 0 0 0 0 0 trap: wfi T= 85068 56068 11762 8461 8777 trap: wfe T= 2811 614 716 964 517 trap: cp15 32-bit access T= 4 1 1 1 1 trap: cp15 64-bit access T= 0 0 0 0 0 trap: cp14 32-bit access T= 0 0 0 0 0 trap: cp14 64-bit access T= 0 0 0 0 0 trap: cp14 dbg access T= 0 0 0 0 0 trap: cp access T= 0 0 0 0 0 trap: 32-bit smc T= 0 0 0 0 0 trap: 32-bit hvc T= 1291 510 568 161 52 trap: guest instr abort T= 0 0 0 0 0 trap: guest data abort T= 16446 6885 4358 3431 1772 trap: condition failed T= 0 0 0 0 0 [...]
So I think it works.
You need to build the hypervisor binary with perfc=y (and optionally perfc_arrays=y) or it doesn't do anything.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 45 lines · Ian Campbell
Quoted 9 lines · Dario Faggioli
Quoted 4 lines
As far as xl accessibility --- doesn't xenperf already read them out?
Mmm... ISTR having tried without much luck, and having heard that it
wasn't functional any longer, but maybe I'm confusing it with something
else. I'll try again.I happened to have an xterm with this in its scroll buffer from earlier:
root@marilith-n0:~# xenperf invalid hypercalls T= 0 0 0 0 0 trap: wfi T= 85068 56068 11762 8461 8777 trap: wfe T= 2811 614 716 964 517 trap: cp15 32-bit access T= 4 1 1 1 1 trap: cp15 64-bit access T= 0 0 0 0 0 trap: cp14 32-bit access T= 0 0 0 0 0 trap: cp14 64-bit access T= 0 0 0 0 0 trap: cp14 dbg access T= 0 0 0 0 0 trap: cp access T= 0 0 0 0 0 trap: 32-bit smc T= 0 0 0 0 0 trap: 32-bit hvc T= 1291 510 568 161 52 trap: guest instr abort T= 0 0 0 0 0 trap: guest data abort T= 16446 6885 4358 3431 1772 trap: condition failed T= 0 0 0 0 0 [...]
Quoted 2 lines
So I think it works.
Ok, thanks for the confirmation, and sorry for the noise then.
Quoted 3 lines
You need to build the hypervisor binary with perfc=y (and optionally perfc_arrays=y) or it doesn't do anything.
Yeah, that I knew.
Thanks again and Regards,
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 46 lines · Dario Faggioli
Quoted 45 lines · Ian Campbell
Quoted 9 lines · Dario Faggioli
Quoted 4 lines
As far as xl accessibility --- doesn't xenperf already read them out?
Mmm... ISTR having tried without much luck, and having heard that it
wasn't functional any longer, but maybe I'm confusing it with something
else. I'll try again.I happened to have an xterm with this in its scroll buffer from earlier:
root@marilith-n0:~# xenperf invalid hypercalls T= 0 0 0 0 0 trap: wfi T= 85068 56068 11762 8461 8777 trap: wfe T= 2811 614 716 964 517 trap: cp15 32-bit access T= 4 1 1 1 1 trap: cp15 64-bit access T= 0 0 0 0 0 trap: cp14 32-bit access T= 0 0 0 0 0 trap: cp14 64-bit access T= 0 0 0 0 0 trap: cp14 dbg access T= 0 0 0 0 0 trap: cp access T= 0 0 0 0 0 trap: 32-bit smc T= 0 0 0 0 0 trap: 32-bit hvc T= 1291 510 568 161 52 trap: guest instr abort T= 0 0 0 0 0 trap: guest data abort T= 16446 6885 4358 3431 1772 trap: condition failed T= 0 0 0 0 0 [...]
Quoted 8 lines
Quoted 2 lines
So I think it works.
Ok, thanks for the confirmation, and sorry for the noise then.
Quoted 3 lines
You need to build the hypervisor binary with perfc=y (and optionally perfc_arrays=y) or it doesn't do anything.
Yeah, that I knew.
And you need to apply an patch this patch for x86:
http://lists.xen.org/archives/html/xen-devel/2015-11/msg00633.html
since the lock_profile also adds tons of data in the 'struct spinlock' making the 'struct domain' bigger than 4K (to 68K!).
Quoted 16 lines
Thanks again and Regards,
DarioSignature · 12 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel