From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48099) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqcNh-00074d-QO for qemu-devel@nongnu.org; Tue, 27 Feb 2018 05:21:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqcNg-0008OI-SA for qemu-devel@nongnu.org; Tue, 27 Feb 2018 05:21:09 -0500 Received: from mail-io0-x243.google.com ([2607:f8b0:4001:c06::243]:37047) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eqcNg-0008Nz-N8 for qemu-devel@nongnu.org; Tue, 27 Feb 2018 05:21:08 -0500 Received: by mail-io0-x243.google.com with SMTP id d71so11514665iog.4 for ; Tue, 27 Feb 2018 02:21:08 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20180217140051.22731-1-linus.walleij@linaro.org> <20180217140051.22731-2-linus.walleij@linaro.org> From: Linus Walleij Date: Tue, 27 Feb 2018 11:21:07 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 2/3] hw/sii9022: Add support for Silicon Image SII9022 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= , qemu-arm , QEMU Developers On Tue, Feb 27, 2018 at 11:09 AM, Peter Maydell wrote: > On 27 February 2018 at 07:41, Linus Walleij wr= ote: >> On Sat, Feb 17, 2018 at 7:32 PM, Philippe Mathieu-Daud=C3=A9 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. I guess I should include "trace.h". #include "trace.h" says it is autogenerated from tracetool. Is there some documentation I should be reading or a good example commit I can study to get the hang of it? Yours, Linus Walleij