From nobody Tue Feb 10 20:14:33 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; dkim=fail; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529601993247120.77925175399503; Thu, 21 Jun 2018 10:26:33 -0700 (PDT) Received: from localhost ([::1]:56869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW3Ln-0006Oi-NE for importer@patchew.org; Thu, 21 Jun 2018 13:26:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW39L-0004xQ-Af for qemu-devel@nongnu.org; Thu, 21 Jun 2018 13:13:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW39J-0002DP-8g for qemu-devel@nongnu.org; Thu, 21 Jun 2018 13:13:35 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:40696) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fW39J-0002Cy-37; Thu, 21 Jun 2018 13:13:33 -0400 Received: by mail-qk0-x244.google.com with SMTP id b129-v6so2165011qke.7; Thu, 21 Jun 2018 10:13:33 -0700 (PDT) Received: from x1.local ([138.117.48.222]) by smtp.gmail.com with ESMTPSA id t14-v6sm3166159qtp.65.2018.06.21.10.13.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jun 2018 10:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fhKVXKgJcleUU2612zexva/vYuIk9xiQ98uXDyn6FF8=; b=A5OxAbVXEk50KM0ad7JcqaBEKX5tIm5codEidduM3B6ozW48b0369KG5s3hwbuo/bL 6QSSTP5gPB6u3aWF6hwlWvQM1VuuF0S0kPmYKHRTbqFHwI32Gf8MFiRVfXLBfY8RCbst gKjHfLHAPzTPgbTt5W92CED2SNqd2c48DSPyptxMoYCpgr4tAibSVk2ELuwsBJXprYrp EERVSkpyM2wuBhqfnZ7LwwZLcyOwd/hyMN4TjdKCuBS+QvR749K3GCruMwel7SEIiBah 2f6RIy8gr917I6zXH29zj6MqczO6Wl+Da0Ipi4uJDu/qI3G3jizaRMP1gSo0X7nyVhKG Z6zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fhKVXKgJcleUU2612zexva/vYuIk9xiQ98uXDyn6FF8=; b=FLI7rGO3vSJMw0GB9ot8YOCO49r6NRwcIzdMvWpIWwGTGtjbj0T1iRkOWyYVFI6rrj 8XoxknspezH/T74LgWGV5f/0SVwlshB3tAokTndxwKhSXZIAN4HME1OKGMB3hCwnUmvF UG1ry8hdIexJNSV+ba8aKlday2xVvtquLS6qj4bq/C5GwKLEPOAvfUCsnQGE1WvKLTqJ yvaTbIXfsmvnh5AcKbngYaOhEsNvKqp42obZPmyV2ZSGNsm+JW5DyhkOWc8VpiTuyqLw SKAPpUrc4e3E0U+yQ/k8Ru3rAdTts0qP5Tmj/8efRrzDTlgH2GA+AuqL3QmZzweZJBrV +e1A== X-Gm-Message-State: APt69E329ue+Mg2J1Jsw6+GA07l1SkcRBmGOQ0wnT1YmekK9WNghf8uJ PUnoKx/jIt9kkabsnUZAwS0= X-Google-Smtp-Source: ADUXVKLdncNls1bOZg0r8X8jspAdxVGDZv4FN58mvy+TNEH7vDetyq4lOLeRZ7q1v1MZJgpXzwK+sg== X-Received: by 2002:a37:bf42:: with SMTP id p63-v6mr22538818qkf.240.1529601212336; Thu, 21 Jun 2018 10:13:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Stefan Hajnoczi , Alistair Francis Date: Thu, 21 Jun 2018 14:12:55 -0300 Message-Id: <20180621171257.14897-10-f4bug@amsat.org> X-Mailer: git-send-email 2.18.0.rc2 In-Reply-To: <20180621171257.14897-1-f4bug@amsat.org> References: <20180621171257.14897-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PATCH 09/11] hw/net/etraxfs_eth: 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: qemu-trivial@nongnu.org, "Edgar E. Iglesias" , Jason Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Suggested-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/etraxfs_eth.c | 8 ++++---- hw/net/trace-events | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/net/etraxfs_eth.c b/hw/net/etraxfs_eth.c index 013c8d0a41..a6932432b1 100644 --- a/hw/net/etraxfs_eth.c +++ b/hw/net/etraxfs_eth.c @@ -27,6 +27,7 @@ #include "net/net.h" #include "hw/cris/etraxfs.h" #include "qemu/error-report.h" +#include "trace.h" =20 #define D(x) =20 @@ -106,7 +107,7 @@ static unsigned int tdk_read(struct qemu_phy *phy, unsi= gned int req) r =3D phy->regs[regnum]; break; } - D(printf("\n%s %x =3D reg[%d]\n", __func__, r, regnum)); + trace_mdio_phy_read(regnum, r); return r; } =20 @@ -116,7 +117,7 @@ tdk_write(struct qemu_phy *phy, unsigned int req, unsig= ned int data) int regnum; =20 regnum =3D req & 0x1f; - D(printf("%s reg[%d] =3D %x\n", __func__, regnum, data)); + trace_mdio_phy_write(regnum, data); switch (regnum) { default: phy->regs[regnum] =3D data; @@ -206,8 +207,7 @@ static void mdio_cycle(struct qemu_mdio *bus) { bus->cnt++; =20 - D(printf("mdc=3D%d mdio=3D%d state=3D%d cnt=3D%d drv=3D%d\n", - bus->mdc, bus->mdio, bus->state, bus->cnt, bus->drive)); + trace_mdio_bitbang(bus->mdc, bus->mdio, bus->state, bus->cnt, bus->dri= ve); #if 0 if (bus->mdc) { printf("%d", bus->mdio); diff --git a/hw/net/trace-events b/hw/net/trace-events index f57010df37..663bea1b74 100644 --- a/hw/net/trace-events +++ b/hw/net/trace-events @@ -1,5 +1,10 @@ # See docs/devel/tracing.txt for syntax documentation. =20 +# hw/net/etraxfs_eth.c +mdio_phy_read(int regnum, uint16_t value) "read phy_reg:%d value:0x%04x" +mdio_phy_write(int regnum, uint16_t value) "write phy_reg:%d value:0x%04x" +mdio_bitbang(bool mdc, bool mdio, int state, uint16_t cnt, unsigned int dr= ive) "bitbang mdc=3D%u mdio=3D%u state=3D%d cnt=3D%u drv=3D%d" + # hw/net/lance.c lance_mem_readw(uint64_t addr, uint32_t ret) "addr=3D0x%"PRIx64"val=3D0x%0= 4x" lance_mem_writew(uint64_t addr, uint32_t val) "addr=3D0x%"PRIx64"val=3D0x%= 04x" --=20 2.18.0.rc2