All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022
Date: Tue, 27 Feb 2018 10:24:31 +0000	[thread overview]
Message-ID: <CAFEAcA_bZ-w7WWUtr8RE6rU8ELLbZpBmeuDnwZ=rLreXgJ6fRg@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdZuNUmZbHnYwUQFJkBNQWADd5tXfc9PYv8amosbO=zn4Q@mail.gmail.com>

On 27 February 2018 at 10:21, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Tue, Feb 27, 2018 at 11:09 AM, Peter Maydell
> <peter.maydell@linaro.org> wrote:
>> On 27 February 2018 at 07:41, Linus Walleij <linus.walleij@linaro.org> wrote:
>>> On Sat, Feb 17, 2018 at 7:32 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>>
>>>> [Me]
>>>>> +#define DEBUG_SII9022 0
>>>>> +
>>>>> +#define DPRINTF(fmt, ...) \
>>>>> +    do { \
>>>>> +        if (DEBUG_SII9022) { \
>>>>> +            printf("sii9022: " fmt, ## __VA_ARGS__); \
>>>>> +        } \
>>>>> +    } while (0)
>>>>
>>>> Can you replace DPRINTF() by trace events?
>>>
>>> Absolutely but which ones?
>>>
>>> I do not feel senior enough to also invent new trace events
>>> for displays or I2C devices...
>>
>> Just put a trace event where you've put DPRINTF debug statements.
>
> Yeah, hm the question might be silly or something but I don't
> know how to do that.

docs/devel/tracing.txt describes them, but basically:
 * include "trace.h"
 * define trace events with a line for each in the trace-events
   file for the subdirectory (basically a function prototype-ish
   thing followed by a printf-style format string)
 * call them like normal function calls with a trace_ prefix

commit 1b640aa9292bc00beb441e97d862ba322a7ba18d is a recent one
which converted some DRINTFs in hw/sd/sd.c to trace events.

thanks
-- PMM

  reply	other threads:[~2018-02-27 10:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-17 14:00 [Qemu-devel] [PATCH 1/3] hw/i2c-ddc: Do not fail writes Linus Walleij
2018-02-17 14:00 ` [Qemu-devel] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022 Linus Walleij
2018-02-17 18:32   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-02-27  7:41     ` Linus Walleij
2018-02-27 10:09       ` Peter Maydell
2018-02-27 10:21         ` Linus Walleij
2018-02-27 10:24           ` Peter Maydell [this message]
2018-02-27 10:29             ` Peter Maydell
2018-02-22 14:42   ` Peter Maydell
2018-02-17 14:00 ` [Qemu-devel] [PATCH 3/3] arm/vexpress: Add proper display connector emulation Linus Walleij
2018-02-17 18:28   ` Philippe Mathieu-Daudé
2018-02-19 14:10     ` Linus Walleij
2018-02-19 15:16       ` Corey Minyard
2018-02-19 15:20       ` [Qemu-devel] [PATCH 0/2] Move the bus class to i2c.h minyard
2018-02-19 15:20         ` [Qemu-devel] [PATCH 1/2] i2c: Fix some brace style issues minyard
2018-02-19 15:24           ` Peter Maydell
2018-02-22 15:37           ` Linus Walleij
2018-02-19 15:20         ` [Qemu-devel] [PATCH 2/2] i2c: Move the bus class to i2c.h minyard
2018-02-19 15:25           ` Peter Maydell
2018-02-20 13:06             ` Corey Minyard
2018-02-22 15:39               ` Linus Walleij
2018-02-22 15:44                 ` Peter Maydell
2018-02-22 15:55                   ` Linus Walleij
2018-02-22 15:38           ` Linus Walleij
2018-02-22 14:36 ` [Qemu-devel] [Qemu-arm] [PATCH 1/3] hw/i2c-ddc: Do not fail writes Peter Maydell

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='CAFEAcA_bZ-w7WWUtr8RE6rU8ELLbZpBmeuDnwZ=rLreXgJ6fRg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=linus.walleij@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.