xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
	xen-devel@lists.xenproject.org
Cc: Olaf Hering <olaf@aepfle.de>
Subject: Re: [PATCH v2 04/16] xen: credit2: pack trace data better for xentrace_format
Date: Thu, 18 Feb 2016 11:10:14 +0000	[thread overview]
Message-ID: <56C5A696.1060109@citrix.com> (raw)
In-Reply-To: <20160216181136.27876.29825.stgit@Solace.station>

On 16/02/16 18:11, Dario Faggioli wrote:
> when tracing runstate changes, the vcpu and domain IDs
> are encoded in the lower and higher, respectively, parts
> of a 32 bits integer. When decoding a trace with
> xentrace_format, this makes it possible to display
> such events like this:
> 
> CPU0  833435853624 (+     768)  running_to_runnable [ dom:vcpu = 0x7fff0000 ]
> CPU0  833435854416 (+     792)  runnable_to_running [ dom:vcpu = 0x00000007 ]
> 
> For consistency, we should do the same when displaying
> the events coming from the Credit2 scheduler (when using
> the same tool), and to do that, we need to invert the
> order in which the fields are being put in the trace
> struct right now.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

I was going to say, "We should change xentrace_format and xenalyze in
lockstep", but it turns out that they don't support these trace records
yet!   I must have some patches to xenalyze in a local branch somewhere
that I never upstreamed properly.

So, all is well:

Acked-by: George Dunlap <george.dunlap@citrix.com>

> ---
> Cc: George Dunlap <george.dunlap@citrix.com>
> Cc: Olaf Hering <olaf@aepfle.de>
> ---
>  xen/common/sched_credit2.c |   16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index 78220a7..cf40f68 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -382,7 +382,7 @@ __update_svc_load(const struct scheduler *ops,
>  
>      {
>          struct {
> -            unsigned dom:16,vcpu:16;
> +            unsigned vcpu:16, dom:16;
>              unsigned v_avgload:32;
>          } d;
>          d.dom = svc->vcpu->domain->domain_id;
> @@ -450,7 +450,7 @@ runq_insert(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu *
>  
>      {
>          struct {
> -            unsigned dom:16,vcpu:16;
> +            unsigned vcpu:16, dom:16;
>              unsigned pos;
>          } d;
>          d.dom = svc->vcpu->domain->domain_id;
> @@ -536,7 +536,7 @@ runq_tickle(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu *
>  
>          /* TRACE */ {
>              struct {
> -                unsigned dom:16,vcpu:16;
> +                unsigned vcpu:16, dom:16;
>                  unsigned credit;
>              } d;
>              d.dom = cur->vcpu->domain->domain_id;
> @@ -561,9 +561,9 @@ tickle:
>  
>      /* TRACE */ {
>          struct {
> -            unsigned cpu:8;
> +            unsigned cpu:16, pad:16;
>          } d;
> -        d.cpu = ipid;
> +        d.cpu = ipid; d.pad = 0;
>          trace_var(TRC_CSCHED2_TICKLE, 0,
>                    sizeof(d),
>                    (unsigned char *)&d);
> @@ -634,7 +634,7 @@ static void reset_credit(const struct scheduler *ops, int cpu, s_time_t now,
>  
>          /* TRACE */ {
>              struct {
> -                unsigned dom:16,vcpu:16;
> +                unsigned vcpu:16, dom:16;
>                  unsigned credit_start, credit_end;
>                  unsigned multiplier;
>              } d;
> @@ -683,7 +683,7 @@ void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_vcpu *svc, s
>      /* TRACE */
>      {
>          struct {
> -            unsigned dom:16,vcpu:16;
> +            unsigned vcpu:16, dom:16;
>              unsigned credit;
>              int delta;
>          } d;
> @@ -812,7 +812,7 @@ __runq_assign(struct csched2_vcpu *svc, struct csched2_runqueue_data *rqd)
>      /* TRACE */
>      {
>          struct {
> -            unsigned dom:16,vcpu:16;
> +            unsigned vcpu:16, dom:16;
>              unsigned rqi:16;
>          } d;
>          d.dom = svc->vcpu->domain->domain_id;
> 

  reply	other threads:[~2016-02-18 11:10 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 18:11 [PATCH v2 00/16] Scheduling related tracing improvements Dario Faggioli
2016-02-16 18:11 ` [PATCH v2 01/16] xen: sched: __runq_tickle takes a useless cpu parameter Dario Faggioli
2016-02-18 10:33   ` George Dunlap
2016-02-16 18:11 ` [PATCH v2 02/16] xen: sched: move up the trace record for vcpu_wake and vcpu_sleep Dario Faggioli
2016-02-18 10:34   ` George Dunlap
2016-02-16 18:11 ` [PATCH v2 03/16] xen: sched: improve domain creation tracing Dario Faggioli
2016-02-18 11:04   ` George Dunlap
2016-02-24 11:21     ` Dario Faggioli
2016-02-24 11:52       ` Jan Beulich
2016-02-24 13:20         ` Dario Faggioli
2016-02-16 18:11 ` [PATCH v2 04/16] xen: credit2: pack trace data better for xentrace_format Dario Faggioli
2016-02-18 11:10   ` George Dunlap [this message]
2016-02-18 13:42     ` Dario Faggioli
2016-02-16 18:11 ` [PATCH v2 05/16] xen: RTDS: " Dario Faggioli
2016-02-18 11:12   ` George Dunlap
2016-02-18 14:43   ` Meng Xu
2016-02-16 18:11 ` [PATCH v2 06/16] xen: sched: tracing: enable TSC tracing for all events Dario Faggioli
2016-02-16 18:21   ` Meng Xu
2016-02-17  9:52     ` Dario Faggioli
2016-02-17 15:26       ` Meng Xu
2016-02-18 11:43       ` George Dunlap
2016-02-18 16:52         ` Dario Faggioli
2016-02-22 11:02           ` George Dunlap
2016-02-16 18:12 ` [PATCH v2 07/16] xentrace: formats: update format of scheduling events Dario Faggioli
2016-02-18 12:28   ` George Dunlap
2016-02-16 18:12 ` [PATCH v2 08/16] xentrace: formats: add events from Credit scheduler Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 09/16] xentrace: formats: add events from Credit2 scheduler Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 10/16] xentrace: formats: add events from RTDS scheduler Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 11/16] xentrace: formats: add domain create and destroy events Dario Faggioli
2016-02-16 18:12 ` [PATCH v2 12/16] xenalyze: handle scheduling events Dario Faggioli
2016-02-18 15:18   ` George Dunlap
2016-02-16 18:12 ` [PATCH v2 13/16] xenalyze: handle Credit1 scheduler events Dario Faggioli
2016-02-18 15:28   ` George Dunlap
2016-02-18 15:31   ` George Dunlap
2016-02-18 16:58     ` Dario Faggioli
2016-02-16 18:13 ` [PATCH v2 14/16] xenalyze: handle Credit2 " Dario Faggioli
2016-02-18 15:17   ` George Dunlap
2016-02-16 18:13 ` [PATCH v2 15/16] xenalyze: handle RTDS " Dario Faggioli
2016-02-18 15:28   ` George Dunlap
2016-02-18 17:02     ` Dario Faggioli
2016-02-18 17:06       ` George Dunlap
2016-02-18 17:10         ` Dario Faggioli
2016-02-16 18:13 ` [PATCH v2 16/16] xenalyze: handle DOM0 operaions events Dario Faggioli
2016-03-04 18:25 ` [PATCH v2 00/16] Scheduling related tracing improvements Dario Faggioli
2016-03-04 19:52   ` Konrad Rzeszutek Wilk
2016-03-07 10:50   ` Jan Beulich
2016-03-07 10:54     ` Wei Liu
2016-03-07 11:21       ` Jan Beulich
2016-03-07 11:27         ` Wei Liu
2016-03-07 14:21           ` Dario Faggioli
2016-03-07 15:36             ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56C5A696.1060109@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).