From nobody Mon Feb 9 17:37:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530295082960477.6771660323154; Fri, 29 Jun 2018 10:58:02 -0700 (PDT) Received: from localhost ([::1]:43840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYxek-0003XT-6j for importer@patchew.org; Fri, 29 Jun 2018 13:58:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYxag-0000JB-Et for qemu-devel@nongnu.org; Fri, 29 Jun 2018 13:53:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYxae-00005t-TX for qemu-devel@nongnu.org; Fri, 29 Jun 2018 13:53:50 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40264 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYxae-00005Y-OM for qemu-devel@nongnu.org; Fri, 29 Jun 2018 13:53:48 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D3784077B74; Fri, 29 Jun 2018 17:53:48 +0000 (UTC) Received: from localhost (ovpn-116-50.ams2.redhat.com [10.36.116.50]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D9B51D089; Fri, 29 Jun 2018 17:53:47 +0000 (UTC) From: Stefan Hajnoczi To: Date: Fri, 29 Jun 2018 18:53:27 +0100 Message-Id: <20180629175330.19391-9-stefanha@redhat.com> In-Reply-To: <20180629175330.19391-1-stefanha@redhat.com> References: <20180629175330.19391-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 29 Jun 2018 17:53:48 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 29 Jun 2018 17:53:48 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'stefanha@redhat.com' RCPT:'' Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 08/11] hw/net/ne2000: Convert printf() calls to trace events 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: Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Crosthwaite , Juan Quintela , Michael Roth , Markus Armbruster , Stefan Hajnoczi , Paolo Bonzini , "Dr. David Alan Gilbert" , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Stefan Hajnoczi --- hw/net/ne2000.c | 8 ++------ hw/net/trace-events | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 26b234b7eb..07d79e317f 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -277,9 +277,7 @@ static void ne2000_ioport_write(void *opaque, uint32_t = addr, uint32_t val) int offset, page, index; =20 addr &=3D 0xf; -#ifdef DEBUG_NE2000 - printf("NE2000: write addr=3D0x%x val=3D0x%02x\n", addr, val); -#endif + trace_ne2000_ioport_write(addr, val); if (addr =3D=3D E8390_CMD) { /* control register */ s->cmd =3D val; @@ -442,9 +440,7 @@ static uint32_t ne2000_ioport_read(void *opaque, uint32= _t addr) break; } } -#ifdef DEBUG_NE2000 - printf("NE2000: read addr=3D0x%x val=3D%02x\n", addr, ret); -#endif + trace_ne2000_ioport_read(addr, ret); return ret; } =20 diff --git a/hw/net/trace-events b/hw/net/trace-events index 95a1de01e9..f57010df37 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -26,6 +26,8 @@ mipsnet_irq(uint32_t isr, uint32_t intctl) "set irq to %d= (0x%02x)" # hw/net/ne2000.c ne2000_read(uint64_t addr, uint64_t val) "read addr=3D0x%" PRIx64 " val=3D= 0x%" PRIx64 ne2000_write(uint64_t addr, uint64_t val) "write addr=3D0x%" PRIx64 " val= =3D0x%" PRIx64 +ne2000_ioport_read(uint64_t addr, uint64_t val) "io read addr=3D0x%02" PRI= x64 " val=3D0x%02" PRIx64 +ne2000_ioport_write(uint64_t addr, uint64_t val) "io write addr=3D0x%02" P= RIx64 " val=3D0x%02" PRIx64 =20 # hw/net/opencores_eth.c open_eth_mii_write(unsigned idx, uint16_t v) "MII[0x%02x] <- 0x%04x" --=20 2.17.1