From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIFdv-0004yu-Kf for qemu-devel@nongnu.org; Mon, 24 Oct 2011 04:12:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIFdr-0003QI-7p for qemu-devel@nongnu.org; Mon, 24 Oct 2011 04:12:23 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:38563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIFdq-0003Q8-Vb for qemu-devel@nongnu.org; Mon, 24 Oct 2011 04:12:19 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 24 Oct 2011 04:12:17 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p9O8Bjmc275740 for ; Mon, 24 Oct 2011 04:11:46 -0400 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p9O8BjMg009000 for ; Mon, 24 Oct 2011 02:11:45 -0600 From: "Aneesh Kumar K.V" In-Reply-To: <87wrbuud6y.fsf@linux.vnet.ibm.com> References: <201110202320.54504.jcmvbkbc@gmail.com> <87y5we4byh.fsf@linux.vnet.ibm.com> <4EA41CB3.9060405@web.de> <87wrbuud6y.fsf@linux.vnet.ibm.com> Date: Mon, 24 Oct 2011 13:41:33 +0530 Message-ID: <87ty6yu7uy.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] build with trace enabled is broken by the commit c572f23a3e7180dbeab5e86583e43ea2afed6271 hw/9pfs: Introduce tracing for 9p pdu handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Max Filippov , Harsh Prateek Bora , qemu-devel On Mon, 24 Oct 2011 11:46:21 +0530, "Aneesh Kumar K.V" wrote: > On Sun, 23 Oct 2011 15:54:59 +0200, Jan Kiszka wrote: > > On 2011-10-21 17:10, Aneesh Kumar K.V wrote: > > > On Thu, 20 Oct 2011 23:20:54 +0400, Max Filippov = wrote: > > >> Hi. > > >> > > >> Current git head build with trace enabled is broken by the commit c5= 72f23a3e7180dbeab5e86583e43ea2afed6271 hw/9pfs: Introduce tracing for 9p pd= u handlers. > > >> Error messages: > > >> > > >> In file included from trace.c:2:0: > > >> trace.h: In function =E2=80=98trace_v9fs_attach=E2=80=99: > > >> trace.h:2850:9: error: too many arguments for format [-Werror=3Dform= at-extra-args] > > >> trace.h: In function =E2=80=98trace_v9fs_wstat=E2=80=99: > > >> trace.h:3039:9: error: too many arguments for format [-Werror=3Dform= at-extra-args] > > >> trace.h: In function =E2=80=98trace_v9fs_mkdir=E2=80=99: > > >> trace.h:3088:9: error: too many arguments for format [-Werror=3Dform= at-extra-args] > > >> trace.h: In function =E2=80=98trace_v9fs_mkdir_return=E2=80=99: > > >> trace.h:3095:9: error: too many arguments for format [-Werror=3Dform= at-extra-args] > > >> cc1: all warnings being treated as errors > > >> > > >> Prototypes in the trace-events do not match format strings, e.g. > > >> > > >> v9fs_attach(uint16_t tag, uint8_t id, int32_t fid, int32_t afid, cha= r* uname, char* aname) "tag %d id %d fid %d afid %d aname %s" > > >> > > >> The following patch fixes it, but I'm not sure the format lines are = appropriate. > > >=20 > > > Can you send the patch with signed-off-by: I will add it in the next > > > pull request. > >=20 > > There are more breakages with tracing enabled: > >=20 > > CC libhw64/9pfs/virtio-9p.o > > cc1: warnings being treated as errors > > /data/qemu/hw/9pfs/virtio-9p.c: In function =E2=80=98v9fs_create=E2=80= =99: > > /data/qemu/hw/9pfs/virtio-9p.c:2225:9: error: =E2=80=98iounit=E2=80=99 = may be used uninitialized in this function=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 > > /data/qemu/hw/9pfs/virtio-9p.c: In function =E2=80=98v9fs_readdir=E2=80= =99: > > /data/qemu/hw/9pfs/virtio-9p.c:2063:13: error: =E2=80=98count=E2=80=99 = may be used uninitialized in this function=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 > > /data/qemu/hw/9pfs/virtio-9p.c: In function =E2=80=98v9fs_xattrwalk=E2= =80=99: > > /data/qemu/hw/9pfs/virtio-9p.c:3103:13: error: =E2=80=98size=E2=80=99 m= ay be used uninitialized in this function=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 > > /data/qemu/hw/9pfs/virtio-9p.c: In function =E2=80=98v9fs_lcreate=E2=80= =99: > > /data/qemu/hw/9pfs/virtio-9p.c:1730:13: error: =E2=80=98iounit=E2=80=99= may be used uninitialized in this function=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 > > /data/qemu/hw/9pfs/virtio-9p.c: In function =E2=80=98v9fs_open=E2=80=99: > > /data/qemu/hw/9pfs/virtio-9p.c:1651:9: error: =E2=80=98iounit=E2=80=99 = may be used uninitialized in this function=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 > >=20 > > Not sure what the undefined variables are supposed to contain for the > > trace output, so I refrain from writing any patch. >=20 > Ok i am testing VirtFS tracing and will send a patch that should fix these > issues. Sorry for all inconvenience. Even though i do test on > three different distros, all of them were done without tracing enabled. Can you try this patch. I will still like to get more testing tracing all 9p operations and making sure python script is correct. commit fe80ec13e59b581cba530e923e20df3fe9957177 Author: Aneesh Kumar K.V Date: Mon Oct 24 11:49:17 2011 +0530 hw/9pfs: Make VirtTFS work correctly =20=20=20=20 this patch fix multiple issues with VitFS tracing. a) Add tracepoint to the correct code path. We handle error in complete= _pdu b) Fix indentation in python script c) Fix variable naming issue in python script =20=20=20=20 Signed-off-by: Aneesh Kumar K.V diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c index aab3beb..8b6813f 100644 --- a/hw/9pfs/virtio-9p.c +++ b/hw/9pfs/virtio-9p.c @@ -969,7 +969,7 @@ static void complete_pdu(V9fsState *s, V9fsPDU *pdu, ss= ize_t len) if (s->proto_version =3D=3D V9FS_PROTO_2000L) { id =3D P9_RLERROR; } - trace_complete_pdu(pdu->tag, pdu->id, err); /* Trace ERROR */ + trace_v9fs_rerror(pdu->tag, pdu->id, err); /* Trace ERROR */ } =20 /* fill out the header */ @@ -1332,11 +1332,11 @@ static void v9fs_attach(void *opaque) } offset +=3D pdu_marshal(pdu, offset, "Q", &qid); err =3D offset; + trace_v9fs_attach_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_attach_return(pdu->tag, pdu->id, - qid.type, qid.version, qid.path); complete_pdu(s, pdu, err); v9fs_string_free(&uname); v9fs_string_free(&aname); @@ -1371,13 +1371,12 @@ static void v9fs_stat(void *opaque) } offset +=3D pdu_marshal(pdu, offset, "wS", 0, &v9stat); err =3D offset; + trace_v9fs_stat_return(pdu->tag, pdu->id, v9stat.mode, + v9stat.atime, v9stat.mtime, v9stat.length); v9fs_stat_free(&v9stat); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_stat_return(pdu->tag, pdu->id, v9stat.mode, - v9stat.atime, v9stat.mtime, v9stat.length); - complete_pdu(s, pdu, err); } =20 @@ -1421,13 +1420,12 @@ static void v9fs_getattr(void *opaque) } retval =3D offset; retval +=3D pdu_marshal(pdu, offset, "A", &v9stat_dotl); -out: - put_fid(pdu, fidp); -out_nofid: trace_v9fs_getattr_return(pdu->tag, pdu->id, v9stat_dotl.st_result_mas= k, v9stat_dotl.st_mode, v9stat_dotl.st_uid, v9stat_dotl.st_gid); - +out: + put_fid(pdu, fidp); +out_nofid: complete_pdu(s, pdu, retval); } =20 @@ -1605,6 +1603,7 @@ static void v9fs_walk(void *opaque) v9fs_path_copy(&newfidp->path, &path); } err =3D v9fs_walk_marshal(pdu, nwnames, qids); + trace_v9fs_walk_return(pdu->tag, pdu->id, nwnames, qids); out: put_fid(pdu, fidp); if (newfidp) { @@ -1613,7 +1612,6 @@ out: v9fs_path_free(&dpath); v9fs_path_free(&path); out_nofid: - trace_v9fs_walk_return(pdu->tag, pdu->id, nwnames, qids); complete_pdu(s, pdu, err); if (nwnames && nwnames <=3D P9_MAXWELEM) { for (name_idx =3D 0; name_idx < nwnames; name_idx++) { @@ -1648,10 +1646,10 @@ static int32_t get_iounit(V9fsPDU *pdu, V9fsPath *p= ath) static void v9fs_open(void *opaque) { int flags; - int iounit; int32_t fid; int32_t mode; V9fsQID qid; + int iounit =3D 0; ssize_t err =3D 0; size_t offset =3D 7; struct stat stbuf; @@ -1709,11 +1707,11 @@ static void v9fs_open(void *opaque) offset +=3D pdu_marshal(pdu, offset, "Qd", &qid, iounit); err =3D offset; } + trace_v9fs_open_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path, iounit); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_open_return(pdu->tag, pdu->id, - qid.type, qid.version, qid.path, iounit); complete_pdu(s, pdu, err); } =20 @@ -1759,11 +1757,11 @@ static void v9fs_lcreate(void *opaque) stat_to_qid(&stbuf, &qid); offset +=3D pdu_marshal(pdu, offset, "Qd", &qid, iounit); err =3D offset; + trace_v9fs_lcreate_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path, iounit); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_lcreate_return(pdu->tag, pdu->id, - qid.type, qid.version, qid.path, iounit); complete_pdu(pdu->s, pdu, err); v9fs_string_free(&name); } @@ -1978,10 +1976,10 @@ static void v9fs_read(void *opaque) } else { err =3D -EINVAL; } + trace_v9fs_read_return(pdu->tag, pdu->id, count, err); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_read_return(pdu->tag, pdu->id, count, err); complete_pdu(s, pdu, err); } =20 @@ -2090,10 +2088,10 @@ static void v9fs_readdir(void *opaque) retval =3D offset; retval +=3D pdu_marshal(pdu, offset, "d", count); retval +=3D count; + trace_v9fs_readdir_return(pdu->tag, pdu->id, count, retval); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_readdir_return(pdu->tag, pdu->id, count, retval); complete_pdu(s, pdu, retval); } =20 @@ -2202,10 +2200,10 @@ static void v9fs_write(void *opaque) } while (total < count && len > 0); offset +=3D pdu_marshal(pdu, offset, "d", total); err =3D offset; + trace_v9fs_write_return(pdu->tag, pdu->id, total, err); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_write_return(pdu->tag, pdu->id, total, err); complete_pdu(s, pdu, err); } =20 @@ -2362,11 +2360,11 @@ static void v9fs_create(void *opaque) stat_to_qid(&stbuf, &qid); offset +=3D pdu_marshal(pdu, offset, "Qd", &qid, iounit); err =3D offset; + trace_v9fs_create_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path, iounit); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_create_return(pdu->tag, pdu->id, - qid.type, qid.version, qid.path, iounit); complete_pdu(pdu->s, pdu, err); v9fs_string_free(&name); v9fs_string_free(&extension); @@ -2401,11 +2399,11 @@ static void v9fs_symlink(void *opaque) stat_to_qid(&stbuf, &qid); offset +=3D pdu_marshal(pdu, offset, "Q", &qid); err =3D offset; + trace_v9fs_symlink_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path); out: put_fid(pdu, dfidp); out_nofid: - trace_v9fs_symlink_return(pdu->tag, pdu->id, - qid.type, qid.version, qid.path); complete_pdu(pdu->s, pdu, err); v9fs_string_free(&name); v9fs_string_free(&symname); @@ -2950,10 +2948,11 @@ static void v9fs_mknod(void *opaque) stat_to_qid(&stbuf, &qid); err =3D offset; err +=3D pdu_marshal(pdu, offset, "Q", &qid); + trace_v9fs_mknod_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_mknod_return(pdu->tag, pdu->id, qid.type, qid.version, qid.= path); complete_pdu(s, pdu, err); v9fs_string_free(&name); } @@ -3049,12 +3048,11 @@ static void v9fs_getlock(void *opaque) glock->start, glock->length, glock->proc_id, &glock->client_id); err =3D offset; + trace_v9fs_getlock_return(pdu->tag, pdu->id, glock->type, glock->start, + glock->length, glock->proc_id); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_getlock_return(pdu->tag, pdu->id, glock->type, glock->start, - glock->length, glock->proc_id); - complete_pdu(s, pdu, err); v9fs_string_free(&glock->client_id); g_free(glock); @@ -3089,11 +3087,11 @@ static void v9fs_mkdir(void *opaque) stat_to_qid(&stbuf, &qid); offset +=3D pdu_marshal(pdu, offset, "Q", &qid); err =3D offset; + trace_v9fs_mkdir_return(pdu->tag, pdu->id, + qid.type, qid.version, qid.path, err); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_mkdir_return(pdu->tag, pdu->id, - qid.type, qid.version, qid.path, err); complete_pdu(pdu->s, pdu, err); v9fs_string_free(&name); } @@ -3183,13 +3181,13 @@ static void v9fs_xattrwalk(void *opaque) offset +=3D pdu_marshal(pdu, offset, "q", size); err =3D offset; } + trace_v9fs_xattrwalk_return(pdu->tag, pdu->id, size); out: put_fid(pdu, file_fidp); if (xattr_fidp) { put_fid(pdu, xattr_fidp); } out_nofid: - trace_v9fs_xattrwalk_return(pdu->tag, pdu->id, size); complete_pdu(s, pdu, err); v9fs_string_free(&name); } @@ -3260,11 +3258,11 @@ static void v9fs_readlink(void *opaque) } offset +=3D pdu_marshal(pdu, offset, "s", &target); err =3D offset; + trace_v9fs_readlink_return(pdu->tag, pdu->id, target.data); v9fs_string_free(&target); out: put_fid(pdu, fidp); out_nofid: - trace_v9fs_readlink_return(pdu->tag, pdu->id, target.data); complete_pdu(pdu->s, pdu, err); } =20 diff --git a/scripts/analyse-9p-simpletrace.py b/scripts/analyse-9p-simplet= race.py index 4358d6b..5beec06 100755 --- a/scripts/analyse-9p-simpletrace.py +++ b/scripts/analyse-9p-simpletrace.py @@ -7,11 +7,11 @@ import simpletrace =20 class VirtFSRequestTracker(simpletrace.Analyzer): - def begin(self): - print "Pretty printing 9p simpletrace log ..." + def begin(self): + print "Pretty printing 9p simpletrace log ..." =20 - def complete_pdu(self, tag, id, err): - print "ERROR (tag =3D", tag, ", id =3D", id, ",err =3D", e= rr, ")" + def v9fs_rerror(self, tag, id, err): + print "RERROR (tag =3D", tag, ", id =3D", id, ",err =3D", = err, ")" =20 def v9fs_version(self, tag, id, msize, version): print "TVERSION (tag =3D", tag, ", msize =3D", msize, ", v= ersion =3D", version, ")" @@ -22,121 +22,121 @@ class VirtFSRequestTracker(simpletrace.Analyzer): def v9fs_attach(self, tag, id, fid, afid, uname, aname): print "TATTACH (tag =3D", tag, ", fid =3D", fid, ", afid = =3D", afid, ", uname =3D", uname, ", aname =3D", aname, ")" =20 - def v9fs_attach_return(self, tag, id, type, verison, path): - print "RATTACH (tag =3D", tag, ", qid=3D{type =3D", type, ", version =3D= ", version, ", path =3D", path, "})" + def v9fs_attach_return(self, tag, id, type, version, path): + print "RATTACH (tag =3D", tag, ", qid=3D{type =3D", type, = ", version =3D", version, ", path =3D", path, "})" =20 - def v9fs_stat(self, tag, id, fid): - print "TSTAT (tag =3D", tag, ", fid =3D", fid, ")" + def v9fs_stat(self, tag, id, fid): + print "TSTAT (tag =3D", tag, ", fid =3D", fid, ")" =20 - def v9fs_stat_return(self, tag, id, mode, atime, mtime, length): - print "RSTAT (tag =3D", tag, ", mode =3D", mode, ", atime =3D", atime, "= , mtime =3D", mtime, ", length =3D", length, ")" + def v9fs_stat_return(self, tag, id, mode, atime, mtime, length): + print "RSTAT (tag =3D", tag, ", mode =3D", mode, ", atime = =3D", atime, ", mtime =3D", mtime, ", length =3D", length, ")" =20 - def v9fs_getattr(self, tag, id, fid, request_mask): - print "TGETATTR (tag =3D", tag, ", fid =3D", fid, ", request_mask =3D", = hex(request_mask), ")" + def v9fs_getattr(self, tag, id, fid, request_mask): + print "TGETATTR (tag =3D", tag, ", fid =3D", fid, ", reque= st_mask =3D", hex(request_mask), ")" =20 - def v9fs_getattr_return(self, tag, id, result_mask, mode, uid, gid): - print "RGETATTR (tag =3D", tag, ", result_mask =3D", hex(result_mask), "= , mode =3D", oct(mode), ", uid =3D", uid, ", gid =3D", gid, ")" + def v9fs_getattr_return(self, tag, id, result_mask, mode, uid, gid= ): + print "RGETATTR (tag =3D", tag, ", result_mask =3D", hex(r= esult_mask), ", mode =3D", oct(mode), ", uid =3D", uid, ", gid =3D", gid, "= )" =20 - def v9fs_walk(self, tag, id, fid, newfid, nwnames): - print "TWALK (tag =3D", tag, ", fid =3D", fid, ", newfid =3D", newfid, "= , nwnames =3D", nwnames, ")" + def v9fs_walk(self, tag, id, fid, newfid, nwnames): + print "TWALK (tag =3D", tag, ", fid =3D", fid, ", newfid = =3D", newfid, ", nwnames =3D", nwnames, ")" =20 - def v9fs_walk_return(self, tag, id, nwnames, qids): - print "RWALK (tag =3D", tag, ", nwnames =3D", nwnames, ", qids =3D", hex= (qids), ")" + def v9fs_walk_return(self, tag, id, nwnames, qids): + print "RWALK (tag =3D", tag, ", nwnames =3D", nwnames, ", = qids =3D", hex(qids), ")" =20 - def v9fs_open(self, tag, id, fid, mode): - print "TOPEN (tag =3D", tag, ", fid =3D", fid, ", mode =3D", oct(mode), = ")" + def v9fs_open(self, tag, id, fid, mode): + print "TOPEN (tag =3D", tag, ", fid =3D", fid, ", mode =3D= ", oct(mode), ")" =20 - def v9fs_open_return(self, tag, id, type, version, path, iounit): - print "ROPEN (tag =3D", tag, ", qid=3D{type =3D", type, ", version =3D"= , version, ", path =3D", path, "}, iounit =3D", iounit, ")" + def v9fs_open_return(self, tag, id, type, version, path, iounit): + print "ROPEN (tag =3D", tag, ", qid=3D{type =3D", type, "= , version =3D", version, ", path =3D", path, "}, iounit =3D", iounit, ")" =20 - def v9fs_lcreate(self, tag, id, dfid, flags, mode, gid): - print "TLCREATE (tag =3D", tag, ", dfid =3D", dfid, ", flags =3D", oct(f= lags), ", mode =3D", oct(mode), ", gid =3D", gid, ")" + def v9fs_lcreate(self, tag, id, dfid, flags, mode, gid): + print "TLCREATE (tag =3D", tag, ", dfid =3D", dfid, ", fla= gs =3D", oct(flags), ", mode =3D", oct(mode), ", gid =3D", gid, ")" =20 - def v9fs_lcreate_return(self, id, type, version, path, iounit): - print "RLCREATE (tag =3D", tag, ", qid=3D{type =3D", type, ", version = =3D", version, ", path =3D", path, "}, iounit =3D", iounit, ")" + def v9fs_lcreate_return(self, tag, id, type, version, path, iounit= ): + print "RLCREATE (tag =3D", tag, ", qid=3D{type =3D", type= , ", version =3D", version, ", path =3D", path, "}, iounit =3D", iounit, ")" =20 - def v9fs_fsync(self, tag, id, fid, datasync): - print "TFSYNC (tag =3D", tag, ", fid =3D", fid, ", datasync =3D", datasy= nc, ")" + def v9fs_fsync(self, tag, id, fid, datasync): + print "TFSYNC (tag =3D", tag, ", fid =3D", fid, ", datasyn= c =3D", datasync, ")" =20 - def v9fs_clunk(self, tag, id, fid): - print "TCLUNK (tag =3D", tag, ", fid =3D", fid, ")" + def v9fs_clunk(self, tag, id, fid): + print "TCLUNK (tag =3D", tag, ", fid =3D", fid, ")" =20 - def v9fs_read(self, tag, id, fid, off, max_count): - print "TREAD (tag =3D", tag, ", fid =3D", fid, ", off =3D", off, ", max_= count =3D", max_count, ")" + def v9fs_read(self, tag, id, fid, off, max_count): + print "TREAD (tag =3D", tag, ", fid =3D", fid, ", off =3D"= , off, ", max_count =3D", max_count, ")" =20 - def v9fs_read_return(self, tag, id, count, err): - print "RREAD (tag =3D", tag, ", count =3D", count, ", err =3D", err, ")" + def v9fs_read_return(self, tag, id, count, err): + print "RREAD (tag =3D", tag, ", count =3D", count, ", err = =3D", err, ")" =20 - def v9fs_readdir(self, tag, id, fid, offset, max_count): - print "TREADDIR (tag =3D", tag, ", fid =3D", fid, ", offset =3D", offset= , ", max_count =3D", max_count, ")" + def v9fs_readdir(self, tag, id, fid, offset, max_count): + print "TREADDIR (tag =3D", tag, ", fid =3D", fid, ", offse= t =3D", offset, ", max_count =3D", max_count, ")" =20 - def v9fs_readdir_return(self, tag, id, count, retval): - print "RREADDIR (tag =3D", tag, ", count =3D", count, ", retval =3D", re= tval, ")" + def v9fs_readdir_return(self, tag, id, count, retval): + print "RREADDIR (tag =3D", tag, ", count =3D", count, ", r= etval =3D", retval, ")" =20 - def v9fs_write(self, tag, id, fid, off, count, cnt): - print "TWRITE (tag =3D", tag, ", fid =3D", fid, ", off =3D", off, ", cou= nt =3D", count, ", cnt =3D", cnt, ")" + def v9fs_write(self, tag, id, fid, off, count, cnt): + print "TWRITE (tag =3D", tag, ", fid =3D", fid, ", off =3D= ", off, ", count =3D", count, ", cnt =3D", cnt, ")" =20 - def v9fs_write_return(self, tag, id, total, err): - print "RWRITE (tag =3D", tag, ", total =3D", total, ", err =3D", err, ")" + def v9fs_write_return(self, tag, id, total, err): + print "RWRITE (tag =3D", tag, ", total =3D", total, ", err= =3D", err, ")" =20 - def v9fs_create(self, tag, id, fid, perm, name, mode): - print "TCREATE (tag =3D", tag, ", fid =3D", fid, ", perm =3D", oct(perm)= , ", name =3D", name, ", mode =3D", oct(mode), ")" + def v9fs_create(self, tag, id, fid, name, perm, mode): + print "TCREATE (tag =3D", tag, ", fid =3D", fid, ", perm = =3D", oct(perm), ", name =3D", name, ", mode =3D", oct(mode), ")" =20 - def v9fs_create_return(self, tag, id, type, verison, path, iounit): - print "RCREATE (tag =3D", tag, ", qid=3D{type =3D", type, ", version = =3D", version, ", path =3D", path, "}, iounit =3D", iounit, ")" + def v9fs_create_return(self, tag, id, type, verison, path, iounit): + print "RCREATE (tag =3D", tag, ", qid=3D{type =3D", type,= ", version =3D", version, ", path =3D", path, "}, iounit =3D", iounit, ")" =20 - def v9fs_symlink(self, tag, id, fid, name, symname, gid): - print "TSYMLINK (tag =3D", tag, ", fid =3D", fid, ", name =3D", name, ",= symname =3D", symname, ", gid =3D", gid, ")" + def v9fs_symlink(self, tag, id, fid, name, symname, gid): + print "TSYMLINK (tag =3D", tag, ", fid =3D", fid, ", name = =3D", name, ", symname =3D", symname, ", gid =3D", gid, ")" =20 - def v9fs_symlink_return(self, tag, id, type, version, path): - print "RSYMLINK (tag =3D", tag, ", qid=3D{type =3D", type, ", version = =3D", version, ", path =3D", path, "})" + def v9fs_symlink_return(self, tag, id, type, version, path): + print "RSYMLINK (tag =3D", tag, ", qid=3D{type =3D", type= , ", version =3D", version, ", path =3D", path, "})" =20 - def v9fs_flush(self, tag, id, flush_tag): - print "TFLUSH (tag =3D", tag, ", flush_tag =3D", flush_tag, ")" + def v9fs_flush(self, tag, id, flush_tag): + print "TFLUSH (tag =3D", tag, ", flush_tag =3D", flush_tag= , ")" =20 - def v9fs_link(self, tag, id, dfid, oldfid, name): - print "TLINK (tag =3D", tag, ", dfid =3D", dfid, ", oldfid =3D", oldfid,= ", name =3D", name, ")" + def v9fs_link(self, tag, id, dfid, oldfid, name): + print "TLINK (tag =3D", tag, ", dfid =3D", dfid, ", oldfid= =3D", oldfid, ", name =3D", name, ")" =20 - def v9fs_remove(self, tag, id, fid): - print "TREMOVE (tag =3D", tag, ", fid =3D", fid, ")" + def v9fs_remove(self, tag, id, fid): + print "TREMOVE (tag =3D", tag, ", fid =3D", fid, ")" =20 - def v9fs_wstat(self, tag, id, fid, mode, atime, mtime): - print "TWSTAT (tag =3D", tag, ", fid =3D", fid, ", mode =3D", oct(mode),= ", atime =3D", atime, "mtime =3D", mtime, ")" + def v9fs_wstat(self, tag, id, fid, mode, atime, mtime): + print "TWSTAT (tag =3D", tag, ", fid =3D", fid, ", mode = =3D", oct(mode), ", atime =3D", atime, "mtime =3D", mtime, ")" =20 - def v9fs_mknod(self, tag, id, fid, mode, major, minor): - print "TMKNOD (tag =3D", tag, ", fid =3D", fid, ", mode =3D", oct(mode),= ", major =3D", major, ", minor =3D", minor, ")" + def v9fs_mknod(self, tag, id, fid, mode, major, minor): + print "TMKNOD (tag =3D", tag, ", fid =3D", fid, ", mode = =3D", oct(mode), ", major =3D", major, ", minor =3D", minor, ")" =20 - def v9fs_lock(self, tag, id, fid, type, start, length): - print "TLOCK (tag =3D", tag, ", fid =3D", fid, "type =3D", type, ", star= t =3D", start, ", length =3D", length, ")" + def v9fs_lock(self, tag, id, fid, type, start, length): + print "TLOCK (tag =3D", tag, ", fid =3D", fid, "type =3D",= type, ", start =3D", start, ", length =3D", length, ")" =20 - def v9fs_lock_return(self, tag, id, status): - print "RLOCK (tag =3D", tag, ", status =3D", status, ")" + def v9fs_lock_return(self, tag, id, status): + print "RLOCK (tag =3D", tag, ", status =3D", status, ")" =20 - def v9fs_getlock(self, tag, id, fid, type, start, length): - print "TGETLOCK (tag =3D", tag, ", fid =3D", fid, "type =3D", type, ", s= tart =3D", start, ", length =3D", length, ")" + def v9fs_getlock(self, tag, id, fid, type, start, length): + print "TGETLOCK (tag =3D", tag, ", fid =3D", fid, "type = =3D", type, ", start =3D", start, ", length =3D", length, ")" =20 - def v9fs_getlock_return(self, tag, id, type, start, length, proc_id): - print "RGETLOCK (tag =3D", tag, "type =3D", type, ", start =3D", start, = ", length =3D", length, ", proc_id =3D", proc_id, ")" + def v9fs_getlock_return(self, tag, id, type, start, length, proc_i= d): + print "RGETLOCK (tag =3D", tag, "type =3D", type, ", start= =3D", start, ", length =3D", length, ", proc_id =3D", proc_id, ")" =20 - def v9fs_mkdir(self, tag, id, fid, name, mode, gid): - print "TMKDIR (tag =3D", tag, ", fid =3D", fid, ", name =3D", name, ", m= ode =3D", mode, ", gid =3D", gid, ")" + def v9fs_mkdir(self, tag, id, fid, name, mode, gid): + print "TMKDIR (tag =3D", tag, ", fid =3D", fid, ", name = =3D", name, ", mode =3D", mode, ", gid =3D", gid, ")" =20 - def v9fs_mkdir_return(self, tag, id, type, version, path, err): - print "RMKDIR (tag =3D", tag, ", qid=3D{type =3D", type, ", version =3D= ", version, ", path =3D", path, "}, err =3D", err, ")" + def v9fs_mkdir_return(self, tag, id, type, version, path, err): + print "RMKDIR (tag =3D", tag, ", qid=3D{type =3D", type, = ", version =3D", version, ", path =3D", path, "}, err =3D", err, ")" =20 - def v9fs_xattrwalk(self, tag, id, fid, newfid, name): - print "TXATTRWALK (tag =3D", tag, ", fid =3D", fid, ", newfid =3D", newf= id, ", xattr name =3D", name, ")" + def v9fs_xattrwalk(self, tag, id, fid, newfid, name): + print "TXATTRWALK (tag =3D", tag, ", fid =3D", fid, ", new= fid =3D", newfid, ", xattr name =3D", name, ")" =20 - def v9fs_xattrwalk_return(self, tag, id, size): - print "RXATTRWALK (tag =3D", tag, ", xattrsize =3D", size, ")" + def v9fs_xattrwalk_return(self, tag, id, size): + print "RXATTRWALK (tag =3D", tag, ", xattrsize =3D", size= , ")" =20 - def v9fs_xattrcreate(self, tag, id, fid, name, size, flags): - print "TXATTRCREATE (tag =3D", tag, ", fid =3D", fid, ", name =3D", name= , ", xattrsize =3D", size, ", flags =3D", flags, ")" + def v9fs_xattrcreate(self, tag, id, fid, name, size, flags): + print "TXATTRCREATE (tag =3D", tag, ", fid =3D", fid, ", n= ame =3D", name, ", xattrsize =3D", size, ", flags =3D", flags, ")" =20 - def v9fs_readlink(self, tag, id, fid): - print "TREADLINK (tag =3D", tag, ", fid =3D", fid, ")" + def v9fs_readlink(self, tag, id, fid): + print "TREADLINK (tag =3D", tag, ", fid =3D", fid, ")" =20 - def v9fs_readlink_return(self, tag, id, target): - print "RREADLINK (tag =3D", tag, ", target =3D", target, ")" + def v9fs_readlink_return(self, tag, id, target): + print "RREADLINK (tag =3D", tag, ", target =3D", target, "= )" =20 simpletrace.run(VirtFSRequestTracker()) diff --git a/trace-events b/trace-events index 7f9cec4..0f0a6b0 100644 --- a/trace-events +++ b/trace-events @@ -554,7 +554,7 @@ open_eth_desc_read(uint32_t addr, uint32_t v) "DESC[%04= x] -> %08x" open_eth_desc_write(uint32_t addr, uint32_t v) "DESC[%04x] <- %08x" =20 # hw/9pfs/virtio-9p.c -complete_pdu(uint16_t tag, uint8_t id, int err) "tag %d id %d err %d" +v9fs_rerror(uint16_t tag, uint8_t id, int err) "tag %d id %d err %d" v9fs_version(uint16_t tag, uint8_t id, int32_t msize, char* version) "tag = %d id %d msize %d version %s" v9fs_version_return(uint16_t tag, uint8_t id, int32_t msize, char* version= ) "tag %d id %d msize %d version %s" v9fs_attach(uint16_t tag, uint8_t id, int32_t fid, int32_t afid, char* una= me, char* aname) "tag %u id %u fid %d afid %d uname %s aname %s"