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

Re: [Xen-devel] [PATCH v2 15/16] xenalyze: handle RTDS scheduler events



On 16/02/16 18:13, Dario Faggioli wrote:
> so the trace will show properly decoded info,
> rather than just a bunch of hex codes.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> ---
> Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
> Cc: Meng Xu <xumengpanda@xxxxxxxxx>
> Cc: Tianyang Chen <tiche@xxxxxxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> Cc: Olaf Hering <olaf@xxxxxxxxx>
> ---
> Changes from v1:
>  * '} * r =' turned into '} *r =', as requested
>    during review.
> ---
>  tools/xentrace/xenalyze.c |   59 
> +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
> 
> diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
> index 8f97f3a..dd21229 100644
> --- a/tools/xentrace/xenalyze.c
> +++ b/tools/xentrace/xenalyze.c
> @@ -7828,6 +7828,65 @@ void sched_process(struct pcpu_info *p)
>                         r->rq_avgload, r->b_avgload);
>              }
>              break;
> +        /* RTDS (TRC_RTDS_xxx) */
> +        case TRC_SCHED_CLASS_EVT(RTDS, 1): /* TICKLE           */
> +            if(opt.dump_all) {
> +                struct {
> +                    unsigned int cpu:16;
> +                } *r = (typeof(r))ri->d;
> +
> +                printf(" %s rtds:runq_tickle cpu %u\n",
> +                       ri->dump_header, r->cpu);
> +            }
> +            break;
> +        case TRC_SCHED_CLASS_EVT(RTDS, 2): /* RUNQ_PICK        */
> +            if(opt.dump_all) {
> +                struct {
> +                    unsigned int vcpuid:16, domid:16;
> +                    unsigned int cur_dl_lo, cur_dl_hi;
> +                    unsigned int cur_bg_lo, cur_bg_hi;
> +                } *r = (typeof(r))ri->d;
> +                uint64_t dl = (((uint64_t)r->cur_dl_hi) << 32) + 
> r->cur_dl_lo;
> +                uint64_t bg = (((uint64_t)r->cur_bg_hi) << 32) + 
> r->cur_bg_lo;

Why are you doing this, instead of just using uint64_t?

 -George


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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