lu lu
2007-Mar-29 06:43 UTC
[dtrace-discuss] how to add probes with different argument in a provider and in opensolaris ?
Hi All,
I am interested to add nfsv4 proble to opensolaris
from sam''s blog
http://blogs.sun.com/samf/entry/a_dtrace_provider_for_nfs
the probes about "op-<operation-name>" will be added,
there are two argument for those probes
arg[0] are the same for all the probes. it looks like:
typedef struct v4soinfo {
uint32_t xid;
char *tag;
char *addr;
} v4soinfo_t;
but the secound argument is different for every probe.
nfs::op-read:start READ4args
nfs::op-open:start OPEN4args
.............
for the code in
uts/common/dtrace/sdt_subr.c
...................
{ "io", "start", 0, 0, "buf_t *", "bufinfo_t
*" },
{ "io", "start", 1, 0, "buf_t *", "devinfo_t
*" },
{ "io", "start", 2, 0, "buf_t *", "fileinfo_t
*" },
.....................
all "start" probe of io provider are the same argument no matter
what''s
the function.
arg[0] bufinfo_t *
arg[1] devinfo_t *
arg[2] fileinfo_t*
but sam''s request different function have a different arg[1].
op-read--->READ4args
op-open--->OPEN4args
if all the function have the same arg[1], I can copy the code the same
with io provider,
but it is different.
how can I need to do?
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070329/6a6a7029/attachment.html>