This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: conditional probes


Dave Nomura wrote:
> I'm not having any luck getting this to work and wanted to check to see
> if my understanding is correct.  By examining debug output I can tell that:
> 1) the task_finder callback gets called with register_p=1: it
> initializes my instruction tracing stuff, sets up a function pointer to
> the generated probe corresponding to "if(condition) { .... }"
> 2) the two probes to set and unset the condition variable get called
> 3) the utrace report_signal handler for the single-step trap gets called
> many times, as expected.  it calls the function pointer set up in 1) but
> it appears that I never get past the generated "if (condition)" code
> because I don't get any _stp_printf output.

It certainly sounds like you are on the right path.  I'll agree with
Frank, I'd try getting regular probes going first before worrying about
conditional probes.

Here's a note I need to add to the wiki.  In the register_p=1 case
because of the way utrace works, you can't do much other than attach
other utrace engines.  That's why you'll see the .begin/.thread.begin
probes get executed in a quiesce handler.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]