From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52935 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnIIV-0005KF-KG for qemu-devel@nongnu.org; Sun, 22 Aug 2010 17:41:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnIIU-0007NK-GC for qemu-devel@nongnu.org; Sun, 22 Aug 2010 17:41:47 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:44900) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnIIU-0007NG-BE for qemu-devel@nongnu.org; Sun, 22 Aug 2010 17:41:46 -0400 Received: by ywa6 with SMTP id 6so1996253ywa.4 for ; Sun, 22 Aug 2010 14:41:45 -0700 (PDT) Message-ID: <4C719998.6030203@codemonkey.ws> Date: Sun, 22 Aug 2010 16:41:44 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 06/14] trace: Trace entry point of balloon request handler References: <1281609395-17621-1-git-send-email-stefanha@linux.vnet.ibm.com> <1281609395-17621-7-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1281609395-17621-7-git-send-email-stefanha@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Julien Desfossez , qemu-devel@nongnu.org, Prerna Saxena On 08/12/2010 05:36 AM, Stefan Hajnoczi wrote: > From: Prerna Saxena > > Signed-off-by: Prerna Saxena > Signed-off-by: Stefan Hajnoczi > --- > balloon.c | 2 ++ > trace-events | 4 ++++ > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/balloon.c b/balloon.c > index 8e0b7f1..0021fef 100644 > --- a/balloon.c > +++ b/balloon.c > @@ -29,6 +29,7 @@ > #include "cpu-common.h" > #include "kvm.h" > #include "balloon.h" > +#include "trace.h" > > > static QEMUBalloonEvent *qemu_balloon_event; > @@ -43,6 +44,7 @@ void qemu_add_balloon_handler(QEMUBalloonEvent *func, void *opaque) > int qemu_balloon(ram_addr_t target, MonitorCompletion cb, void *opaque) > { > if (qemu_balloon_event) { > + trace_balloon_event(qemu_balloon_event_opaque, target); > qemu_balloon_event(qemu_balloon_event_opaque, target, cb, opaque); > return 1; > } else { > diff --git a/trace-events b/trace-events > index c1f3e28..eae62da 100644 > --- a/trace-events > +++ b/trace-events > @@ -58,3 +58,7 @@ paio_submit(void *acb, void *opaque, unsigned long sector_num, unsigned long nb_ > # ioport.c > cpu_in(unsigned int addr, unsigned int val) "addr %#x value %u" > cpu_out(unsigned int addr, unsigned int val) "addr %#x value %u" > + > +# balloon.c > +# Since requests are raised via monitor, not many tracepoints are needed. > +balloon_event(void *opaque, unsigned long addr) "opaque %p addr %lu" > ram_addr_t is not necessarily an unsigned long. It's actually a uint64_t. Integer promotion should handle this in most cases but having the definition in two different places worries me a bit. Regards, Anthony Liguori