xen/tools: tracing: Report next slice time when continuing as well as switching
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 1 Mar 2017 16:56:35 +0000 (16:56 +0000)
committerGeorge Dunlap <george.dunlap@citrix.com>
Wed, 1 Mar 2017 16:56:35 +0000 (16:56 +0000)
commitf462a9b3f1b8c87974ef81ec74d88eb879dfe54e
treea37fa111c8ac9577d4ce0995379db3955b31e8c8
parent21ba5e1167ae11b5590834a9ca9f9bf97d9e2d5d
xen/tools: tracing: Report next slice time when continuing as well as switching

We record trace information about the next timeslice when
switching to a different vcpu, but not when continuing to
run the same cpu:

 csched2:schedule cpu 9, rq# 1, idle, SMT idle, tickled
 csched2:runq_candidate d0v3, 0 vcpus skipped, cpu 9 was tickled
 sched_switch prev d32767v9, run for 991.186us
 sched_switch next d0v3, was runnable for 2.515us, next slice 10000.0us
 sched_switch prev d32767v9 next d0v3              ^^^^^^^^^^^^^^^^^^^^
 runstate_change d32767v9 running->runnable
 ...
 csched2:schedule cpu 2, rq# 0, busy, not tickled
 csched2:burn_credits d1v5, credit = 9996950, delta = 502913
 csched2:runq_candidate d1v5, 0 vcpus skipped, no cpu was tickled
 runstate_continue d1v5 running->running
                                         ?????????????

This information is quite useful; so add a trace including
that information on the 'continue_running' path as well,
like this:

 csched2:schedule cpu 1, rq# 0, busy, not tickled
 csched2:burn_credits d0v8, credit = 9998645, delta = 12104
 csched2:runq_candidate d0v8, credit = 9998645, 0 vcpus skipped, no cpu was tickled
 sched_switch continue d0v8, run for 1125.820us, next slice 9998.645us
 runstate_continue d0v8 running->running         ^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
tools/xentrace/formats
tools/xentrace/xenalyze.c
xen/common/schedule.c
xen/include/public/trace.h