qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 2/2] sdhci: Change debug prints to compile un


From: Sai Pavan Boddu
Subject: Re: [Qemu-devel] [PATCH V3 2/2] sdhci: Change debug prints to compile unconditionally
Date: Mon, 7 Sep 2015 13:05:03 +0000

Hi Markus,

> -----Original Message-----
> From: Markus Armbruster [mailto:address@hidden
> Sent: Monday, September 07, 2015 2:35 PM
> To: Sai Pavan Boddu
> Cc: address@hidden; Alistair Francis; address@hidden;
> address@hidden; Edgar Iglesias
> Subject: Re: [Qemu-devel] [PATCH V3 2/2] sdhci: Change debug prints to
> compile unconditionally
> 
> Sai Pavan Boddu <address@hidden> writes:
> 
> >> -----Original Message-----
> >> From: Markus Armbruster [mailto:address@hidden
> >> Sent: Monday, September 07, 2015 1:05 PM
> >> To: Sai Pavan Boddu
> >> Cc: address@hidden; address@hidden;
> >> address@hidden; address@hidden; Sai Pavan Boddu; Edgar
> >> Iglesias; Alistair Francis
> >> Subject: Re: [Qemu-devel] [PATCH V3 2/2] sdhci: Change debug prints to
> >> compile unconditionally
> >>
> >> Sai Pavan Boddu <address@hidden> writes:
> >>
> >> > Conditionaly compilation hides few type mismatch warnings, fix it to
> >> > compile unconditioinal.
> >> >
> >> > Signed-off-by: Sai Pavan Boddu <address@hidden>
> >> > Suggested-by: Eric Blake <address@hidden>
> >>
> >> No objection to this patch, but have you considered tracepoints?
> >> See docs/tracing.txt.
> >
> > [Sai Pavan ] No, I didn’t do that. Actually no knowledge on that. Let
> > me figure it out what it does. Even better if you can just explain in
> > few lines, for what trace tool is used?
> 
> For a simple example of how to convert from debug prints to tracepoints,
> check out commit f6e3534.
> 
> Perhaps the simplest way to get the debugging output then is the
> "stderr" backend you get with "configure --enable-trace-backend=stderr".
> Run QEMU with "-trace events=foo", where file foo contains a list of
> events to enable.  To get all the tracepoints added by the commit above,
> try this one-element list:
> 
>     fw_cfg_*
> 
> Hope this suffices to get you started.
[Sai Pavan ] Thanks, this was useful. And I even tried to apply the same to 
sdhci. And the problems I faced in using this are as below.

-> Present sdhci debug prints are not event oriented. i.e they are generic,  so 
the number of arguments are changing for most of the DPRINT markers. Is there a 
way trace-events can manage variable arguments rather that fixed debug string 
and fixed number of arguments.

i.e consider two prints like below, and convert them to use  trace_debug

DPRINT("Read From %lx",READ_REG);
DPRINT("Write to %lx with mask %lx",WRITE_REG, WRITE_MASK);

We need to use two trace_debug* fuctions, as these are two different events. We 
cannot generically  use the same for both.

-> And even the format specifiers cannot be changed as everything here is 
happening at run time.

Yes, that was a very good idea to use trace tool. But much changes are needed 
in present code to get the same implementation. Will create the patches 
implementing the same later.

Anyways that was a good intro to the tracer. Thanks!

Regards,
Sai Pavan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]