Question

Ted Neward ted at tedneward.com
Wed Aug 1 00:47:10 PDT 2007


Two questions:
(*) Are we any further on this?
(*) What about disassembly under Linux or Solaris? Anybody have good
suggestions for a disassembler to use for -XX:+PrintAssembly?

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com
 

> -----Original Message-----
> From: Chuck.Rasbold at Sun.COM [mailto:Chuck.Rasbold at Sun.COM]
> Sent: Tuesday, April 17, 2007 3:25 PM
> To: Ted Neward
> Cc: hotspot-compiler-dev at openjdk.dev.java.net
> Subject: Re: Question
> 
> I can't apologize enough on how long this is taking.  We still working on
> it.
> 
> -- Chuck
> 
> Ted Neward wrote:
> > Any followup here? I'm still hoping to get the one that Sun uses, rather
> > than spend the energy/time/effort to write my own....
> >
> > Ted Neward
> > Java, .NET, XML Services
> > Consulting, Teaching, Speaking, Writing
> > http://www.tedneward.com
> >
> >
> >>-----Original Message-----
> >>From: Ted Neward [mailto:ted at tedneward.com]
> >>Sent: Monday, January 15, 2007 4:30 PM
> >>To: hotspot-compiler-dev at openjdk.dev.java.net
> >>Subject: RE: Question
> >>
> >>Any word on getting this thing open-sourced? I know it's probably
> possible
> >>to build one for myself, but.... Oy. Would *much* rather not have to do
> >>that.
> >>
> >>Ted Neward
> >>Java, .NET, XML Services
> >>Consulting, Teaching, Speaking, Writing
> >>http://www.tedneward.com
> >>
> >>
> >>
> >>>-----Original Message-----
> >>>From: Chuck.Rasbold at Sun.COM [mailto:Chuck.Rasbold at Sun.COM]
> >>>Sent: Thursday, December 07, 2006 2:44 PM
> >>>To: hotspot-compiler-dev at openjdk.dev.java.net
> >>>Subject: Re: Question
> >>>
> >>>Sun has a disassembler which is based on the disassembler source code
> >>
> >>from
> >>
> >>>a gdb
> >>>of many years past.
> >>>
> >>>The disassembler is built into a .so or .dll. Typically, I place that
> >>>disassembler.so file in the same directory as the libjvm.so of
> interest.
> >>>Other
> >>>times, on Solaris, I will set my LD_LIBRARY_PATH to include the
> >>
> >>directory
> >>
> >>>where
> >>>the .so resides.  I'm not much of a Windows guy, so I can't advise you
> >>>there.
> >>>
> >>>Until now, the disassembler source has been kept separate from the
> >>
> >>HotSpot
> >>
> >>>source tree and the binary not distributed to customers in order to
> >>
> >>avoid
> >>
> >>>the
> >>>complications that would be incurred by Sun due to the GPL.
> >>>
> >>>Of course, the world is now different and due to an oversight, it was
> >>
> >>not
> >>
> >>>included when HotSpot was open sourced.  We're currently working on
> >>>getting it
> >>>distributed with HotSpot.
> >>>
> >>>Hopefully, I've made things a bit clearer.
> >>>
> >>>-- Chuck
> >>>
> >>>Ted Neward wrote:
> >>>
> >>>>So help me out here, if you don't mind--when you say I will "need the
> >>>>disassembler", you're saying I have to download (what?) and put it
> >>>
> >>>(where?)?
> >>>
> >>>>Unfortunately, the link you sent, Steve, doesn't say much beyond that
> >>>
> >>>fact
> >>>
> >>>>that the poster hacked it--I'm not sure what to do with it once I find
> >>>
> >>>it.
> >>>
> >>>>Can I grab the GNU disassembler and use it, since I'm not in the same
> >>>
> >>>boat
> >>>
> >>>>as Sun re: licensning and distribution issues?
> >>>>
> >>>>Bear in mind, I want to do this under Windows if I can; I dunno if
> >>
> >>that
> >>
> >>>>makes a difference.
> >>>>
> >>>>Sorry for being such the noob, but one hope I have is to sort through
> >>>
> >>>all
> >>>
> >>>>this and put it into an article or paper or presentation and help
> >>
> >>others
> >>
> >>>to
> >>>
> >>>>get into seeing all this stuff without having to wade through the same
> >>>
> >>>steps
> >>>
> >>>>by hand. :-)
> >>>>
> >>>>Ted Neward
> >>>>Java, .NET, XML Services
> >>>>Consulting, Teaching, Speaking, Writing
> >>>>http://www.tedneward.com
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>-----Original Message-----
> >>>>>From: Peter.Kessler at Sun.COM [mailto:Peter.Kessler at Sun.COM]
> >>>>>Sent: Tuesday, December 05, 2006 11:57 AM
> >>>>>To: hotspot-compiler-dev at openjdk.dev.java.net
> >>>>>Subject: Re: Question
> >>>>>
> >>>>>steve goldman wrote:
> >>>>>
> >>>>>
> >>>>>>Ted Neward wrote:
> >>>>>>
> >>>>>>
> >>>>>>>So one thing I’d like to see (via console output or some other
> >>>>>>>out-of-band
> >>>>>>>form of view) is the code generated by the JIT compiler when it
> JITs
> >>
> >>a
> >>
> >>>>>>>method. What’s the best way for doing so?
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>You need two things, a "develop" version of hotspot and the
> >>>>>>disassembler. There is a flag -XX:+PrintAssembly which will attempt
> >>
> >>to
> >>
> >>>>>>dynamically load the disassembler and as various code blobs are
> >>>>>>generated will invoke the disassembler. The product version of
> >>
> >>hotspot
> >>
> >>>>>>doesn't enable this flag so you need to build a version that isn't
> >>
> >>the
> >>
> >>>>>>product (or convert the switch from "develop" to "product"). In any
> >>>
> >>>case
> >>>
> >>>>>>I think you'll have to build the jvm. Additionally you need the
> >>>>>>disassembler. Unfortunately that got left out of the initial source
> >>>>>>release. The disassembler we use is based on the gnu disassembler
> and
> >>>>>>because it was gpl before hotspot was gpl'd it was kept separate
> from
> >>>>>>the hotspot code. That should be fixed soon I'd guess. There was a
> >>
> >>note
> >>
> >>>>>>here
> >>>>>>http://c1.complang.tuwien.ac.at/pipermail/cacao/2006-
> >>>>>
> >>>>>November/000195.html
> >>>>>
> >>>>>
> >>>>>>where someone hacked the cacao disassembler to get around this. The
> >>>>>>disassembler you build (.dll or .so) needs to go into the jvm (or
> >>>>>>somewhere in your LD_LIBRARY_PATH or equivalent) were it will get
> >>>>>
> >>>>>loaded.
> >>>>>
> >>>>>
> >>>>>>With the server version of hotspot there is another develop flag
> >>>>>>-XX:+PrintOptoAssembly which will print a very stylized version of
> >>
> >>the
> >>
> >>>>>>code the jit produces. It will do this without the disassembler
> being
> >>>>>>present.
> >>>>>
> >>>>>You can also use the "fastdebug" version of HotSpot to get
> >>>>>access to the -XX:+PrintAssembly flag.  The fastdebug version
> >>>>>is built as part of the "make world" target.  You still need
> >>>>>the dissassembler, as Steve says.
> >>>>>
> >>>>>			... peter
> >>>>>
> >>>>>--
> >>>>>No virus found in this incoming message.
> >>>>>Checked by AVG Free Edition.
> >>>>>Version: 7.5.432 / Virus Database: 268.15.9/573 - Release Date:
> >>>
> >>>12/5/2006
> >>>
> >>>>>4:07 PM
> >>>>>
> >>>>
> >>>>
> >>>--
> >>>No virus found in this incoming message.
> >>>Checked by AVG Free Edition.
> >>>Version: 7.5.432 / Virus Database: 268.15.15/579 - Release Date:
> >>
> >>12/7/2006
> >>
> >>>1:31 PM
> >>>
> >>
> >>--
> >>No virus found in this outgoing message.
> >>Checked by AVG Free Edition.
> >>Version: 7.5.432 / Virus Database: 268.16.12/628 - Release Date:
> 1/15/2007
> >>11:04 AM
> >>
> >>
> >>--
> >>No virus found in this incoming message.
> >>Checked by AVG Free Edition.
> >>Version: 7.5.432 / Virus Database: 268.16.12/628 - Release Date:
> 1/15/2007
> >>11:04 AM
> >>
> >
> >
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 269.4.0/762 - Release Date: 4/15/2007
> 4:22 PM
> 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.0/929 - Release Date: 7/31/2007
5:26 PM
 



More information about the hotspot-compiler-dev mailing list