hotspot dtrace support in soylatte
Michael Allman
msa at allman.ms
Sat Jan 12 18:05:24 PST 2008
K. After reading up some more, including some rtfm, I believe the
essential problem with porting the solaris hotspot dtrace probes to
leopard is that they use a "basic" syntax (using the DTRACE_PROBE()
macros) that dtrace on leopard does not support. More more info, see the
thread on the missing "-G" option starting here:
http://mail.opensolaris.org/pipermail/dtrace-discuss/2007-October/004845.html
and continuing here:
http://mail.opensolaris.org/pipermail/dtrace-discuss/2007-November/004912.html
So it seems that before the hotspot dtrace probes can be ported to
leopard, they must be converted to use the newer syntax with "dtrace -h"
as described here
http://blogs.sun.com/ahl/entry/user_land_tracing_gets_better
Does anyone know if this project is underway somewhere else?
Cheers,
Michael
On Fri, 11 Jan 2008, Michael Allman wrote:
> Hello All,
>
> After working on this problem for a few weeks, I was hoping this could be a
> great big happy announcement that I've ported the Solaris Hotspot dtrace
> probes to Soylatte on Leopard. However, I have to admit I am stuck and at a
> loss for how to proceed. If this were a Java problem, I'd have it solved by
> now. But frankly, at this level of C/C++ I don't know WTF I'm doing, and
> what I have done is more like a half blind merge of code from os/solaris to
> os/bsd. So apologies for coming here with little to offer.
>
> FWIW, this is the error I get where I'm stuck:
>
> Compiling dtrace.d
> /usr/sbin/dtrace -C -I. -h -o dtrace.o -s dtrace.d \
> classLoadingService.o hashtable.o java.o jni.o memoryManager.o
> objectMonitor_bsd.o runtimeService.o sharedRuntime.o synchronizer.o thread.o
> vmCMSOperations.o vmGCOperations.o ciEnv.o compileBroker.o nmethod.o ||\
> STATUS=$?;\
> if [ x"$STATUS" = x"1" -a \
> x`uname -r` = x"5.10" -a \
> x`uname -p` = x"sparc" ]; then\
> echo
> "*****************************************************************";\
> echo "* If you are building server compiler, and the error message is ";\
> echo "* \"incorrect ELF machine type...\", you have run into solaris bug
> ";\
> echo "* 6213962, \"dtrace -G doesn't work on sparcv8+ object files\".";\
> echo "* Either patch/upgrade your system (>= S10u1_15), or set the ";\
> echo "* environment variable HOTSPOT_DISABLE_DTRACE_PROBES to disable ";\
> echo "* dtrace probes for this build.";\
> echo
> "*****************************************************************";\
> fi;\
> exit $STATUS
> dtrace: failed to compile script dtrace.d: line 963: extraneous argument
> 'nmethod.o' ($15 is not referenced)
>
> I had to hack quite a few things just to get this far. I can probably
> provide a patch against Landon Fuller's branch at
> http://hg.bikemonkey.org/javasrc_1_6_jrl_darwin/ to anyone who's seriously
> interested, but I think that someone with the right skills and motivation
> could probably reproduce my work --- and more to the point, do it correctly
> --- on their own in a matter of hours.
>
> Perhaps someone with dtrace expertise can explain the problem here. I fear
> it's a limitation of Leopard's port of DTrace. But anyway, what would be
> extra super would be someone who knows WTF they're doing taking a look at
> soylatte and dtrace on Leopard and letting me know if this port has any
> chance of working.
>
> Thanks.
>
> Michael
>
More information about the porters-dev
mailing list