From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFzh0-0000sT-Fo for qemu-devel@nongnu.org; Fri, 26 Oct 2018 06:50:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFzgu-0008PN-PM for qemu-devel@nongnu.org; Fri, 26 Oct 2018 06:50:14 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFzgs-0008KR-HF for qemu-devel@nongnu.org; Fri, 26 Oct 2018 06:50:08 -0400 Received: by mail-wr1-f66.google.com with SMTP id y15-v6so848577wru.9 for ; Fri, 26 Oct 2018 03:50:03 -0700 (PDT) References: <20181025133301.16578-1-ehabkost@redhat.com> <20181025133301.16578-6-ehabkost@redhat.com> <20181025171759.GG2697@umbus.hotspot.internet-for-guests.com> <20181026082741.GK4096@habkost.net> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <6112ad64-267d-16d1-abe5-cdaed3981a95@redhat.com> Date: Fri, 26 Oct 2018 12:49:59 +0200 MIME-Version: 1.0 In-Reply-To: <20181026082741.GK4096@habkost.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PULL v2 05/43] hw/timer/sun4v-rtc: Convert from DPRINTF() macro to trace events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , David Gibson Cc: Peter Maydell , "Michael S. Tsirkin" , libvir-list@redhat.com, Jason Wang , Mark Cave-Ayland , qemu-devel@nongnu.org, Alexander Graf , Max Filippov , "Edgar E. Iglesias" , Rob Herring , Markus Armbruster , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Alistair Francis , qemu-arm@nongnu.org, Paolo Bonzini , Richard Henderson , Xiao Guangrong , Peter Crosthwaite , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Michael Walle , qemu-ppc@nongnu.org, Aleksandar Markovic , Igor Mammedov , Aurelien Jarno On 26/10/18 10:27, Eduardo Habkost wrote: > On Thu, Oct 25, 2018 at 06:17:59PM +0100, David Gibson wrote: >> On Thu, Oct 25, 2018 at 10:32:23AM -0300, Eduardo Habkost wrote: >>> From: Philippe Mathieu-Daudé >>> >>> Signed-off-by: Philippe Mathieu-Daudé >>> Reviewed-by: Artyom Tarasenko >>> Reviewed-by: Cédric Le Goater >>> Message-Id: <20181002212522.23303-3-f4bug@amsat.org> >>> Signed-off-by: Eduardo Habkost >>> --- >>> hw/timer/sun4v-rtc.c | 13 +++---------- >>> hw/timer/trace-events | 4 ++++ >>> 2 files changed, 7 insertions(+), 10 deletions(-) >>> >>> diff --git a/hw/timer/sun4v-rtc.c b/hw/timer/sun4v-rtc.c >>> index 310523225f..13be94f8da 100644 >>> --- a/hw/timer/sun4v-rtc.c >>> +++ b/hw/timer/sun4v-rtc.c >>> @@ -14,15 +14,8 @@ >>> #include "hw/sysbus.h" >>> #include "qemu/timer.h" >>> #include "hw/timer/sun4v-rtc.h" >>> +#include "trace.h" >>> >>> -//#define DEBUG_SUN4V_RTC >>> - >>> -#ifdef DEBUG_SUN4V_RTC >>> -#define DPRINTF(fmt, ...) \ >>> - do { printf("sun4v_rtc: " fmt , ## __VA_ARGS__); } while (0) >>> -#else >>> -#define DPRINTF(fmt, ...) do {} while (0) >>> -#endif >>> >>> #define TYPE_SUN4V_RTC "sun4v_rtc" >>> #define SUN4V_RTC(obj) OBJECT_CHECK(Sun4vRtc, (obj), TYPE_SUN4V_RTC) >>> @@ -41,14 +34,14 @@ static uint64_t sun4v_rtc_read(void *opaque, hwaddr addr, >>> /* accessing the high 32 bits */ >>> val >>= 32; >>> } >>> - DPRINTF("read from " TARGET_FMT_plx " val %lx\n", addr, val); >>> + trace_sun4v_rtc_read(addr, val); >>> return val; >>> } >>> >>> static void sun4v_rtc_write(void *opaque, hwaddr addr, >>> uint64_t val, unsigned size) >>> { >>> - DPRINTF("write 0x%x to " TARGET_FMT_plx "\n", (unsigned)val, addr); >>> + trace_sun4v_rtc_read(addr, val); >> >> Uh.. as in v1, it looks like this should be trace_sun4v_rtc_write(). > > Oops, my bad. I can fix this manually in case there's a v3 pull > request, but I would really prefer that to be included in a > follow up patch instead of making this block the entire pull > request. Oops sorry... I noticed you fixed that in 605be3a8c0, thanks! Regards, Phil.