xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] xen: more scheduler tracing improvement
@ 2016-03-12 11:33 Dario Faggioli
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-12 11:33 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Ian Jackson, Meng Xu, Wei Liu

Hi,

this is what remained uncommitted of these other series:

 "Scheduling related tracing improvements"
 v1: http://lists.xenproject.org/archives/html/xen-devel/2016-02/msg01016.html
 v2: http://lists.xenproject.org/archives/html/xen-devel/2016-02/msg02233.html

What is patch 1 here, was there already in v2 of the previous submission, but
it did not got reviewed.

What is patch 2 here, was not there before. George suggested doing it, to do
better what is done in what is patch 3 here (which was there before, in a
slightly different form).

Thanks and Regards,
Dario
---
Dario Faggioli (3):
      xenalyze: handle DOM0 operaions events
      xen: sched RTDS: use uint64_t for tracing time values
      xenalyze: handle RTDS scheduler events

 tools/xentrace/xenalyze.c |   78 +++++++++++++++++++++++++++++++++++++++++++++
 xen/common/sched_rt.c     |   30 ++++++-----------
 2 files changed, 89 insertions(+), 19 deletions(-)
--
<<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
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/3] xenalyze: handle DOM0 operaions events
  2016-03-12 11:33 [PATCH 0/3] xen: more scheduler tracing improvement Dario Faggioli
@ 2016-03-12 11:33 ` Dario Faggioli
  2016-03-12 14:35   ` Wei Liu
                     ` (3 more replies)
  2016-03-12 11:34 ` [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values Dario Faggioli
  2016-03-12 11:34 ` [PATCH 3/3] xenalyze: handle RTDS scheduler events Dario Faggioli
  2 siblings, 4 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-12 11:33 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Wei Liu, Ian Jackson

(i.e., domain creation and destruction) so the
trace will show properly decoded info, rather
than just a bunch of hex codes.
---
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
Changes from v1:
 * new patch in the series.
---
 tools/xentrace/xenalyze.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index d4a5b0c..353bed7 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p)
     }
 
 }
+
+#define TRC_DOM0_SUB_DOMOPS 1
+void dom0_process(struct pcpu_info *p)
+{
+    struct record_info *ri = &p->ri;
+
+    switch(ri->evt.sub)
+    {
+    case TRC_DOM0_SUB_DOMOPS:
+        if(opt.dump_all) {
+            struct {
+                unsigned int domid;
+            } *r = (typeof(r))ri->d;
+
+        printf(" %s %s domain d%u\n", ri->dump_header,
+               ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying",
+               r->domid);
+        }
+        break;
+    default:
+        process_generic(&p->ri);
+    }
+}
+
 /* ---- Base ----- */
 void dump_generic(FILE * f, struct record_info *ri)
 {
@@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) {
             hw_process(p);
             break;
         case TRC_DOM0OP_MAIN:
+            dom0_process(p);
+            break;
         default:
             process_generic(ri);
         }


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values
  2016-03-12 11:33 [PATCH 0/3] xen: more scheduler tracing improvement Dario Faggioli
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
@ 2016-03-12 11:34 ` Dario Faggioli
  2016-03-12 15:05   ` Meng Xu
  2016-03-14  9:07   ` Jan Beulich
  2016-03-12 11:34 ` [PATCH 3/3] xenalyze: handle RTDS scheduler events Dario Faggioli
  2 siblings, 2 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-12 11:34 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Meng Xu

such as deadline and budget. Packing is necessary to make
it possible for xentrace_format to properly interpreet the
records.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Meng Xu <mengxu@cis.upenn.edu>
---
 xen/common/sched_rt.c |   30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
index bfed2e2..8e51abe 100644
--- a/xen/common/sched_rt.c
+++ b/xen/common/sched_rt.c
@@ -361,17 +361,14 @@ rt_update_deadline(s_time_t now, struct rt_vcpu *svc)
 
     /* TRACE */
     {
-        struct {
+        struct __packed {
             unsigned vcpu:16, dom:16;
-            unsigned cur_deadline_lo, cur_deadline_hi;
-            unsigned cur_budget_lo, cur_budget_hi;
+            uint64_t cur_deadline, cur_budget;
         } d;
         d.dom = svc->vcpu->domain->domain_id;
         d.vcpu = svc->vcpu->vcpu_id;
-        d.cur_deadline_lo = (unsigned) svc->cur_deadline;
-        d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32);
-        d.cur_budget_lo = (unsigned) svc->cur_budget;
-        d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
+        d.cur_deadline = (uint64_t) svc->cur_deadline;
+        d.cur_budget = (uint64_t) svc->cur_budget;
         trace_var(TRC_RTDS_BUDGET_REPLENISH, 1,
                   sizeof(d),
                   (unsigned char *) &d);
@@ -711,16 +708,14 @@ burn_budget(const struct scheduler *ops, struct rt_vcpu *svc, s_time_t now)
 
     /* TRACE */
     {
-        struct {
+        struct __packed {
             unsigned vcpu:16, dom:16;
-            unsigned cur_budget_lo;
-            unsigned cur_budget_hi;
+            uint64_t cur_budget;
             int delta;
         } d;
         d.dom = svc->vcpu->domain->domain_id;
         d.vcpu = svc->vcpu->vcpu_id;
-        d.cur_budget_lo = (unsigned) svc->cur_budget;
-        d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
+        d.cur_budget = (uint64_t) svc->cur_budget;
         d.delta = delta;
         trace_var(TRC_RTDS_BUDGET_BURN, 1,
                   sizeof(d),
@@ -763,17 +758,14 @@ __runq_pick(const struct scheduler *ops, const cpumask_t *mask)
     {
         if( svc != NULL )
         {
-            struct {
+            struct __packed {
                 unsigned vcpu:16, dom:16;
-                unsigned cur_deadline_lo, cur_deadline_hi;
-                unsigned cur_budget_lo, cur_budget_hi;
+                uint64_t cur_deadline, cur_budget;
             } d;
             d.dom = svc->vcpu->domain->domain_id;
             d.vcpu = svc->vcpu->vcpu_id;
-            d.cur_deadline_lo = (unsigned) svc->cur_deadline;
-            d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32);
-            d.cur_budget_lo = (unsigned) svc->cur_budget;
-            d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
+            d.cur_deadline = (uint64_t) svc->cur_deadline;
+            d.cur_budget = (uint64_t) svc->cur_budget;
             trace_var(TRC_RTDS_RUNQ_PICK, 1,
                       sizeof(d),
                       (unsigned char *) &d);


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/3] xenalyze: handle RTDS scheduler events
  2016-03-12 11:33 [PATCH 0/3] xen: more scheduler tracing improvement Dario Faggioli
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
  2016-03-12 11:34 ` [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values Dario Faggioli
@ 2016-03-12 11:34 ` Dario Faggioli
  2016-03-12 15:14   ` Meng Xu
  2016-03-23 12:36   ` George Dunlap
  2 siblings, 2 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-12 11:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, George Dunlap, Tianyang Chen, Ian Jackson, Meng Xu

so the trace will show properly decoded info,
rather than just a bunch of hex codes.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
Cc: George Dunlap <george.dunlap@eu.citrix.com>
Cc: Meng Xu <xumengpanda@gmail.com>
Cc: Tianyang Chen <tiche@seas.upenn.edu>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes from v2:
 * use 64 bits ints for time values (now that the scheduler
   does that too), as suggested during review.

Changes from v1:
 * '} * r =' turned into '} *r =', as requested
   during review.
---
 tools/xentrace/xenalyze.c |   52 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index 353bed7..b949986 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -7823,6 +7823,58 @@ 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;
+                    uint64_t cur_dl, cur_bg;
+                } __attribute__((packed)) *r = (typeof(r))ri->d;
+
+                printf(" %s rtds:runq_pick d%uv%u, deadline = %"PRIu64", "
+                       "budget = %"PRIu64"\n", ri->dump_header,
+                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg);
+            }
+            break;
+        case TRC_SCHED_CLASS_EVT(RTDS, 3): /* BUDGET_BURN      */
+            if(opt.dump_all) {
+                struct {
+                    unsigned int vcpuid:16, domid:16;
+                    uint64_t cur_bg;
+                    int delta;
+                } __attribute__((packed)) *r = (typeof(r))ri->d;
+
+                printf(" %s rtds:burn_budget d%uv%u, budget = %"PRIu64", "
+                       "delta = %d\n", ri->dump_header, r->domid,
+                       r->vcpuid, r->cur_bg, r->delta);
+            }
+            break;
+        case TRC_SCHED_CLASS_EVT(RTDS, 4): /* BUDGET_REPLENISH */
+            if(opt.dump_all) {
+                struct {
+                    unsigned int vcpuid:16, domid:16;
+                    uint64_t cur_dl, cur_bg;
+                } __attribute__((packed)) *r = (typeof(r))ri->d;
+
+                printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", "
+                       "budget = %"PRIu64"\n", ri->dump_header,
+                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg);
+            }
+            break;
+        case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET    */
+            if(opt.dump_all)
+                printf(" %s rtds:sched_tasklet\n", ri->dump_header);
+            break;
         default:
             process_generic(ri);
         }


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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
@ 2016-03-12 14:35   ` Wei Liu
  2016-03-14 14:06   ` Konrad Rzeszutek Wilk
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Wei Liu @ 2016-03-12 14:35 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: George Dunlap, xen-devel, Ian Jackson, Wei Liu

Typo in email title "operaions".

Wei.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values
  2016-03-12 11:34 ` [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values Dario Faggioli
@ 2016-03-12 15:05   ` Meng Xu
  2016-03-14  9:07   ` Jan Beulich
  1 sibling, 0 replies; 17+ messages in thread
From: Meng Xu @ 2016-03-12 15:05 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: George Dunlap, xen-devel

On Sat, Mar 12, 2016 at 6:34 AM, Dario Faggioli
<dario.faggioli@citrix.com> wrote:
> such as deadline and budget. Packing is necessary to make
> it possible for xentrace_format to properly interpreet the
> records.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> ---
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Meng Xu <mengxu@cis.upenn.edu>
> ---

Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>

-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/3] xenalyze: handle RTDS scheduler events
  2016-03-12 11:34 ` [PATCH 3/3] xenalyze: handle RTDS scheduler events Dario Faggioli
@ 2016-03-12 15:14   ` Meng Xu
  2016-03-23 12:36   ` George Dunlap
  1 sibling, 0 replies; 17+ messages in thread
From: Meng Xu @ 2016-03-12 15:14 UTC (permalink / raw)
  To: Dario Faggioli
  Cc: Wei Liu, George Dunlap, Tianyang Chen, Ian Jackson, xen-devel

On Sat, Mar 12, 2016 at 6:34 AM, Dario Faggioli
<dario.faggioli@citrix.com> wrote:
> so the trace will show properly decoded info,
> rather than just a bunch of hex codes.
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Meng Xu <xumengpanda@gmail.com>
> Cc: Tianyang Chen <tiche@seas.upenn.edu>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Changes from v2:
>  * use 64 bits ints for time values (now that the scheduler
>    does that too), as suggested during review.
>
> Changes from v1:
>  * '} * r =' turned into '} *r =', as requested
>    during review.
> ---

Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>

Thanks,

-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
http://www.cis.upenn.edu/~mengxu/

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values
  2016-03-12 11:34 ` [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values Dario Faggioli
  2016-03-12 15:05   ` Meng Xu
@ 2016-03-14  9:07   ` Jan Beulich
  2016-03-16 16:38     ` Dario Faggioli
  1 sibling, 1 reply; 17+ messages in thread
From: Jan Beulich @ 2016-03-14  9:07 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: George Dunlap, xen-devel, Meng Xu

>>> On 12.03.16 at 12:34, <dario.faggioli@citrix.com> wrote:
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -361,17 +361,14 @@ rt_update_deadline(s_time_t now, struct rt_vcpu *svc)
>  
>      /* TRACE */
>      {
> -        struct {
> +        struct __packed {
>              unsigned vcpu:16, dom:16;
> -            unsigned cur_deadline_lo, cur_deadline_hi;
> -            unsigned cur_budget_lo, cur_budget_hi;
> +            uint64_t cur_deadline, cur_budget;
>          } d;
>          d.dom = svc->vcpu->domain->domain_id;
>          d.vcpu = svc->vcpu->vcpu_id;
> -        d.cur_deadline_lo = (unsigned) svc->cur_deadline;
> -        d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32);
> -        d.cur_budget_lo = (unsigned) svc->cur_budget;
> -        d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
> +        d.cur_deadline = (uint64_t) svc->cur_deadline;
> +        d.cur_budget = (uint64_t) svc->cur_budget;

I don't see the need for these cast (and similar ones further down),
but you're the maintainer, so you know ...

Jan


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
  2016-03-12 14:35   ` Wei Liu
@ 2016-03-14 14:06   ` Konrad Rzeszutek Wilk
  2016-03-14 14:11     ` Dario Faggioli
  2016-03-16 16:37   ` [PATCH 1/3 v2] xenalyze: handle DOM0 operations events Dario Faggioli
  2016-03-23 12:35   ` [PATCH 1/3] xenalyze: handle DOM0 operaions events George Dunlap
  3 siblings, 1 reply; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-03-14 14:06 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: George Dunlap, xen-devel, Ian Jackson, Wei Liu

On Sat, Mar 12, 2016 at 12:33:57PM +0100, Dario Faggioli wrote:
> (i.e., domain creation and destruction) so the
> trace will show properly decoded info, rather
> than just a bunch of hex codes.

Weirdly you also lost your SoB.

> ---
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> Changes from v1:
>  * new patch in the series.
> ---
>  tools/xentrace/xenalyze.c |   26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
> index d4a5b0c..353bed7 100644
> --- a/tools/xentrace/xenalyze.c
> +++ b/tools/xentrace/xenalyze.c
> @@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p)
>      }
>  
>  }
> +
> +#define TRC_DOM0_SUB_DOMOPS 1
> +void dom0_process(struct pcpu_info *p)
> +{
> +    struct record_info *ri = &p->ri;
> +
> +    switch(ri->evt.sub)
> +    {
> +    case TRC_DOM0_SUB_DOMOPS:
> +        if(opt.dump_all) {
> +            struct {
> +                unsigned int domid;
> +            } *r = (typeof(r))ri->d;
> +
> +        printf(" %s %s domain d%u\n", ri->dump_header,
> +               ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying",
> +               r->domid);
> +        }
> +        break;
> +    default:
> +        process_generic(&p->ri);
> +    }
> +}
> +
>  /* ---- Base ----- */
>  void dump_generic(FILE * f, struct record_info *ri)
>  {
> @@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) {
>              hw_process(p);
>              break;
>          case TRC_DOM0OP_MAIN:
> +            dom0_process(p);
> +            break;
>          default:
>              process_generic(ri);
>          }
> 

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events
  2016-03-14 14:06   ` Konrad Rzeszutek Wilk
@ 2016-03-14 14:11     ` Dario Faggioli
  0 siblings, 0 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-14 14:11 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: George Dunlap, xen-devel, Ian Jackson, Wei Liu


[-- Attachment #1.1: Type: text/plain, Size: 703 bytes --]

On Mon, 2016-03-14 at 10:06 -0400, Konrad Rzeszutek Wilk wrote:
> On Sat, Mar 12, 2016 at 12:33:57PM +0100, Dario Faggioli wrote:
> > 
> > (i.e., domain creation and destruction) so the
> > trace will show properly decoded info, rather
> > than just a bunch of hex codes.
> Weirdly you also lost your SoB.
> 
So, typo in subject and no SoB... What a great patch I sent!! :-O

I guess I'll resend. :-)

Sorry and Regards,
Dario
-- 
<<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)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH 1/3 v2] xenalyze: handle DOM0 operations events
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
  2016-03-12 14:35   ` Wei Liu
  2016-03-14 14:06   ` Konrad Rzeszutek Wilk
@ 2016-03-16 16:37   ` Dario Faggioli
  2016-03-23 12:35   ` [PATCH 1/3] xenalyze: handle DOM0 operaions events George Dunlap
  3 siblings, 0 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-16 16:37 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap, Wei Liu, Ian Jackson


[-- Attachment #1.1: Type: text/plain, Size: 1655 bytes --]

(i.e., domain creation and destruction) so the
trace will show properly decoded info, rather
than just a bunch of hex codes.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
---
Changes from v2:
 * fix typo in subject;
 * add missing S-o-b.

Changes from v1:
 * new patch in the series.

diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
index d4a5b0c..353bed7 100644
--- a/tools/xentrace/xenalyze.c
+++ b/tools/xentrace/xenalyze.c
@@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p)
     }
 
 }
+
+#define TRC_DOM0_SUB_DOMOPS 1
+void dom0_process(struct pcpu_info *p)
+{
+    struct record_info *ri = &p->ri;
+
+    switch(ri->evt.sub)
+    {
+    case TRC_DOM0_SUB_DOMOPS:
+        if(opt.dump_all) {
+            struct {
+                unsigned int domid;
+            } *r = (typeof(r))ri->d;
+
+        printf(" %s %s domain d%u\n", ri->dump_header,
+               ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying",
+               r->domid);
+        }
+        break;
+    default:
+        process_generic(&p->ri);
+    }
+}
+
 /* ---- Base ----- */
 void dump_generic(FILE * f, struct record_info *ri)
 {
@@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) {
             hw_process(p);
             break;
         case TRC_DOM0OP_MAIN:
+            dom0_process(p);
+            break;
         default:
             process_generic(ri);
         }

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values
  2016-03-14  9:07   ` Jan Beulich
@ 2016-03-16 16:38     ` Dario Faggioli
  0 siblings, 0 replies; 17+ messages in thread
From: Dario Faggioli @ 2016-03-16 16:38 UTC (permalink / raw)
  To: Jan Beulich, George Dunlap; +Cc: xen-devel, Ian Jackson, Meng Xu, Wei Liu


[-- Attachment #1.1: Type: text/plain, Size: 2250 bytes --]

On Mon, 2016-03-14 at 03:07 -0600, Jan Beulich wrote:
> > > > On 12.03.16 at 12:34, <dario.faggioli@citrix.com> wrote:
> > --- a/xen/common/sched_rt.c
> > +++ b/xen/common/sched_rt.c
> > @@ -361,17 +361,14 @@ rt_update_deadline(s_time_t now, struct
> > rt_vcpu *svc)
> >  
> >      /* TRACE */
> >      {
> > -        struct {
> > +        struct __packed {
> >              unsigned vcpu:16, dom:16;
> > -            unsigned cur_deadline_lo, cur_deadline_hi;
> > -            unsigned cur_budget_lo, cur_budget_hi;
> > +            uint64_t cur_deadline, cur_budget;
> >          } d;
> >          d.dom = svc->vcpu->domain->domain_id;
> >          d.vcpu = svc->vcpu->vcpu_id;
> > -        d.cur_deadline_lo = (unsigned) svc->cur_deadline;
> > -        d.cur_deadline_hi = (unsigned) (svc->cur_deadline >> 32);
> > -        d.cur_budget_lo = (unsigned) svc->cur_budget;
> > -        d.cur_budget_hi = (unsigned) (svc->cur_budget >> 32);
> > +        d.cur_deadline = (uint64_t) svc->cur_deadline;
> > +        d.cur_budget = (uint64_t) svc->cur_budget;
> I don't see the need for these cast (and similar ones further down),
> but you're the maintainer, so you know ...
> 
BTW, I saw you've committed this. Thanks for that, and sorry for not
replying. I wanted to, but I've had a couple of day full of Internet
connectivity issues.

I do think it's best to keep the casts, although strictly unnecessary.

About this series, I'm re-sending patch 1, by replying directly to that
same email of this thread.

So, for other maintainers (which I'm  Cc-ing to this message), or
should I say, for George :-), this is what should be considered for
review:
 - [PATCH 1/3 v2] xenalyze: handle DOM0 operations events
 - [PATCH 3/3] xenalyze: handle RTDS scheduler events

Thanks and Regards,
Dario
-- 
<<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)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events
  2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
                     ` (2 preceding siblings ...)
  2016-03-16 16:37   ` [PATCH 1/3 v2] xenalyze: handle DOM0 operations events Dario Faggioli
@ 2016-03-23 12:35   ` George Dunlap
  2016-03-25 13:29     ` Konrad Rzeszutek Wilk
  3 siblings, 1 reply; 17+ messages in thread
From: George Dunlap @ 2016-03-23 12:35 UTC (permalink / raw)
  To: Dario Faggioli, xen-devel; +Cc: George Dunlap, Wei Liu, Ian Jackson

On 12/03/16 11:33, Dario Faggioli wrote:
> (i.e., domain creation and destruction) so the
> trace will show properly decoded info, rather
> than just a bunch of hex codes.
> ---

For some reason git won't apply your 'v2', complaining: 'corrupt patch
at line 14'.

But re the content (i.e., this patch with the SoB and the title fixed)

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

Sorry it took so long to get to this.


> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> Changes from v1:
>  * new patch in the series.
> ---
>  tools/xentrace/xenalyze.c |   26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
> index d4a5b0c..353bed7 100644
> --- a/tools/xentrace/xenalyze.c
> +++ b/tools/xentrace/xenalyze.c
> @@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p)
>      }
>  
>  }
> +
> +#define TRC_DOM0_SUB_DOMOPS 1
> +void dom0_process(struct pcpu_info *p)
> +{
> +    struct record_info *ri = &p->ri;
> +
> +    switch(ri->evt.sub)
> +    {
> +    case TRC_DOM0_SUB_DOMOPS:
> +        if(opt.dump_all) {
> +            struct {
> +                unsigned int domid;
> +            } *r = (typeof(r))ri->d;
> +
> +        printf(" %s %s domain d%u\n", ri->dump_header,
> +               ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying",
> +               r->domid);
> +        }
> +        break;
> +    default:
> +        process_generic(&p->ri);
> +    }
> +}
> +
>  /* ---- Base ----- */
>  void dump_generic(FILE * f, struct record_info *ri)
>  {
> @@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) {
>              hw_process(p);
>              break;
>          case TRC_DOM0OP_MAIN:
> +            dom0_process(p);
> +            break;
>          default:
>              process_generic(ri);
>          }
> 


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/3] xenalyze: handle RTDS scheduler events
  2016-03-12 11:34 ` [PATCH 3/3] xenalyze: handle RTDS scheduler events Dario Faggioli
  2016-03-12 15:14   ` Meng Xu
@ 2016-03-23 12:36   ` George Dunlap
  1 sibling, 0 replies; 17+ messages in thread
From: George Dunlap @ 2016-03-23 12:36 UTC (permalink / raw)
  To: Dario Faggioli, xen-devel
  Cc: Wei Liu, George Dunlap, Tianyang Chen, Ian Jackson, Meng Xu

On 12/03/16 11:34, 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@citrix.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

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

> ---
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Meng Xu <xumengpanda@gmail.com>
> Cc: Tianyang Chen <tiche@seas.upenn.edu>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Changes from v2:
>  * use 64 bits ints for time values (now that the scheduler
>    does that too), as suggested during review.
> 
> Changes from v1:
>  * '} * r =' turned into '} *r =', as requested
>    during review.
> ---
>  tools/xentrace/xenalyze.c |   52 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 52 insertions(+)
> 
> diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
> index 353bed7..b949986 100644
> --- a/tools/xentrace/xenalyze.c
> +++ b/tools/xentrace/xenalyze.c
> @@ -7823,6 +7823,58 @@ 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;
> +                    uint64_t cur_dl, cur_bg;
> +                } __attribute__((packed)) *r = (typeof(r))ri->d;
> +
> +                printf(" %s rtds:runq_pick d%uv%u, deadline = %"PRIu64", "
> +                       "budget = %"PRIu64"\n", ri->dump_header,
> +                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg);
> +            }
> +            break;
> +        case TRC_SCHED_CLASS_EVT(RTDS, 3): /* BUDGET_BURN      */
> +            if(opt.dump_all) {
> +                struct {
> +                    unsigned int vcpuid:16, domid:16;
> +                    uint64_t cur_bg;
> +                    int delta;
> +                } __attribute__((packed)) *r = (typeof(r))ri->d;
> +
> +                printf(" %s rtds:burn_budget d%uv%u, budget = %"PRIu64", "
> +                       "delta = %d\n", ri->dump_header, r->domid,
> +                       r->vcpuid, r->cur_bg, r->delta);
> +            }
> +            break;
> +        case TRC_SCHED_CLASS_EVT(RTDS, 4): /* BUDGET_REPLENISH */
> +            if(opt.dump_all) {
> +                struct {
> +                    unsigned int vcpuid:16, domid:16;
> +                    uint64_t cur_dl, cur_bg;
> +                } __attribute__((packed)) *r = (typeof(r))ri->d;
> +
> +                printf(" %s rtds:repl_budget d%uv%u, deadline = %"PRIu64", "
> +                       "budget = %"PRIu64"\n", ri->dump_header,
> +                       r->domid, r->vcpuid, r->cur_dl, r->cur_bg);
> +            }
> +            break;
> +        case TRC_SCHED_CLASS_EVT(RTDS, 5): /* SCHED_TASKLET    */
> +            if(opt.dump_all)
> +                printf(" %s rtds:sched_tasklet\n", ri->dump_header);
> +            break;
>          default:
>              process_generic(ri);
>          }
> 


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events
  2016-03-23 12:35   ` [PATCH 1/3] xenalyze: handle DOM0 operaions events George Dunlap
@ 2016-03-25 13:29     ` Konrad Rzeszutek Wilk
  2016-04-01 12:13       ` git branch for checking-in leftover patches [was: Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events] Dario Faggioli
  0 siblings, 1 reply; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-03-25 13:29 UTC (permalink / raw)
  Cc: George Dunlap, xen-devel, Dario Faggioli, Ian Jackson, Wei Liu

On Wed, Mar 23, 2016 at 12:35:36PM +0000, George Dunlap wrote:
> On 12/03/16 11:33, Dario Faggioli wrote:
> > (i.e., domain creation and destruction) so the
> > trace will show properly decoded info, rather
> > than just a bunch of hex codes.
> > ---
> 
> For some reason git won't apply your 'v2', complaining: 'corrupt patch
> at line 14'.

/me nods. Same here. I tried to check it in but couldn't.

Dariof could you make a git branch to pull in the Acked patches please?

> 
> But re the content (i.e., this patch with the SoB and the title fixed)
> 
> Acked-by: George Dunlap <george.dunlap@citrix.com>
> 
> Sorry it took so long to get to this.
> 
> 
> > Cc: George Dunlap <george.dunlap@eu.citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Wei Liu <wei.liu2@citrix.com>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > ---
> > Changes from v1:
> >  * new patch in the series.
> > ---
> >  tools/xentrace/xenalyze.c |   26 ++++++++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> > 
> > diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c
> > index d4a5b0c..353bed7 100644
> > --- a/tools/xentrace/xenalyze.c
> > +++ b/tools/xentrace/xenalyze.c
> > @@ -8388,6 +8388,30 @@ void hw_process(struct pcpu_info *p)
> >      }
> >  
> >  }
> > +
> > +#define TRC_DOM0_SUB_DOMOPS 1
> > +void dom0_process(struct pcpu_info *p)
> > +{
> > +    struct record_info *ri = &p->ri;
> > +
> > +    switch(ri->evt.sub)
> > +    {
> > +    case TRC_DOM0_SUB_DOMOPS:
> > +        if(opt.dump_all) {
> > +            struct {
> > +                unsigned int domid;
> > +            } *r = (typeof(r))ri->d;
> > +
> > +        printf(" %s %s domain d%u\n", ri->dump_header,
> > +               ri->event == TRC_DOM0_DOM_ADD ? "creating" : "destroying",
> > +               r->domid);
> > +        }
> > +        break;
> > +    default:
> > +        process_generic(&p->ri);
> > +    }
> > +}
> > +
> >  /* ---- Base ----- */
> >  void dump_generic(FILE * f, struct record_info *ri)
> >  {
> > @@ -9224,6 +9248,8 @@ void process_record(struct pcpu_info *p) {
> >              hw_process(p);
> >              break;
> >          case TRC_DOM0OP_MAIN:
> > +            dom0_process(p);
> > +            break;
> >          default:
> >              process_generic(ri);
> >          }
> > 
> 

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* git branch for checking-in leftover patches [was: Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events]
  2016-03-25 13:29     ` Konrad Rzeszutek Wilk
@ 2016-04-01 12:13       ` Dario Faggioli
  2016-04-01 14:00         ` Ian Jackson
  0 siblings, 1 reply; 17+ messages in thread
From: Dario Faggioli @ 2016-04-01 12:13 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Wei Liu; +Cc: George Dunlap, xen-devel, Ian Jackson


[-- Attachment #1.1: Type: text/plain, Size: 1454 bytes --]

On Fri, 2016-03-25 at 09:29 -0400, Konrad Rzeszutek Wilk wrote:
> On Wed, Mar 23, 2016 at 12:35:36PM +0000, George Dunlap wrote:
> > 
> > On 12/03/16 11:33, Dario Faggioli wrote:
> > > 
> > > (i.e., domain creation and destruction) so the
> > > trace will show properly decoded info, rather
> > > than just a bunch of hex codes.
> > > ---
> > For some reason git won't apply your 'v2', complaining: 'corrupt
> > patch
> > at line 14'.
> /me nods. Same here. I tried to check it in but couldn't.
> 
> Dariof could you make a git branch to pull in the Acked patches
> please?
> 
Here it comes:

git://xenbits.xen.org/people/dariof/xen.git 	tracing/sched-events-improvements-leftover
http://xenbits.xen.org/gitweb/?p=people/dariof/xen.git;a=shortlog;h=refs/heads/tracing/sched-events-improvements-leftover

As far as I can tell, it is these two patches that are still unapplied,
and can go in:

 xenalyze: handle RTDS scheduler events
 xenalyze: handle DOM0 operations events

(the first two commits of the branch, of course.)

Sorry it took a bit, but I lost track of what actually went in and what
didn't for this series... :-/

Thanks and Regards,
Dario
-- 
<<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)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* git branch for checking-in leftover patches [was: Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events]
  2016-04-01 12:13       ` git branch for checking-in leftover patches [was: Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events] Dario Faggioli
@ 2016-04-01 14:00         ` Ian Jackson
  0 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2016-04-01 14:00 UTC (permalink / raw)
  To: Dario Faggioli; +Cc: George Dunlap, xen-devel, Wei Liu

Dario Faggioli writes ("git branch for checking-in leftover patches [was: Re: [Xen-devel] [PATCH 1/3] xenalyze: handle DOM0 operaions events]"):
> git://xenbits.xen.org/people/dariof/xen.git 	tracing/sched-events-improvements-leftover
> http://xenbits.xen.org/gitweb/?p=people/dariof/xen.git;a=shortlog;h=refs/heads/tracing/sched-events-improvements-leftover
> 
> As far as I can tell, it is these two patches that are still unapplied,
> and can go in:
> 
>  xenalyze: handle RTDS scheduler events
>  xenalyze: handle DOM0 operations events

Thanks.  I have rebased those onto staging and applied them.

Ian.

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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-04-01 14:00 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-12 11:33 [PATCH 0/3] xen: more scheduler tracing improvement Dario Faggioli
2016-03-12 11:33 ` [PATCH 1/3] xenalyze: handle DOM0 operaions events Dario Faggioli
2016-03-12 14:35   ` Wei Liu
2016-03-14 14:06   ` Konrad Rzeszutek Wilk
2016-03-14 14:11     ` Dario Faggioli
2016-03-16 16:37   ` [PATCH 1/3 v2] xenalyze: handle DOM0 operations events Dario Faggioli
2016-03-23 12:35   ` [PATCH 1/3] xenalyze: handle DOM0 operaions events George Dunlap
2016-03-25 13:29     ` Konrad Rzeszutek Wilk
2016-04-01 12:13       ` git branch for checking-in leftover patches [was: Re: [PATCH 1/3] xenalyze: handle DOM0 operaions events] Dario Faggioli
2016-04-01 14:00         ` Ian Jackson
2016-03-12 11:34 ` [PATCH 2/3] xen: sched RTDS: use uint64_t for tracing time values Dario Faggioli
2016-03-12 15:05   ` Meng Xu
2016-03-14  9:07   ` Jan Beulich
2016-03-16 16:38     ` Dario Faggioli
2016-03-12 11:34 ` [PATCH 3/3] xenalyze: handle RTDS scheduler events Dario Faggioli
2016-03-12 15:14   ` Meng Xu
2016-03-23 12:36   ` George Dunlap

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).