Воропаев Павел
2010-Apr-07 15:38 UTC
[dtrace-discuss] newbie question about syscall provider
I''d like to collect filenames for every ioctl syscall. I found in manual that arg0-argN is arguments for system call like that ioctl <http://src.opensolaris.org/source/s?refs=ioctl&project=/onnv>(*int* fdes <http://src.opensolaris.org/source/s?defs=fdes&project=/onnv>, *int* cmd <http://src.opensolaris.org/source/s?defs=cmd&project=/onnv>, intptr_t <http://src.opensolaris.org/source/s?defs=intptr_t&project=/onnv> arg <http://src.opensolaris.org/source/s?defs=arg&project=/onnv>) ioctl(arg0,arg1,arg2) i found that arg0 is file_t type, and try to trace pathname dtrace -n ''syscall::ioctl:entry / execname != "dtrace" / { printf("%s %s",execname,arg0->f_vnode->v_path) }'' But i found that arg0 is not pointer at all. Now i complitly lost. ___________ Voropaev Pavel. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20100407/37cf1a1f/attachment.html>
Gonzalo Siero
2010-Apr-07 15:53 UTC
[dtrace-discuss] newbie question about syscall provider
Hi, try this: dtrace -n ''syscall::ioctl:entry / execname != "dtrace" / { printf("%s %s\n",execname,fds[arg0].fi_pathname)}'' Thanks, Gonzalo. On 04/ 7/10 05:38 PM, ???????? ????? wrote:> I''d like to collect filenames for every ioctl syscall. > I found in manual that arg0-argN is arguments for system call > like that > ioctl <http://src.opensolaris.org/source/s?refs=ioctl&project=/onnv>(*int* fdes <http://src.opensolaris.org/source/s?defs=fdes&project=/onnv>, *int* cmd <http://src.opensolaris.org/source/s?defs=cmd&project=/onnv>, intptr_t <http://src.opensolaris.org/source/s?defs=intptr_t&project=/onnv> arg <http://src.opensolaris.org/source/s?defs=arg&project=/onnv>) > ioctl(arg0,arg1,arg2) > i found that arg0 is file_t type, and try to trace pathname > dtrace -n ''syscall::ioctl:entry / execname != "dtrace" / { printf("%s > %s",execname,arg0->f_vnode->v_path) }'' > > But i found that arg0 is not pointer at all. Now i complitly lost. > ___________ > Voropaev Pavel. > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20100407/5f46b607/attachment.html>
Gonzalo Siero
2010-Apr-07 15:58 UTC
[dtrace-discuss] newbie question about syscall provider
Sorry, i forgot to add the link that explains this: http://blogs.sun.com/mws/entry/dtrace_inlines_translators_and_file Cheers, Gonzalo. On 04/ 7/10 05:53 PM, Gonzalo Siero wrote:> Hi, > > try this: > > dtrace -n ''syscall::ioctl:entry / execname != "dtrace" / { printf("%s > %s\n",execname,fds[arg0].fi_pathname)}'' > > Thanks, > Gonzalo. > > On 04/ 7/10 05:38 PM, ???????? ????? wrote: >> I''d like to collect filenames for every ioctl syscall. >> I found in manual that arg0-argN is arguments for system call >> like that >> ioctl <http://src.opensolaris.org/source/s?refs=ioctl&project=/onnv>(*int* fdes <http://src.opensolaris.org/source/s?defs=fdes&project=/onnv>, *int* cmd <http://src.opensolaris.org/source/s?defs=cmd&project=/onnv>, intptr_t <http://src.opensolaris.org/source/s?defs=intptr_t&project=/onnv> arg <http://src.opensolaris.org/source/s?defs=arg&project=/onnv>) >> ioctl(arg0,arg1,arg2) >> i found that arg0 is file_t type, and try to trace pathname >> dtrace -n ''syscall::ioctl:entry / execname != "dtrace" / { printf("%s >> %s",execname,arg0->f_vnode->v_path) }'' >> >> But i found that arg0 is not pointer at all. Now i complitly lost. >> ___________ >> Voropaev Pavel. >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org >> > ------------------------------------------------------------------------ > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20100407/10e5d0f6/attachment.html>