How does one trace a library that is lazy loaded? I can use -Z to suppress error on startup but how do I set up the probe when the library is loaded? Padraig This message posted from opensolaris.org
> How does one trace a library that is lazy loaded? > > I can use -Z to suppress error on startup but how do I set up the probe whenthe library is loaded? Perhaps I''ve misunderstood you, but it sounds like you mean something like dtrace -Z -n ''pid$target:libproc.so::entry {}'' -c ''/usr/bin/sparcv9/pstack XXX'' Does this work for you? Robert
My command is: dtrace -Z -n ''pid$target:libXrender.so::entry {@[probefunc]=count();}'' -c ''gtkperf -a'' I get the message dtrace: description ''pid$target:libXrender.so::entry '' matched 0 probes and I do not get any report of functions in libXrender being called. Padraig This message posted from opensolaris.org
What I think the user wants (what I want too), is for DTrace and ld.so.1 to cooperate so that probes referencing symbols not present in the victime process'' link table at the time the D script was started can come alive, so to speak, when the relevant shared objects are opened and mapped in. Of course, it''s easier said than done! What should happen if a given shared object is mapped in on multiple link maps? Or in multiple groups, not globally? Don''t look at me, I don''t have an answer to that. Nico --
Hi Padraig, When you specify a library to the pid provider, it automatically translates stuff like ''libc.so'' or ''libXrender.so'' to the real names ''libc.so.1'' or ''libXrender.so.1''. When you specify -Z and the library doesn''t yet exist, you have to be sure to use the real name of the library. Try specifying ''pid$target:libXrender.so.1::entry'' instead. Adam On Thu, Jun 29, 2006 at 09:29:53AM -0700, Padraig O''Briain wrote:> My command is: > > dtrace -Z -n ''pid$target:libXrender.so::entry {@[probefunc]=count();}'' -c ''gtkperf -a'' > I get the message > > dtrace: description ''pid$target:libXrender.so::entry '' matched 0 probes > > and I do not get any report of functions in libXrender being called. > > Padraig > > > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl