how does one trace functions just in the binary (not including all the libraries) tracing ps gives this # dtrace -n ''pid$target:ps::entry{}'' -c "ps" dtrace: description ''pid$target:ps::entry'' matched 2 probes PID TTY TIME CMD 9519 pts/4 0:00 vi 15706 pts/4 0:00 ps 15705 pts/4 0:02 dtrace 2137 pts/4 0:01 ksh dtrace: pid 15706 has exited CPU ID FUNCTION:NAME 19 59612 _start:entry 37 59614 _start:entry thanks -- This message posted from opensolaris.org
Adam Leventhal
2009-Oct-29 01:05 UTC
[dtrace-discuss] pid provider/ tracing functions in binary
That''s strange -- I see lots of output. What operating system and version are you running? Adam On Oct 28, 2009, at 3:58 PM, tester wrote:> how does one trace functions just in the binary (not including all > the libraries) > > tracing ps gives this > > # dtrace -n ''pid$target:ps::entry{}'' -c "ps" > dtrace: description ''pid$target:ps::entry'' matched 2 probes > PID TTY TIME CMD > 9519 pts/4 0:00 vi > 15706 pts/4 0:00 ps > 15705 pts/4 0:02 dtrace > 2137 pts/4 0:01 ksh > > dtrace: pid 15706 has exited > CPU ID FUNCTION:NAME > 19 59612 _start:entry > 37 59614 _start:entry > > thanks > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl
Adam, # uname -a SunOS XXXX 5.10 Generic_141414-10 sun4v sparc SUNW,SPARC-Enterprise-T5220 # more /etc/release Solaris 10 5/09 s10s_u7wos_08 SPARC Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 30 March 2009 thanks -- This message posted from opensolaris.org
James Litchfield
2009-Oct-29 03:45 UTC
[dtrace-discuss] pid provider/ tracing functions in binary
I wondered if it might be because ps is linked to the magic "am I a 64-bit kernel" or a "32-bit kernel" program (aka /usr/lib/isaexec) that magically execs the correct binary (at least on S10). You should still see what that does, I would think. Well, that''s not it. All you get if you start the real binary (on my 32-bit S10 vbox) is __fsr:entry. You can see the libc functions, for example, but the functions inside ps are maddeningly hidden. Other programs (e.g., /usr/bin/cmp) show the same behavior. A bug in S10U7? Jim ---- Adam Leventhal wrote:> That''s strange -- I see lots of output. What operating system and > version are you running? > > Adam > > On Oct 28, 2009, at 3:58 PM, tester wrote: > >> how does one trace functions just in the binary (not including all >> the libraries) >> >> tracing ps gives this >> >> # dtrace -n ''pid$target:ps::entry{}'' -c "ps" >> dtrace: description ''pid$target:ps::entry'' matched 2 probes >> PID TTY TIME CMD >> 9519 pts/4 0:00 vi >> 15706 pts/4 0:00 ps >> 15705 pts/4 0:02 dtrace >> 2137 pts/4 0:01 ksh >> >> dtrace: pid 15706 has exited >> CPU ID FUNCTION:NAME >> 19 59612 _start:entry >> 37 59614 _start:entry >> >> thanks >> -- >> This message posted from opensolaris.org >> _______________________________________________ >> dtrace-discuss mailing list >> dtrace-discuss at opensolaris.org > > > -- > Adam Leventhal, Fishworks http://blogs.sun.com/ahl > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org >
Adam Leventhal
2009-Oct-29 16:56 UTC
[dtrace-discuss] pid provider/ tracing functions in binary
In S10, the ps(1) binary is stripped meaning that its symbols are not included and therefore are not traceable by DTrace. There''s really not much you can do. Adam On Oct 28, 2009, at 7:28 PM, tester wrote:> Adam, > > # uname -a > SunOS XXXX 5.10 Generic_141414-10 sun4v sparc SUNW,SPARC-Enterprise- > T5220 > # more /etc/release > Solaris 10 5/09 s10s_u7wos_08 SPARC > Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. > Use is subject to license terms. > Assembled 30 March 2009 > > thanks > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Fishworks http://blogs.sun.com/ahl