From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkFTn-0003sC-3j for qemu-devel@nongnu.org; Wed, 14 Sep 2016 15:04:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkFTh-0004zC-2y for qemu-devel@nongnu.org; Wed, 14 Sep 2016 15:04:18 -0400 References: <1473878907-10477-1-git-send-email-lvivier@redhat.com> <1473878907-10477-2-git-send-email-lvivier@redhat.com> From: Eric Blake Message-ID: Date: Wed, 14 Sep 2016 14:04:10 -0500 MIME-Version: 1.0 In-Reply-To: <1473878907-10477-2-git-send-email-lvivier@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UCrdoF923oScs24UAxKHT9RXPw2WldbUg" Subject: Re: [Qemu-devel] [PATCH 1/5] spapr_drc: convert to trace framework instead of DPRINTF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , david@gibson.dropbear.id.au Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --UCrdoF923oScs24UAxKHT9RXPw2WldbUg From: Eric Blake To: Laurent Vivier , david@gibson.dropbear.id.au Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org Message-ID: Subject: Re: [Qemu-devel] [PATCH 1/5] spapr_drc: convert to trace framework instead of DPRINTF References: <1473878907-10477-1-git-send-email-lvivier@redhat.com> <1473878907-10477-2-git-send-email-lvivier@redhat.com> In-Reply-To: <1473878907-10477-2-git-send-email-lvivier@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/14/2016 01:48 PM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > hw/ppc/spapr_drc.c | 54 ++++++++++++++++++++-------------------------= -------- > hw/ppc/trace-events | 22 ++++++++++++++++++++++ > 2 files changed, 42 insertions(+), 34 deletions(-) >=20 > diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c > index 4b1a943..6e54fd4 100644 > --- a/hw/ppc/spapr_drc.c > +++ b/hw/ppc/spapr_drc.c > @@ -20,20 +20,7 @@ > #include "qapi/visitor.h" > #include "qemu/error-report.h" > #include "hw/ppc/spapr.h" /* for RTAS return codes */ > - > -/* #define DEBUG_SPAPR_DRC */ > - > -#ifdef DEBUG_SPAPR_DRC > -#define DPRINTF(fmt, ...) \ > - do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0) > -#define DPRINTFN(fmt, ...) \ > - do { DPRINTF(fmt, ## __VA_ARGS__); fprintf(stderr, "\n"); } while = (0) > -#else > -#define DPRINTF(fmt, ...) \ > - do { } while (0) Yay - you're also getting rid of bit-rotting format strings! > +++ b/hw/ppc/trace-events > @@ -35,6 +35,28 @@ spapr_iommu_ddw_create(uint64_t buid, uint32_t cfgad= dr, uint64_t pg_size, uint64 > spapr_iommu_ddw_remove(uint32_t liobn) "liobn=3D%"PRIx32 > spapr_iommu_ddw_reset(uint64_t buid, uint32_t cfgaddr) "buid=3D%"PRIx6= 4" addr=3D%"PRIx32 > =20 > +# hw/ppc/spapr_drc.c > + > +spapr_drc_set_isolation_state(uint32_t index, int state) "drc: 0x%"PRI= x32", state: %"PRIx32 Most trace files don't have a line between the comment and first relevant function... > # hw/ppc/ppc.c > ppc_tb_adjust(uint64_t offs1, uint64_t offs2, int64_t diff, int64_t se= conds) "adjusted from 0x%"PRIx64" to 0x%"PRIx64", diff %"PRId64" (%"PRId6= 4"s)" > =20 like this. With that fixed, Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --UCrdoF923oScs24UAxKHT9RXPw2WldbUg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX2Z8qAAoJEKeha0olJ0Nq9AIH/0Ivm6sW815UmM9a3eMJbQ9r wFxu8U+lXkZs3nNF7YSoUgFAcwR5/CN7dkSRB/G9Euf6L8QAA7GJmKbsbqaulon3 Q8MyEgs6O6xX383hyT4AGyibKde7kRXo5qWbGsUTIErkHX/tBSPg7h/2KbM8oxQk mRfyT+wBix1SEVxCo0l2MH5yaKDugZEwgRFk9z7EXk32KUe5TxqMCpicQMvpiNEr PwcJqCfe2v6kip12Z7SKcQ6IBNcC0wpSk2daPVECCYUC2kYo8hcY/7x1Fo88lYO/ ss6zsLR9ihbOwQIO9HvYFTPu967tFbnpOJn13e28G8hYSclSIkZBUYLqv1Ks+RM= =439H -----END PGP SIGNATURE----- --UCrdoF923oScs24UAxKHT9RXPw2WldbUg--