Josip Gracin
2005-Nov-10 21:05 UTC
[dtrace-discuss] Multiple returns from a single function
Hello! Why is it that a call to memcpy has two returns, one from memmove and one from memcpy? Here''s the script and its output: --------------------------------- The script: --------------------------------- pid$1:::entry { } pid$1:::return { } ---------------------------------- The output: ---------------------------------- ... 0 68204 memcpy:entry 0 71091 memmove:return 0 71092 memcpy:return ...
Jonathan Adams
2005-Nov-10 21:30 UTC
[dtrace-discuss] Multiple returns from a single function
On Thu, Nov 10, 2005 at 10:05:01PM +0100, Josip Gracin wrote:> Hello! > > Why is it that a call to memcpy has two returns, one from memmove and > one from memcpy? Here''s the script and its output:Could you please provide the output of: psrinfo -vp mount | grep libc ldd /bin/lsh so we can figure out which version of memcpy is being used? (unfortunately, there are a multitude of versions) Thanks, - jonathan> --------------------------------- > The script: > --------------------------------- > pid$1:::entry > { > } > pid$1:::return > { > } > > ---------------------------------- > The output: > ---------------------------------- > ... > 0 68204 memcpy:entry > 0 71091 memmove:return > 0 71092 memcpy:return > ... > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Jonathan Adams, Solaris Kernel Development
Adam Leventhal
2005-Nov-10 21:32 UTC
[dtrace-discuss] Multiple returns from a single function
This is due to the implementation of memcpy() -- it''s rather intertwined with memmove(): http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/i386_hwcap1/gen/memcpy.s#40 memcpy() is effectively embedded in memmove(). It''s a drag, and it would be nice if we could rework the code or the pid provider''s text analysis to avoid this situation. Adam On Thu, Nov 10, 2005 at 10:05:01PM +0100, Josip Gracin wrote:> Hello! > > Why is it that a call to memcpy has two returns, one from memmove and > one from memcpy? Here''s the script and its output: > > --------------------------------- > The script: > --------------------------------- > pid$1:::entry > { > } > pid$1:::return > { > } > > ---------------------------------- > The output: > ---------------------------------- > ... > 0 68204 memcpy:entry > 0 71091 memmove:return > 0 71092 memcpy:return > ... > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Jonathan Adams
2005-Nov-10 22:01 UTC
[dtrace-discuss] Multiple returns from a single function
On Thu, Nov 10, 2005 at 01:30:33PM -0800, Jonathan Adams wrote:> On Thu, Nov 10, 2005 at 10:05:01PM +0100, Josip Gracin wrote: > > Hello! > > > > Why is it that a call to memcpy has two returns, one from memmove and > > one from memcpy? Here''s the script and its output: > > Could you please provide the output of: > > psrinfo -vp > mount | grep libc > ldd /bin/lsh^^^ should be "ls". <sigh> But Adam has already figured this out, and responded, so never mind. =] - jonathan> > so we can figure out which version of memcpy is being used? (unfortunately, > there are a multitude of versions) > > Thanks, > - jonathan > > > --------------------------------- > > The script: > > --------------------------------- > > pid$1:::entry > > { > > } > > pid$1:::return > > { > > } > > > > ---------------------------------- > > The output: > > ---------------------------------- > > ... > > 0 68204 memcpy:entry > > 0 71091 memmove:return > > 0 71092 memcpy:return > > ... > > > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss at opensolaris.org > > -- > Jonathan Adams, Solaris Kernel Development-- Jonathan Adams, Solaris Kernel Development