From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeO7w-0000xf-0s for qemu-devel@nongnu.org; Mon, 20 May 2013 07:19:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeO7q-0007y8-Ei for qemu-devel@nongnu.org; Mon, 20 May 2013 07:19:39 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:51578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeO7q-0007xt-7V for qemu-devel@nongnu.org; Mon, 20 May 2013 07:19:34 -0400 Message-ID: <519A06BE.4010707@weilnetz.de> Date: Mon, 20 May 2013 13:19:26 +0200 From: Stefan Weil MIME-Version: 1.0 References: <1369045989-14016-1-git-send-email-hpoussin@reactos.org> In-Reply-To: <1369045989-14016-1-git-send-email-hpoussin@reactos.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH for-1.5] osdep: fix qemu_anon_ram_free trace (+ fix compilation on 32 bit hosts) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?SGVydsOpIFBvdXNzaW5lYXU=?= Cc: Paolo Bonzini , Anthony Liguori , qemu-devel@nongnu.org Am 20.05.2013 12:33, schrieb Herv=C3=A9 Poussineau: > Commit e7a09b92b70786f9e8c5fbf787e0248c6ebbe707 added a trace at each > memory freeing, but unfortunately inverted size and pointer when printi= ng > them. Fix trace. > > This also led to a compilation error on 32 bit hosts: > In file included from include/trace.h:4:0, > from trace/generated-events.c:3: > ./trace/generated-tracers.h: In function =E2=80=98trace_qemu_anon_ram_f= ree=E2=80=99: > ./trace/generated-tracers.h:64:9: error: format =E2=80=98%zu=E2=80=99 e= xpects argument of type > =E2=80=98size_t=E2=80=99, but argument 3 has type =E2=80=98void *=E2=80= =99 [-Werror=3Dformat] > ./trace/generated-tracers.h:64:9: error: format =E2=80=98%p=E2=80=99 ex= pects argument of type > =E2=80=98void *=E2=80=99, but argument 4 has type =E2=80=98size_t=E2=80= =99 [-Werror=3Dformat] > > Signed-off-by: Herv=C3=A9 Poussineau > --- > trace-events | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/trace-events b/trace-events > index c03b9cb..9c73931 100644 > --- a/trace-events > +++ b/trace-events > @@ -34,7 +34,7 @@ g_free(void *ptr) "ptr %p" > qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu= size %zu ptr %p" > qemu_anon_ram_alloc(size_t size, void *ptr) "size %zu ptr %p" > qemu_vfree(void *ptr) "ptr %p" > -qemu_anon_ram_free(void *ptr, size_t size) "size %zu ptr %p" > +qemu_anon_ram_free(void *ptr, size_t size) "ptr %p size %zu" > =20 > # hw/virtio.c > virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned = int idx) "vq %p elem %p len %u idx %u" See http://patchwork.ozlabs.org/patch/244757/ which also fixes that code. Regards, Stefan Weil