Hi, I am collecting calls to C a function with the pid provider and I collect the parameters of each call (doing @a[arg0,arg1,arg2] = count();). One of the parameters (arg1) is a function pointer. So, I take the value I obtained and examine it with dbx. Dbx then prints the address as being myFunction+0x100. The function name is coherent with what I know about the program (i.e. it is very likely to be the right function that was referred to by the pointer).
But why the offset ? Do function start 256 bytes after their symbol address ? Thanks a lot for all your help, -- Pierre-Olivier Gaillard On 9/13/07, Pierre-Olivier Gaillard <[EMAIL PROTECTED]> wrote: > > Thanks a lot. > > But if it does not use the debug registers, does it mean it modifies the > code on the fly to intercept the function call ? It looks like it from the > fbt documentation which is supposed to apply to pid too. > > I wonder if using the debug registers would be any faster. They would > cause lots of traps whereas the dtrace instrumentation might be very > efficient and just write some data that can be collected later. > > Thanks again, > > -- > Pierre-Olivier Gaillard > > On 9/13/07, Dan Mick <[EMAIL PROTECTED]> wrote: > > > > Pierre-Olivier Gaillard wrote: > > > Hi, > > > > > > I was wondering if there was a dtrace provider that uses the debug > > > registers. > > > > No, but... > > > > > I would like to trace all call to one or two user functions > > > and gather a few statistics about the data they handle. > > > This seems like a job for dtrace but I could not figure out what > > > provider to use. > > > > ...the pid provider should do just fine. With a "test" directory in > > the current directory, containing an entry "bin": > > > > dtrace -n pid\$target::strlen:entry -c "ls test" > > dtrace: description 'pid$target::strlen:entry' matched 2 probes > > bin > > dtrace: pid 4037 has exited > > CPU ID FUNCTION:NAME > > 0 74985 strlen:entry > > 0 74985 strlen:entry > > > > > > > Thank you for your help, > > > > > > Pierre-Olivier Gaillard > > > > > > On 8/17/07, *Nasser Nouri* <[EMAIL PROTECTED] > > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > > > There is a new article in SDN web site: > > > > > > "Using DTrace to Demystify Watchpoints in the Sun Studio dbx > > Debugger" > > > > > > > > > http://developers.sun.com/sunstudio/articles/demistify_watch_points.html > > > > > > > > __Nasser > > > > > > > > > -- > > > This message posted from opensolaris.org <http://opensolaris.org> > > > _______________________________________________ > > > dtrace-discuss mailing list > > > [email protected] <mailto:[email protected] > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > dtrace-discuss mailing list > > > [email protected] > > > > >
_______________________________________________ dtrace-discuss mailing list [email protected]
