Joel Reymont
2009-Sep-11 23:04 UTC
[dtrace-discuss] tracing c++ methods using full signature
I would like to trace this method nsComponentManagerImpl::GetService (nsID const&, nsID const&, void**). I cannot use nsComponentManagerImpl??GetService* because there are 3 overloaded versions and I want the one above. I understand that :: needs to be replaced with ?? but what about the other C++ special characters like & and *? Can this be done or should I use mangled names instead? Thanks, Joel --- fastest mac firefox! http://wagerlabs.com
Jonathan Adams
2009-Sep-11 23:28 UTC
[dtrace-discuss] tracing c++ methods using full signature
On Sat, Sep 12, 2009 at 12:04:31AM +0100, Joel Reymont wrote:> I would like to trace this method nsComponentManagerImpl::GetService > (nsID const&, nsID const&, void**). > > I cannot use nsComponentManagerImpl??GetService* because there are 3 > overloaded versions and I want the one above. > > I understand that :: needs to be replaced with ?? but what about the > other C++ special characters like & and *? > > Can this be done or should I use mangled names instead?Probably the easiest thing would be to do: dtrace -l -n ''whatever'' where ''whatever'' is the full probe spec for nsComponentManagerImpl??GetService*. Then, pick out the one which looks correct. Cheers, - jonathan
Joel Reymont
2009-Sep-11 23:31 UTC
[dtrace-discuss] tracing c++ methods using full signature
On Sep 12, 2009, at 12:28 AM, Jonathan Adams wrote:> dtrace -l -n ''whatever'' > > where ''whatever'' is the full probe spec for nsComponentManagerImpl?? > GetService*. > > Then, pick out the one which looks correct.I did this and I see 25833 pid39573 XUL non-virtual thunk to nsComponentManagerImpl::GetService(nsID const&, nsID const&, nsISupports**, nsIShutdownListener*) entry 25834 pid39573 XUL nsComponentManagerImpl::GetService (nsID const&, nsID const&, nsISupports**, nsIShutdownListener*) entry 25835 pid39573 XUL non-virtual thunk to nsComponentManagerImpl:: What do you mean by picking the one that''s correct, though? Can I somehow use the probe id in the first column? How do I discriminate in my dtrace code for the probe? Thanks, Joel --- fastest mac firefox! http://wagerlabs.com
James McIlree
2009-Sep-12 00:12 UTC
[dtrace-discuss] tracing c++ methods using full signature
Try adding -xmangled to your command line. James M On Sep 11, 2009, at 4:31 PM, Joel Reymont wrote:> > On Sep 12, 2009, at 12:28 AM, Jonathan Adams wrote: > >> dtrace -l -n ''whatever'' >> >> where ''whatever'' is the full probe spec for nsComponentManagerImpl?? >> GetService*. >> >> Then, pick out the one which looks correct. > > I did this and I see > > 25833 pid39573 XUL non-virtual thunk to > nsComponentManagerImpl::GetService(nsID const&, nsID const&, > nsISupports**, nsIShutdownListener*) entry > 25834 pid39573 XUL nsComponentManagerImpl::GetService > (nsID const&, nsID const&, nsISupports**, nsIShutdownListener*) entry > 25835 pid39573 XUL non-virtual thunk to > nsComponentManagerImpl:: > > What do you mean by picking the one that''s correct, though? > > Can I somehow use the probe id in the first column? > > How do I discriminate in my dtrace code for the probe? > > Thanks, Joel > > --- > fastest mac firefox! > http://wagerlabs.com > > > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org