From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Vcq-0002Z6-IP for qemu-devel@nongnu.org; Fri, 30 Sep 2011 01:27:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9Vco-00047w-FL for qemu-devel@nongnu.org; Fri, 30 Sep 2011 01:27:08 -0400 Received: from e9.ny.us.ibm.com ([32.97.182.139]:51498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Vco-00047d-BG for qemu-devel@nongnu.org; Fri, 30 Sep 2011 01:27:06 -0400 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by e9.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p8U4pWib004924 for ; Fri, 30 Sep 2011 00:51:32 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p8U5R4ME267252 for ; Fri, 30 Sep 2011 01:27:04 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p8U5R3ui003880 for ; Fri, 30 Sep 2011 01:27:04 -0400 From: "Aneesh Kumar K.V" In-Reply-To: <1317299989-30571-2-git-send-email-harsh@linux.vnet.ibm.com> References: <1317299989-30571-1-git-send-email-harsh@linux.vnet.ibm.com> <1317299989-30571-2-git-send-email-harsh@linux.vnet.ibm.com> Date: Fri, 30 Sep 2011 10:56:58 +0530 Message-ID: <8739fer465.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 1/2] Introduce tracing for 9p pdu handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Harsh Prateek Bora , qemu-devel@nongnu.org Cc: stefanha@gmail.com On Thu, 29 Sep 2011 18:09:48 +0530, Harsh Prateek Bora wrote: > Plan is to replace the existing debug infrastructure with Qemu tracing > infrastructure so that user can dynamically enable/disable trace events and > therefore a meaningful trace log can be generated which can be further > filtered using analysis script. > > Note: Because of current simpletrace limitations, the trace events are > logging at max 6 args, however, once the more args are supported, we can > change trace events to log more info as well. Also, This initial patch only > provides a replacement for existing debug infra. More trace events to be > added later for newly added handlers and sub-routines. > > Signed-off-by: Harsh Prateek Bora > --- > hw/9pfs/virtio-9p.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++ > trace-events | 47 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 109 insertions(+), 0 deletions(-) > > diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c > index 1d1933f..6ee498f 100644 > --- a/hw/9pfs/virtio-9p.c > +++ b/hw/9pfs/virtio-9p.c > @@ -20,6 +20,7 @@ > #include "virtio-9p-debug.h" > #include "virtio-9p-xattr.h" > #include "virtio-9p-coth.h" > +#include "trace.h" > > int debug_9p_pdu; > int open_fd_hw; > @@ -977,6 +978,7 @@ static void complete_pdu(V9fsState *s, V9fsPDU *pdu, ssize_t len) > if (s->proto_version == V9FS_PROTO_2000L) { > id = P9_RLERROR; > } > + trace_complete_pdu(pdu->tag, pdu->id, id); /* Trace ERROR */ > } > > /* fill out the header */ > @@ -1286,6 +1288,7 @@ static void v9fs_version(void *opaque) > size_t offset = 7; > > pdu_unmarshal(pdu, offset, "ds", &s->msize, &version); > + trace_v9fs_version1(pdu->tag, pdu->id, s->msize, version.data); Can this be named trace_v9fs_version > > if (!strcmp(version.data, "9P2000.u")) { > s->proto_version = V9FS_PROTO_2000U; > @@ -1296,6 +1299,8 @@ static void v9fs_version(void *opaque) > } > > offset += pdu_marshal(pdu, offset, "ds", s->msize, &version); > + trace_v9fs_version2(pdu->tag, pdu->id, s->msize, version.data); > + and this one trace_v9fs_version_return -aneesh