Hello, I wanted to enable tracing in user process. but following example from guide is not working. pid$1::$2:entry { self->trace = 1; } pid$1::$2:return /self->trace/ { self->trace = 0; } pid$1:::entry, pid$1:::return /self->trace/ { } I am getting error like invalid probe description ..... undefined macro variable in probe description. pid$target:user lib:user function:entry Any idea what I am doing wrong. Do I need to enable probe first and then call? TIA Vineet _________________________________________________________________ Change is good. See what?s different about Windows Live Hotmail. www.windowslive-hotmail.com/learnmore/default.html?locale=en-us&ocid=TXT_TAGLM_HMWL_reten_changegood_0507 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070514/c5562eb8/attachment.html>
Michael Schuster
2007-May-14 17:21 UTC
[dtrace-discuss] how to do tracing in user process.
Vineet Goel wrote:> > Hello, > > I wanted to enable tracing in user process. > but following example from guide is not working. > > > pid$1::$2:entry[...]> > I am getting error like invalid probe description ..... undefined macro > variable in probe description.how are you calling this? Michael -- Michael Schuster Recursion, n.: see ''Recursion''
Vineet, the "macro variables" are the $1 and $2, and they''re arguments to the dtrace script What this *wants* is something like ./script.d PID functionname where PID is a process ID of a running process, and functionname is an entry point name. So, while it might not tell you anything much useful, for example you could use # ./script.d $$ read On 5/14/07, Vineet Goel <goelvineet at hotmail.com> wrote:> > > Hello, > > I wanted to enable tracing in user process. > but following example from guide is not working. > > > > pid$1::$2:entry > > { > > self->trace = 1; > > } > > pid$1::$2:return > > /self->trace/ > > { > > self->trace = 0; > > } > > pid$1:::entry, > > pid$1:::return > > /self->trace/ > > { } > > I am getting error like invalid probe description ..... undefined macro > variable in probe description. > > pid$target:user lib:user function:entry > > Any idea what I am doing wrong. > Do I need to enable probe first and then call? > > TIA > Vineet > > > > > ________________________________ > Create the ultimate e-mail address book. Import your contacts to Windows > Live Hotmail. Try it! > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >-- The key to long life is to immediately forget things. --- Joshu Sasaki Roshi, on his 100th birthday