Re: [Sablevm-user] hello
Brought to you by:
egagnon
From: Etienne G. <gag...@uq...> - 2004-04-18 22:01:17
|
There's a pre-compiled Debian package. Running it as: $ sablevm --property=sablevm.heap.size.min=1024 --property=sablevm.heap.size.increment=1024 --property=sablevm.classloader.heap.size.min=1024 --property=sablevm.classloader.heap.size.increment=1024 --property=sablevm.stack.size.min=1024 --property=sablevm.stack.size.increment=1024 -Y HelloWorld then ^z (quickly!!!) to send to sleep then ps to retrieve process id then cat /proc/16729/status gives: State: T (stopped) Tgid: 16729 Pid: 16729 PPid: 16711 TracerPid: 0 Uid: 1000 1000 1000 1000 <egagnon> Gid: 1000 1000 1000 1000 <egagnon> FDSize: 256 <egagnon> Groups: 1000 6 24 25 29 40 44 60 100 101 1002 1011 1016 1019 1021 <egagnon> VmSize: 3836 kB <egagnon> VmLck: 0 kB <egagnon> VmRSS: 2100 kB <egagnon> VmData: 1600 kB <egagnon> VmStk: 20 kB <egagnon> VmExe: 12 kB <egagnon> VmLib: 2120 kB <egagnon> SigPnd: 0000000000000000 <egagnon> SigBlk: 0000000080000000 <egagnon> SigIgn: 0000000000000000 <egagnon> SigCgt: 0000000380000684 <egagnon> CapInh: 0000000000000000 <egagnon> CapPrm: 0000000000000000 <egagnon> CapEff: 0000000000000000 So, it uses 1.6M of non-shared memory. Now, this is a stock -O2 compiled sablevm, with an inlined interpreter engine (the biggest one in size). So, you might want to further investigate. :-) Etienne. Alan Littleford wrote: > Etienne, > > I'd be more than happy to do that, but if you had some basic ideas as to size it would be really useful in helping me decide whether it is worth it or not (sorry to sound lazy but I have a full plate here). > > Kaffe (or rather Kangaroo - a CLDC'ised version) seems to need at footprint of 2 megs to get anything done. Do you think Sable could come in under that ?? > > Tnx > Alan > > > -----Original Message----- > From: Etienne Gagnon [mailto:gag...@uq...] > Sent: Sunday, April 18, 2004 12:23 PM > To: Alan Littleford > Cc: sab...@li... > Subject: Re: [Sablevm-user] hello > > > Hi Alan, > > You could grab SableVM's source code and do test it for yourself and hopefully report back the results here. > > You can set SableVM's memory consupmtion properties using: > > sablevm.heap.size.min > sablevm.heap.size.max // 0 means no max. sablevm.heap.size.increment // 0 means fixed-size heap > > e.g. > > $ sablevm --property=sablevm.heap.size.min=1024 --property=sablevm.heap.size.increment=1024 ... > > This would start with a 1K heap and increase it by 1K increments, when needed. > > You can also customize other memory consuption things like stack size/growth, and class-loading related memory. All these properties are defined in src/libsablevm/vm_args.m4.c http://devel.sablevm.org/svn/repository/sablevm/branches/staging/src/libsablevm/vm_args.m4.c > > Looking forward to see your results! > > Etienne > > Alan Littleford wrote: > >>Etienne, >> >> would you have any hard numbers for a 'reasonable' system? >> >>We are looking for an embeddable JVM ourselves. Kaffe requires a heap >>size of > 1 meg just to do a 'hello world'. How would Sable compare against that? (Better I hope!). >> >>Do you happen to know if anyone has tried to 'cldc-ise' Sable and what >>kind of footprint that might result in ?? >> >>Performance-wise do you have a feel for how Sable might compare >>against the threaded-int version of Kaffe (which I guess just about >>sets our minimum acceptable level of performance) ? >> >>Thanks >> >>Alan >> >> >> >> >>-----Original Message----- >>From: sab...@li... >>[mailto:sab...@li...] On Behalf Of Etienne Gagnon >>Sent: Sunday, April 18, 2004 10:10 AM >>To: Vladimir Levin >>Cc: sab...@li... >>Subject: Re: [Sablevm-user] hello >> >> >>Vladimir Levin wrote: >> >> >>>I am looking at using Java for embedded development. I am wondering if >>>SableVM is suitable for embedded development? How does it compare to >>>GCJ? >> >> >>SableVM's runtime memory footprint can be pretty low, I guess. You >>can setup the initial heap size to 0 byte, and the increment to 1 >>byte, so that SableVM will tend to have as small a heap as possible >>(somewhat). >> >>Also, you can compile it with -Os, to optimize size. [Many of the m4 >>macros in place to add robustness can be easily modified to expand to >>even smaller code.] >> >>At runtime, the bytecode gets very little expansion (for preparation), >>compared to compiled code (gross figure; some times it's the other way >>around for specific bytecode sequences). >> >>SableVM is a "traditional" kind of JVM; it does no ahead of time >>compiling, not runtime compilation. It can result in smaller code. >>But, it will not compete in speed with highly optimized code, or >>adaptive optimization systems such as JikesRVM. >> >>Etienne >> > > > -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |