From: Wei Liu Subject: Re: [PATCH v2 6/8] xenalyze: handle more events in sched_process Date: Fri, 8 May 2015 06:30:47 +0100 Message-ID: <20150508053047.GG3848@zion.uk.xensource.com> References: <1430994944-20471-1-git-send-email-olaf@aepfle.de> <1430994944-20471-7-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1430994944-20471-7-git-send-email-olaf@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Wei Liu , Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Thu, May 07, 2015 at 10:35:42AM +0000, Olaf Hering wrote: > Signed-off-by: Olaf Hering > Cc: Ian Jackson > Cc: Stefano Stabellini > Cc: Ian Campbell > Cc: Wei Liu > --- > tools/xentrace/xenalyze/xenalyze.c | 73 ++++++++++++++++++++++++++++++++++---- > 1 file changed, 66 insertions(+), 7 deletions(-) > > diff --git a/tools/xentrace/xenalyze/xenalyze.c b/tools/xentrace/xenalyze/xenalyze.c > index 0566d00..18ca859 100644 > --- a/tools/xentrace/xenalyze/xenalyze.c > +++ b/tools/xentrace/xenalyze/xenalyze.c > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include > #include "analyze.h" > #include "mread.h" > #include "pv.h" > @@ -7569,24 +7570,82 @@ void sched_summary_domain(struct domain_data *d) > } > } > > +void sched_class(struct record_info *ri) > +{ > +} Huh, this does nothing? Is it because this is only a stub (you haven't got around to implement it) or it is supposed to be like this? Either case could you please add a comment before this function? Thanks. > > void sched_process(struct pcpu_info *p) > { > struct record_info *ri = &p->ri; > > - if(ri->evt.sub == 0xf) { > + if (ri->evt.sub == 1) { > + sched_runstate_process(p); > + } else if (ri->evt.sub == 2) { > + sched_class(ri); > + } else { > switch(ri->event) > { [...] > + break; > default: > - process_generic(&p->ri); > - } > - } else { > - if(ri->evt.sub == 1) > - sched_runstate_process(p); > - else { > + fprintf(warn, "%s: event:%x (min:%x sub:%x main:%x)\n", __func__, ri->event, ri->evt.minor, ri->evt.sub, ri->evt.main); This line is really too long, please wrap it. And this won't look broken when you wrap it. Wei. > UPDATE_VOLUME(p, sched_verbose, ri->size); > process_generic(&p->ri); > }