From patchwork Wed Dec 12 17:30:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 10726867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EB801759 for ; Wed, 12 Dec 2018 17:39:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C48F429EBF for ; Wed, 12 Dec 2018 17:38:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B48B129F06; Wed, 12 Dec 2018 17:38:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6175B29EBF for ; Wed, 12 Dec 2018 17:38:54 +0000 (UTC) Received: from localhost ([::1]:46419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8TF-00040Y-N0 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 12 Dec 2018 12:38:53 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX8LB-0006yX-IW for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX8L8-00018n-Vm for qemu-devel@nongnu.org; Wed, 12 Dec 2018 12:30:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51060) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gX8L8-0000uS-NZ; Wed, 12 Dec 2018 12:30:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1001D307D86D; Wed, 12 Dec 2018 17:30:14 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-204-190.brq.redhat.com [10.40.204.190]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F73B60C44; Wed, 12 Dec 2018 17:30:12 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Wed, 12 Dec 2018 18:30:02 +0100 Message-Id: <20181212173007.11407-2-lvivier@redhat.com> In-Reply-To: <20181212173007.11407-1-lvivier@redhat.com> References: <20181212173007.11407-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 12 Dec 2018 17:30:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/6] hw/dma/puv3_dma: Convert from DPRINTF() macro to trace event X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Laurent Vivier , Guan Xuetao , Michael Tokarev , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Laurent Vivier --- hw/dma/puv3_dma.c | 11 +++++------ hw/dma/trace-events | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/dma/puv3_dma.c b/hw/dma/puv3_dma.c index b97a6c1767..38ebb3f307 100644 --- a/hw/dma/puv3_dma.c +++ b/hw/dma/puv3_dma.c @@ -11,9 +11,8 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/sysbus.h" - -#undef DEBUG_PUV3 #include "hw/unicore32/puv3.h" +#include "trace.h" #define PUV3_DMA_CH_NR (6) #define PUV3_DMA_CH_MASK (0xff) @@ -42,9 +41,9 @@ static uint64_t puv3_dma_read(void *opaque, hwaddr offset, ret = s->reg_CFG[PUV3_DMA_CH(offset)]; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_dma_read_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, ret); + trace_puv3_dma_read(offset, ret); return ret; } @@ -61,9 +60,9 @@ static void puv3_dma_write(void *opaque, hwaddr offset, s->reg_CFG[PUV3_DMA_CH(offset)] = value; break; default: - DPRINTF("Bad offset 0x%x\n", offset); + trace_puv3_dma_write_bad(offset); } - DPRINTF("offset 0x%x, value 0x%x\n", offset, value); + trace_puv3_dma_write(offset, value); } static const MemoryRegionOps puv3_dma_ops = { diff --git a/hw/dma/trace-events b/hw/dma/trace-events index 22f53d0ff2..56d4f5a32a 100644 --- a/hw/dma/trace-events +++ b/hw/dma/trace-events @@ -20,3 +20,9 @@ sparc32_dma_enable_lower(void) "Lower DMA enable" # hw/dma/i8257.c i8257_unregistered_dma(int nchan, int dma_pos, int dma_len) "unregistered DMA channel used nchan=%d dma_pos=%d dma_len=%d" + +# hw/dma/puv3_dma.c +puv3_dma_read_bad(unsigned offset) "Bad offset 0x%x" +puv3_dma_read(unsigned offset, uint32_t value) "offset 0x%x, value 0x%x" +puv3_dma_write_bad(unsigned offset) "Bad offset 0x%x" +puv3_dma_write(unsigned offset, uint64_t value) "offset 0x%x, value 0x%" PRIx64