[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] Introduce tracing for 9p pdu handlers
From: |
Aneesh Kumar K.V |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] Introduce tracing for 9p pdu handlers |
Date: |
Fri, 30 Sep 2011 10:56:58 +0530 |
User-agent: |
Notmuch/0.9_rc1 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) |
On Thu, 29 Sep 2011 18:09:48 +0530, Harsh Prateek Bora <address@hidden> 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 <address@hidden>
> ---
> 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