[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII
From: |
Peter Maydell |
Subject: |
Re: [Qemu-arm] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022 |
Date: |
Tue, 27 Feb 2018 10:24:31 +0000 |
On 27 February 2018 at 10:21, Linus Walleij <address@hidden> wrote:
> On Tue, Feb 27, 2018 at 11:09 AM, Peter Maydell
> <address@hidden> wrote:
>> On 27 February 2018 at 07:41, Linus Walleij <address@hidden> wrote:
>>> On Sat, Feb 17, 2018 at 7:32 PM, Philippe Mathieu-Daudé <address@hidden>
>>> 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
Re: [Qemu-arm] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022, Peter Maydell, 2018/02/22
[Qemu-arm] [PATCH 3/3] arm/vexpress: Add proper display connector emulation, Linus Walleij, 2018/02/17
- Re: [Qemu-arm] [Qemu-devel] [PATCH 3/3] arm/vexpress: Add proper display connector emulation, Philippe Mathieu-Daudé, 2018/02/17
- Re: [Qemu-arm] [Qemu-devel] [PATCH 3/3] arm/vexpress: Add proper display connector emulation, Linus Walleij, 2018/02/19
- Re: [Qemu-arm] [Qemu-devel] [PATCH 3/3] arm/vexpress: Add proper display connector emulation, Corey Minyard, 2018/02/19
- [Qemu-arm] [PATCH 0/2] Move the bus class to i2c.h, minyard, 2018/02/19
- [Qemu-arm] [PATCH 2/2] i2c: Move the bus class to i2c.h, minyard, 2018/02/19
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] i2c: Move the bus class to i2c.h, Peter Maydell, 2018/02/19
- Re: [Qemu-arm] [Qemu-devel] [PATCH 2/2] i2c: Move the bus class to i2c.h, Corey Minyard, 2018/02/20