[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 10/24] xen: tracing: improve Credit2's tickle_check and burn_credits records
In both Credit2's trace records relative to checking whether we want to preempt a vcpu (in runq_tickle()), and to credits being burn, make it explicit on which pcpu the vcpu being considered is running. Such information isn't currently available, not even by looking at on which pcpu the events happen, as we do both the above operation from a certain pcpu on vcpus running on different pcpus. Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> --- Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/xentrace/formats | 4 ++-- tools/xentrace/xenalyze.c | 15 +++++++++------ xen/common/sched_credit2.c | 6 ++++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tools/xentrace/formats b/tools/xentrace/formats index 0de7990..adff681 100644 --- a/tools/xentrace/formats +++ b/tools/xentrace/formats @@ -45,9 +45,9 @@ 0x00022201 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tick 0x00022202 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:runq_pos [ dom:vcpu = 0x%(1)08x, pos = %(2)d] -0x00022203 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit burn [ dom:vcpu = 0x%(1)08x, credit = %(2)d, delta = %(3)d ] +0x00022203 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit burn [ dom:vcpu = 0x%(1)08x, cpu = %(3)d, credit = %(2)d, delta = %(4)d ] 0x00022204 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit_add -0x00022205 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle_check [ dom:vcpu = 0x%(1)08x, credit = %(2)d ] +0x00022205 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle_check [ dom:vcpu = 0x%(1)08x, cpu = %(2)d, credit = %(3)d ] 0x00022206 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:tickle [ cpu = %(1)d ] 0x00022207 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:credit_reset [ dom:vcpu = 0x%(1)08x, cr_start = %(2)d, cr_end = %(3)d, mult = %(4)d ] 0x00022208 CPU%(cpu)d %(tsc)d (+%(reltsc)8d) csched2:sched_tasklet diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 0b697d0..58a8d41 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -7607,24 +7607,27 @@ void sched_process(struct pcpu_info *p) case TRC_SCHED_CLASS_EVT(CSCHED2, 3): /* CREDIT_BURN */ if(opt.dump_all) { struct { - unsigned int vcpuid:16, domid:16, credit; + unsigned int vcpuid:16, domid:16, credit, cpu; int delta; } *r = (typeof(r))ri->d; - printf(" %s csched2:burn_credits d%uv%u, credit = %u, delta = %d\n", + printf(" %s csched2:burn_credits d%uv%u, " + "on cpu = %u, credit = %u, delta = %d\n", ri->dump_header, r->domid, r->vcpuid, - r->credit, r->delta); + r->cpu, r->credit, r->delta); } break; case TRC_SCHED_CLASS_EVT(CSCHED2, 5): /* TICKLE_CHECK */ if(opt.dump_all) { struct { unsigned int vcpuid:16, domid:16; - unsigned int credit; + unsigned int cpu, credit; } *r = (typeof(r))ri->d; - printf(" %s csched2:tickle_check d%uv%u, credit = %u\n", - ri->dump_header, r->domid, r->vcpuid, r->credit); + printf(" %s csched2:tickle_check d%uv%u, " + "on cpu = %u, credits = %u\n", + ri->dump_header, r->domid, r->vcpuid, + r->cpu, r->credit); } break; case TRC_SCHED_CLASS_EVT(CSCHED2, 6): /* TICKLE */ diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 164296b..c8396a8 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -1027,11 +1027,12 @@ runq_tickle(const struct scheduler *ops, struct csched2_vcpu *new, s_time_t now) { struct { unsigned vcpu:16, dom:16; - unsigned credit; + unsigned cpu, credit; } d; d.dom = cur->vcpu->domain->domain_id; d.vcpu = cur->vcpu->vcpu_id; d.credit = cur->credit; + d.cpu = i; __trace_var(TRC_CSCHED2_TICKLE_CHECK, 1, sizeof(d), (unsigned char *)&d); @@ -1181,12 +1182,13 @@ void burn_credits(struct csched2_runqueue_data *rqd, { struct { unsigned vcpu:16, dom:16; - unsigned credit; + unsigned credit, cpu; int delta; } d; d.dom = svc->vcpu->domain->domain_id; d.vcpu = svc->vcpu->vcpu_id; d.credit = svc->credit; + d.cpu = svc->vcpu->processor; d.delta = delta; __trace_var(TRC_CSCHED2_CREDIT_BURN, 1, sizeof(d), _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |