On Wed, 31 May 2006 13:19:21 -0500 (CDT) Chris Lattner <sabre at nondot.org> wrote:> On Wed, 31 May 2006, Simon Burton wrote: > > Is there a way to find out how much memory > > some JIT'ed machine code uses ? > > lli -stats x.bc <args> > > the -stats output will indicate the # bytes of machine code. >This from the output: 24620 x86-emitter - Number of machine instructions emitted (i had to write a dummy main function to get this to work) Is this really the number of bytes of machine code ? thanks, Simon. -- Simon Burton, B.Sc. Licensed PO Box 8066 ANU Canberra 2601 Australia Ph. 61 02 6249 6940 http://arrowtheory.com
On Wed, 21 Jun 2006, Simon Burton wrote:> This from the output: > > 24620 x86-emitter - Number of machine instructions emitted > > (i had to write a dummy main function to get this to work) > > Is this really the number of bytes of machine code ?Yes. -Chris -- http://nondot.org/sabre/ http://llvm.org/
On Tue, 20 Jun 2006, Chris Lattner wrote:> On Wed, 21 Jun 2006, Simon Burton wrote: >> This from the output: >> >> 24620 x86-emitter - Number of machine instructions emitted >> >> (i had to write a dummy main function to get this to work) >> >> Is this really the number of bytes of machine code ? > Yes.To be specific, this is the number of bytes of machine code JIT'd. Thus, this only includes the stuff reachable from main, for example. To see specifically what functions it is compiling and how big they are, use: lli -debug-only=jit foo.bc <args> -Chris -- http://nondot.org/sabre/ http://llvm.org/