wacky micro-benchmark

Volker Simonis volker.simonis at gmail.com
Tue Feb 12 02:29:17 PST 2008


> P.S.  There's a Gnu-based disassembler also
> which has internally been integrated with
> HotSpot, but for various almost-forgettable
> legal reasons we cannot easily release
> it, yet.  Maybe some kind soul outside
> of Sun can re-integrate it into HotSpot as a
> hygenically factored disassembler.so.
> The flag -XX:+PrintAssembly requires
> this separate module, and when it
> works it produces truly wonderful output.
>

I don't pretend to be the kind soul that's been asked for in the post,
but some while ago I submitted a patch to this list which enabled the
disassembler for i486. You can find it here:

http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/2007-August/000015.html

If you follow the thread, you'll see that Chuck Rasbold from Sun was
working on this topic. I agreed with him to use a version of the
disassembler that doesn't include <dis-asm.h> but just uses an opaque
interface (in fact just a duplication of some structs from
<dis-asm.h>) declared within the JDK to communicate with the libopcode
library. But I have to admit, I didn't finished it yet and Chuck
probably didn't had the time either, so it will probably stay a fix
for some more time.

As mentioned before, the  problems are not technical but rather
licensing issues (mostly because the dissasembler is GPL licensed and
can not easily be reassigned a dual license as required by the
OpenJDK/SCL). For more details you can see this thread:

http://mail.openjdk.java.net/pipermail/discuss/2007-August/000189.html

I'm ready to take over the role of the "kind soul outside of Sun" and
volunteer in integrating  the disassembler into the OpenJDK if only we
could solve the legal issues and some peer inside SUN will review the
code (Chuck?).

Regards,
Volker

>
> On Feb 12, 2008, at 12:35 AM, Kirk Pepperdine wrote:
>
> >
> >     public int hoist( int a, int b) {
> >         int total = Integer.MIN_VALUE;
> >         int hoisted = a + b;
> >         for ( int i = 0; i < LOOP_COUNT; i++)
> >             total += hoisted;
> >         return total;
> >     }
> >
> >     public int nonHoist( int a, int b) {
> >         int total = Integer.MIN_VALUE;
> >         for ( int i = 0; i < LOOP_COUNT; i++)
> >             total += (a + b);
> >         return total;
> >     }
>
>



More information about the hotspot-dev mailing list