sablevm-developer Mailing List for SableVM (Page 44)
Brought to you by:
egagnon
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(27) |
Aug
(22) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(32) |
Oct
|
Nov
|
Dec
|
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(69) |
Sep
(10) |
Oct
(31) |
Nov
(15) |
Dec
(58) |
2003 |
Jan
(33) |
Feb
(81) |
Mar
(85) |
Apr
(24) |
May
(15) |
Jun
(14) |
Jul
(6) |
Aug
(9) |
Sep
(101) |
Oct
(59) |
Nov
(142) |
Dec
(34) |
2004 |
Jan
(107) |
Feb
(164) |
Mar
(181) |
Apr
(96) |
May
(81) |
Jun
(71) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Grzegorz B. P. <ga...@de...> - 2003-05-01 19:05:34
|
W liście z czw, 01-05-2003, godz. 20:17, Bensen Chiou pisze: > Hi Mr. Prokopski, > > I took a look at SableVM, and try to figure out the > proper way to port JVM to a new platform. Great (just please keep Cc:ing sablevm-devel) > I notice that sable class library is written in Java, > and native lib is written in C via JNI. Yes. > Assuming that there are C system libraries on a target > OS on the new platform, what's the proper way to port > JVM? Is the following steps the right way to tackle it? > > 1. Get a source code of JVM from existing one. Surely > 2. Change, if necessary, any files related to OS specific service > using JNI to invoke existing system shared libraries. Hmm... not really, I think. JNI is probably not the thing you should worry about too much (for now at least). It would be better if you could say a little bit more about your platform, for ex: - is it posix compliant? - do you have gcc there? - what's the hardware (processor)? - do you have GNU auto* tools there (autoconf and automake)? - do you have m4 preprocessor there? > But how to compile it so that new target JVM can run on the > new platform? Don't I need a JDK runnable on the new platform > in order to compile the modified source code of JVM? This sounds > like a catch-22 to me. There must be a good way to do it, right? No, there's no loop build-dependencies in SableVM. BTW: are you trying to crosscompile? (avoid that if you can) You can easily compile the java stuff (sablevm-classlib) somewhere else because it's architecture independant, so you don't really need even java compiler for your new platform. Assuming that you have the smallest problem possible and you have all the needed tools then you just need to make a port for new processor - 90% of what you need to do is to fill some data about your architecture (word/page sizes, some C type sizes) and write *atomic* compare&swap for your processor. See _svmh_compare_and_swap in src/libsablevm/system.c Now non-technical stuff... You're quite mysterious about what your architecture is and what are the toolkits you have available for it. It's quite hard to give comprehensive advice w/o at least some basic knowledge what we're talking about. I am also (just) curious why are you looking for a JVM for Your embedded platform and what are the further/higher goals for that? I'd also be glad to hear something about it if that's not a secret. Looking forward to your reply Grzegorz B. Prokopski -- Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |
From: Bensen C. <ben...@ho...> - 2003-05-01 14:38:54
|
Hi Mr. Prokopski, Thanks a lot for your help. I'll take a look at SableVM. Bensen >From: "Grzegorz B. Prokopski" <ga...@de...> >To: Bensen Chiou <ben...@ho...> >CC: SableVM-devel ML <sab...@li...> >Subject: Re: Pls help: How to port JVM >Date: 01 May 2003 10:25:02 +0200 > >W li¶cie z ¶ro, 30-04-2003, godz. 23:30, Bensen Chiou pisze: > > Hi Mr. Prokopski, >Hello > > > Please help me on starting to port JVM to embedded JVM, > > e.g., controller to control appliance. >I'd be very happy to help you. > > > I noticed that you'd posted a message on 8/15/2002 saying that > > you had ported JVM to alpha. Can you please help me with the > > following questions? > > > > 1. If I want to port JVM to become an embedded JVM in the > > appliance, should I start from the JVM source code? >I think yes. > > > 2. Where can I get a source code of JVM? >One of existing JVMs, the one that I've ported to alpha (and >several other architectures) is SableVM. You'll be able to >find more information at http://www.sablevm.org/ >along with the source code of course (it's LGPL). > > > 3. Can you point me in the right direction on which sections > > of original JVM code that I should modify? >I don't know what your desiderd platform is. But I can give >a few hints. >- you should have gcc (2.95 or 3.x) working on your platform >because SableVM uses features that comerciall compilers don't >have (yet?). However these parts could be also written in >assembler for specific platform so if you really needed that - >it's fully possible to remove gcc dependency (but not trivial) >- to find architecture-specific pieces I search source code >for "i386" string for example; quick search found these three: > * src/libsablevm/system.[ch] > * src/libsablevm/include/jni_system_specific.h >There's a lot of comments inside so I'll skip my comment here. >- SableVM depends on POSIX system environment > > > 4. Can you please mail me your assembler code? >All the assembler code for alpha and some other architectures >is in the current release of SableVM which is 1.0.8. Debian >(http://www.debian.org) SableVM package has more architectures >in it, namely: >i386, powerpc, ia64, s390, arm, sparc, alpha, m68k >not all of which have already been integrated into 1.0.8 >release (I am saying that in case your hardware were compatible >with one of the above). You can find the diff here: >ftp://ftp.debian.org/debian/pool/main/s/sablevm/sablevm_1.0.8-4.diff.gz > > > Thanks you very much in advance. >I am looking forward to our cooperation > >You're welcomed > > Grzegorz B. Prokopski > >PS: I am Cc:ing this mail to sablevm devel list. It'd be better >to make all conversation with at least Cc: to it. > >-- >Grzegorz B. Prokopski <ga...@de...> >Debian http://www.debian.org/ > _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail |
From: Grzegorz B. P. <ga...@de...> - 2003-05-01 08:26:09
|
W liście z śro, 30-04-2003, godz. 23:30, Bensen Chiou pisze: > Hi Mr. Prokopski, Hello > Please help me on starting to port JVM to embedded JVM, > e.g., controller to control appliance. I'd be very happy to help you. > I noticed that you'd posted a message on 8/15/2002 saying that > you had ported JVM to alpha. Can you please help me with the > following questions? > > 1. If I want to port JVM to become an embedded JVM in the > appliance, should I start from the JVM source code? I think yes. > 2. Where can I get a source code of JVM? One of existing JVMs, the one that I've ported to alpha (and several other architectures) is SableVM. You'll be able to find more information at http://www.sablevm.org/ along with the source code of course (it's LGPL). > 3. Can you point me in the right direction on which sections > of original JVM code that I should modify? I don't know what your desiderd platform is. But I can give a few hints. - you should have gcc (2.95 or 3.x) working on your platform because SableVM uses features that comerciall compilers don't have (yet?). However these parts could be also written in assembler for specific platform so if you really needed that - it's fully possible to remove gcc dependency (but not trivial) - to find architecture-specific pieces I search source code for "i386" string for example; quick search found these three: * src/libsablevm/system.[ch] * src/libsablevm/include/jni_system_specific.h There's a lot of comments inside so I'll skip my comment here. - SableVM depends on POSIX system environment > 4. Can you please mail me your assembler code? All the assembler code for alpha and some other architectures is in the current release of SableVM which is 1.0.8. Debian (http://www.debian.org) SableVM package has more architectures in it, namely: i386, powerpc, ia64, s390, arm, sparc, alpha, m68k not all of which have already been integrated into 1.0.8 release (I am saying that in case your hardware were compatible with one of the above). You can find the diff here: ftp://ftp.debian.org/debian/pool/main/s/sablevm/sablevm_1.0.8-4.diff.gz > Thanks you very much in advance. I am looking forward to our cooperation You're welcomed Grzegorz B. Prokopski PS: I am Cc:ing this mail to sablevm devel list. It'd be better to make all conversation with at least Cc: to it. -- Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |
From: Ben B. <bb...@ma...> - 2003-04-27 18:18:20
|
Hi, Thanks for everything everyone has been doing so far. I've been trying to get Ant to compile with the fjsdk, and under certain circumstances it appears that sablevm becomes deadlocked (96% CPU). I'm not sure yet at what level this is occurring, but I was wondering if it is possible to send a signal to the vm to get a thread dump? I beleive that Sun's JVMs will produce a thread dump when a SIGQUIT is received. Regards, Ben |
From: Grzegorz B. P. <ga...@de...> - 2003-04-25 14:30:58
|
severity 181365 normal thanks I am lowering severity of this bug [0] to normal because: 1. the workaround for the dependency problem is in place [1] 2. current version is ported to all arches that it were possible for by only changing sablevm - for other arches libffi ports are missing :-(( 3. inlined engine has been disabled for non-i386 arches so we're on the safe side 4. this seems to be the best sablevm version so far SableVM should have now no RC bugs anymore, so the package can go to testing/sarge now. Grzegorz B. Prokopski [0] http://bugs.debian.org/181365 [1] I don't know enough to deal with hardcoded rpath problem myself, so the 'help' tag still remains. However the facts are that: 1. the problem appeared in never version of build *tools* not sablevm 2. some packages also have this problem and they workarond it also 3. I don't think it's a showstopper for sablevm anyway --=20 Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |
From: Chris P. <chr...@ma...> - 2003-04-21 22:47:45
|
Um, just ignore the second part of my answer. Chris David B=E9langer wrote: >On Mon, Apr 21, 2003 at 01:13:18PM -0400, Anatole LE wrote: > =20 > >>I'm interested in getting bytecode (instruction) events in SableVM. Whe= n a >>bytecode is executed, I'd like to get the original offset of the byteco= de >>in the class file it belongs... I've looked at the code, but I don't kn= ow >>how I can get that information. Does anyone know? >> =20 >> > >Hi, > >I don't think that info is readily available in SableVM. >I guess you will need to build a table to map the prepared code offset >to the original bytecode offset. This should be done in the same file >that does the prepared code (prepare_code.c or/and prepare.c, I think). > > =20 > >>I would also like to differentiate "prepare" bytecode instructions with= >>the "regular" bytecode instructions. I.e. I don't want to get "prepare"= >>bytecode instruction events, but I want to get the other ones. I don't >>really know how m4 works, but I wonder if there was an easy way to get >>around this. >> =20 >> > >Once, you solve part 1, this will be solved as you will have already map= ped the >PREPARE_* one to the original bytecode. > > > >David > > =20 > >>Thanks, >>Anatole >> >> >> >> >>------------------------------------------------------- >>This sf.net email is sponsored by:ThinkGeek >>Welcome to geek heaven. >>http://thinkgeek.com/sf >>_______________________________________________ >>Sablevm-developer mailing list >>Sab...@li... >>https://lists.sourceforge.net/lists/listinfo/sablevm-developer >> =20 >> > > =20 > |
From: Chris P. <chr...@ma...> - 2003-04-21 22:45:05
|
Anatole LE wrote: >I'm interested in getting bytecode (instruction) events in SableVM. When a >bytecode is executed, I'd like to get the original offset of the bytecode >in the class file it belongs... I've looked at the code, but I don't know >how I can get that information. Does anyone know? > > I think you would have to encode that information when preparing methods. There's plenty of space at the end of a SableVM wordcode, but I don't know what kind of ideas people have for storing information there. > >I would also like to differentiate "prepare" bytecode instructions with >the "regular" bytecode instructions. I.e. I don't want to get "prepare" >bytecode instruction events, but I want to get the other ones. I don't >really know how m4 works, but I wonder if there was an easy way to get >around this. > What do you mean by "prepare" bytecode? Do you mean (for example) the initialization bytecode that is executed once, and then replaced with the noinit bytecode (GETSTATIC_INT_INIT and GETSTATIC_INT_NOINIT example in Etienne's thesis)? If so, why don't you want to count these bytecodes? One is just a faster version of the other. Chris > >Thanks, >Anatole > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Sablevm-developer mailing list >Sab...@li... >https://lists.sourceforge.net/lists/listinfo/sablevm-developer > > > |
From: David <db...@cs...> - 2003-04-21 22:25:02
|
On Mon, Apr 21, 2003 at 01:13:18PM -0400, Anatole LE wrote: > I'm interested in getting bytecode (instruction) events in SableVM. Whe= n a > bytecode is executed, I'd like to get the original offset of the byteco= de > in the class file it belongs... I've looked at the code, but I don't kn= ow > how I can get that information. Does anyone know? Hi, I don't think that info is readily available in SableVM. I guess you will need to build a table to map the prepared code offset to the original bytecode offset. This should be done in the same file that does the prepared code (prepare_code.c or/and prepare.c, I think). > I would also like to differentiate "prepare" bytecode instructions with > the "regular" bytecode instructions. I.e. I don't want to get "prepare" > bytecode instruction events, but I want to get the other ones. I don't > really know how m4 works, but I wonder if there was an easy way to get > around this. Once, you solve part 1, this will be solved as you will have already mapp= ed the PREPARE_* one to the original bytecode. David >=20 > Thanks, > Anatole >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Sablevm-developer mailing list > Sab...@li... > https://lists.sourceforge.net/lists/listinfo/sablevm-developer --=20 --- David B=E9langer Graduate Student School of Computer Science McGill University Office: MC226 Web page: http://www.cs.mcgill.ca/~dbelan2/ Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt |
From: Anatole LE <al...@cs...> - 2003-04-21 17:13:21
|
I'm interested in getting bytecode (instruction) events in SableVM. When a bytecode is executed, I'd like to get the original offset of the bytecode in the class file it belongs... I've looked at the code, but I don't know how I can get that information. Does anyone know? I would also like to differentiate "prepare" bytecode instructions with the "regular" bytecode instructions. I.e. I don't want to get "prepare" bytecode instruction events, but I want to get the other ones. I don't really know how m4 works, but I wonder if there was an easy way to get around this. Thanks, Anatole |
From: Archie C. <ar...@de...> - 2003-04-15 20:30:05
|
Archie Cobbs wrote: > In _svmf_enter_object_monitor() and java.lang.VMObject.wait(), there > is this code: > > /* wait until no other thread owns the lock */ > while (fat_lock->recursive_count != 0 && fat_lock->owner != env) > { > _svmm_cond_wait (fat_lock->cond, fat_lock->mutex); > } > > My question is: where is the code in SableVM that will ever cause > fat_lock->owner to equal env? I.e., where is the code (necessarily > running in a different thread) that sets fat_lock->owner equal to > the 'env' that corresponds to the thread executing the above loop? Following up to my own question... In _svmf_enter_object_monitor() the code makes perfect sense, it's just waiting until (a) the lock is not locked or (b) this thread is the owner. So my question only applies to the java.lang.VMObject.wait() case... perhaps it's just a cut & paste glitch? Thanks, -Archie __________________________________________________________________________ Archie Cobbs * Precision I/O * http://www.precisionio.com |
From: Archie C. <ar...@de...> - 2003-04-15 20:00:13
|
Etienne- Another "dumb" question for you about SableVM... In _svmf_enter_object_monitor() and java.lang.VMObject.wait(), there is this code: /* wait until no other thread owns the lock */ while (fat_lock->recursive_count != 0 && fat_lock->owner != env) { _svmm_cond_wait (fat_lock->cond, fat_lock->mutex); } My question is: where is the code in SableVM that will ever cause fat_lock->owner to equal env? I.e., where is the code (necessarily running in a different thread) that sets fat_lock->owner equal to the 'env' that corresponds to the thread executing the above loop? I can't find it... I only see code that sets fat_lock->owner to either the current thread, or to NULL, but never to a different thread. So the second part of that if statement is always true, making it useless. I.e., a fat lock recursion count of zero is the same thing as unlocked, so it seems like this loop could simply be: /* wait until no other thread owns the lock */ while (fat_lock->recursive_count != 0) { _svmm_cond_wait (fat_lock->cond, fat_lock->mutex); } Thanks, -Archie __________________________________________________________________________ Archie Cobbs * Precision I/O * http://www.precisionio.com |
From: Brian J. <cb...@gn...> - 2003-04-11 22:07:59
|
John Leuner <je...@pi...> writes: > On Tue, 2003-04-01 at 14:11, Grzegorz B. Prokopski wrote: > > W li=B6cie z wto, 01-04-2003, godz. 10:59, Grzegorz B. Prokopski pisze: > > > It took a bit longer than expected but in the end the "blind porting" > > > succeeded. All Debian arches on which sablevm's build-deps are > > > satisfied are now supported. There's 8 of them, namely: > > >=20 > > > i386, powerpc, ia64, s390, arm, sparc, alpha, m68k > >=20 > > Apparently we're the first ones that built gnu classpath on s390 and > > this small fix is needed to make it compile there: >=20 > I thought I already added to this to Classpath CVS in September last > year? >=20 > John Leuner You did... or at least it is already there. Brian --=20 Brian Jones <cb...@gn...> |
From: David <db...@cs...> - 2003-04-07 17:26:20
|
On Sun, Apr 06, 2003 at 03:21:37PM -0400, Anatole LE wrote: > Thanks for the reply! >=20 > I have a couple more questions: >=20 > 1) I'd like to get exceptions thrown/caught events. For runtime > exceptions, it seems that it's located in error_throwing.m4.c in method > "_svmf_error_$1 (_svmt_JNIEnv *env)".=20 Anatole, I would try to put your profiling code in interpreter.c at the exception_handler label. Any exception thrown should reach that code. The _svmf_error_* simply sets env->throwable to an exception type in native code. When that code return (see: NATIVE_STATIC_METHOD in instructions.m4.c or instructions_switch.c), it will jump to the exception handling (goto exception_handler). From my understanding, this should be the only point to instrument to know all the exception thrown. > However, running "Hello World" > program throws an exception NoClassDefFoundError for the Hello class an= d > the VM recovers from it. This is probably thrown by a class loader. When a class loader cannot find a class, it probably throw an exception and another class loader attempts to load the class. I would need to review how ClassLoaders works to give a more complete answer. > This seems like an internal exception to the VM, > and we probably don't want that. I'm not sure though if it'd be possibl= e > to differentiate easily internal VM exceptions with runtime exceptions > caused by the user program (e.g. ArrayIndexOutOfBound). I don't think sablevm itself uses internal exception. These are probably raised by the class library. Then, we would want to know if it occured in the library or user code. You can know where in the code the exception occured. Where includes pc, method and class. So I guess you could consider if the class name start with "java/" and some other prefix (I think "gnu/java/" etc.) then you could know if it is library or user code. Instead of using prefix, you could check the class loader used to load the class that contains the code that generated the exception. If it is the boot class loader, it is system code. >=20 > The above was to get runtime exceptions thrown by the VM. For exception= s > thrown by the user program, we can get them with ATHROW bytecode for > direct or switch interpreter. For inlined-threaded, ATHROW bytecode see= ms > to be replaced by a GOTO instruction, right? I will need to look into that one. But I think they are all conceptually gotos. Depending on the interpreter type things are store differently in the code array. >=20 > For exception caught events, it seems to be located in "interpreter.c" = at > line 209 (exception_handler label). I was wondering whether this was th= e > central location where all exceptions are caught... Yes it is, as I explained above. >=20 > 2) We'd also like to get thread status change events (running, runnable= or > suspended). It seems that SableVM lets the OS manage the threads > (pthreads), so it wouldn't really be possible to get these events, exce= pt > for GC check point where the thread status is explicitly changed by the > VM. Am I right? I don't think you can have that info with SableVM since SableVM as no control over the thread scheduling. At gc check point, thread will "suspended" (I think they block on a condition variable) to allow garbage collection. There may be some way to get the runnable/suspended state from the pthread library. There may be some tools for pthreads that does this. David >=20 >=20 > Thanks in advance! > Anatole >=20 >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb:=20 > Dedicated Hosting for just $79/mo with 500 GB of bandwidth!=20 > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Sablevm-developer mailing list > Sab...@li... > https://lists.sourceforge.net/lists/listinfo/sablevm-developer --=20 --- David B=E9langer Graduate Student School of Computer Science McGill University Office: MC226 Web page: http://www.cs.mcgill.ca/~dbelan2/ Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt |
From: Anatole LE <al...@cs...> - 2003-04-06 19:21:39
|
Thanks for the reply! I have a couple more questions: 1) I'd like to get exceptions thrown/caught events. For runtime exceptions, it seems that it's located in error_throwing.m4.c in method "_svmf_error_$1 (_svmt_JNIEnv *env)". However, running "Hello World" program throws an exception NoClassDefFoundError for the Hello class and the VM recovers from it. This seems like an internal exception to the VM, and we probably don't want that. I'm not sure though if it'd be possible to differentiate easily internal VM exceptions with runtime exceptions caused by the user program (e.g. ArrayIndexOutOfBound). The above was to get runtime exceptions thrown by the VM. For exceptions thrown by the user program, we can get them with ATHROW bytecode for direct or switch interpreter. For inlined-threaded, ATHROW bytecode seems to be replaced by a GOTO instruction, right? For exception caught events, it seems to be located in "interpreter.c" at line 209 (exception_handler label). I was wondering whether this was the central location where all exceptions are caught... 2) We'd also like to get thread status change events (running, runnable or suspended). It seems that SableVM lets the OS manage the threads (pthreads), so it wouldn't really be possible to get these events, except for GC check point where the thread status is explicitly changed by the VM. Am I right? Thanks in advance! Anatole |
From: Prof. E. M. G. <eti...@uq...> - 2003-04-05 15:22:56
|
Hi all. I will be attending a conference in Europe next week and I will probably not have access to my email. David Belanger will be in charge of the project while I am away. If any of you has some time, it would be really nice if you started working on fixing the sablevm/recent-classpath-snapshot in sablevm-experimental. Have fun! Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: John L. <je...@pi...> - 2003-04-05 13:45:51
|
On Tue, 2003-04-01 at 14:11, Grzegorz B. Prokopski wrote: > W li=B6cie z wto, 01-04-2003, godz. 10:59, Grzegorz B. Prokopski pisze: > > It took a bit longer than expected but in the end the "blind porting" > > succeeded. All Debian arches on which sablevm's build-deps are > > satisfied are now supported. There's 8 of them, namely: > >=20 > > i386, powerpc, ia64, s390, arm, sparc, alpha, m68k >=20 > Apparently we're the first ones that built gnu classpath on s390 and > this small fix is needed to make it compile there: I thought I already added to this to Classpath CVS in September last year? John Leuner > --- sablevm-nativelib-1.0.8.orig/src/fdlibm/ieeefp.h > +++ sablevm-nativelib-1.0.8/src/fdlibm/ieeefp.h > @@ -19,6 +19,10 @@ > #define __IEEE_BIG_ENDIAN > #endif > =20 > +#ifdef __s390__ > +#define __IEEE_BIG_ENDIAN > +#endif > + > #if defined (__sparc) || defined (__sparc__) > #define __IEEE_BIG_ENDIAN > #endif >=20 > this should go to the upstream too (Cc:ing) >=20 > Cheers, >=20 > Grzegorz B. Prokopski --=20 John Leuner <je...@pi...> |
From: Prof. E. M. G. <eti...@uq...> - 2003-04-05 03:38:26
|
Hi Anatole, Anatole LE wrote: > I'm implementing profiling within SableVM. One of the events I'm > interested in is class loading. It seems that this event correspond to > _svmf_bootcl_create_class(..) or _svmf_usercl_create_class(..) methods. > There isn't a "class loading" verbose in the latter, so I'm wondering > whether it's a class loading event. Can anyone clarify? In _svmf_usercl_create_class, the following call is made: if (_svmm_invoke_static_virtualmachine_createclass (env, class_loader_info->class_loader, name, class_instance) != JNI_OK) { _svmm_free_native_local (env, name); _svmm_free_native_local (env, class_instance); return JNI_ERR; } This calls back java.lang.VirtualMachine.createClass() method. Have you made sure that eventually this does not calls back into the VM and print the appropriate verbose message? The idea is that you don't want to print a message unless a class is actually loaded. Any further attempts to load the same class should simply be ignored. > > Also, I've looked in the code for class unloading, but it seems that it > never happens, right? Right. Class unloading is tricky. I would first implement instance finalization before class unloading. Have fun! Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Prof. E. M. G. <eti...@uq...> - 2003-04-05 03:22:51
|
Hi Andrea, Paolino paperino wrote: > now i've found the *.m4 files and started a deep trip > in source code, so i looked that the vm is first > initalized (calling JNI_CreateJavaVM) in sablevm.c and > then always in the same file, the vm executes the main > method through a call to the _svmf_interpreter > function. If i've well understood the first call to > the _svmf_intepreter has the job to initialize the > instructions and then exit with a return JNI_OK..but Right. > now i can't understand how the prepared code is > executed because it seems that there is a invocation > of the interpertation method for every instruction. It shouldn't be so. > In > a more precise manner, if i put a printf output at the > start of that function i could see on the screen the > message i wrote in the printf, many and many times. This is possible. > Could somebody gave me a ligthing hint about the > execution thread of the sablevm's interpretation > module? _svmf_interpreter() is called at every JNI->Java transition. In other word, any time native code calls a Java method, _svmf_interpreter is called. This can, of course, happen recursively. I hope this answers your question. Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Prof. E. M. G. <eti...@uq...> - 2003-04-05 03:17:57
|
Hi David, David B=E9langer wrote: > The PREPARE_INVOKE* special instruction both prepare the method and inv= oke it. > The REPLACE instruction is after the PREPARE_INVOKE*. This means that = if > the methods terminates abruptly due to an exception the REPLACE will no= t > get executed. >=20 > This will not lead to incorrect behaviour but if the method is always > throwing exception at a call site, the REPLACEment will never occur for= > that call site. If it is always throwing exception, the previous > statement applies to all call sites. >=20 > Since this is a rare case and exceptions are already inefficient it may= > not be worth the effort to change. In presence of inline-threading & preparation sequences, the alternative = would=20 be to insert multiple REPLACE instructions in the preparation sequence (w= ith=20 related GOTOs for the completion of pending PREPARE_* instructions in a b= asic=20 block. This might increase memory requirement (singnificantly or not, I = don't=20 know). My first intuition about this was that it might really be not worth worry= ing=20 about it. As you noted, if a preparation sequence never gets executed to= =20 completion, an exception is being thrown and the additional dispatch over= head=20 should be (hopefully) negligible. Yet, if somebody was able to measure t= his=20 overhead, we would have better information to make the right decision. I= f you=20 eventually have some spare time and would like to add a few #ifdef's and = counters, please do so. ;-) Have fun! Etienne --=20 Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Anatole LE <al...@cs...> - 2003-04-05 02:42:04
|
Hi, I'm implementing profiling within SableVM. One of the events I'm interested in is class loading. It seems that this event correspond to _svmf_bootcl_create_class(..) or _svmf_usercl_create_class(..) methods. There isn't a "class loading" verbose in the latter, so I'm wondering whether it's a class loading event. Can anyone clarify? Also, I've looked in the code for class unloading, but it seems that it never happens, right? Thanks, Anatole |
From: <von...@ya...> - 2003-04-04 15:32:02
|
Hi now i've found the *.m4 files and started a deep trip in source code, so i looked that the vm is first initalized (calling JNI_CreateJavaVM) in sablevm.c and then always in the same file, the vm executes the main method through a call to the _svmf_interpreter function. If i've well understood the first call to the _svmf_intepreter has the job to initialize the instructions and then exit with a return JNI_OK..but now i can't understand how the prepared code is executed because it seems that there is a invocation of the interpertation method for every instruction. In a more precise manner, if i put a printf output at the start of that function i could see on the screen the message i wrote in the printf, many and many times. Could somebody gave me a ligthing hint about the execution thread of the sablevm's interpretation module? Thanks a lot Andrea Selva ______________________________________________________________________ Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html |
From: Prof. E. M. G. <eti...@uq...> - 2003-04-01 13:45:17
|
Hi Grzegorz, Thanks a lot for the hard and nice work! So, if we include FreeBSD & MacOS X, we're up to 10 platforms. Great! Grzegorz B. Prokopski wrote: > If there's no 1.0.9 planned this week (no pressure Etienne, really) > then I'll make the announce about the current 1.0.8-4 debian package. > I just need to know what's in the schedule. I won't have time to do any further work on SableVM this and next week. Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Grzegorz B. P. <ga...@de...> - 2003-04-01 13:33:53
|
Hi! It is kinda "not my problem" thing, as I use Debian package which does contain a 'java' wrapper BUT IMO - SableVM and it's users (outside debian especially) deserve having a java wrapper. I am not sure where it should be put in the sources. Surely it'll go into sablevm module. Once it's there - it should probably be modified to contain some magic strings that could be replaced during installation stage to point the sablevm binary right (it's currently hardcoded). It wouldn't hurt to have it in 1.0.9 :-) Just a thought Grzegorz B. Prokopski PS: And there are also manual pages for sablevm and java-sablevm in debian package. Awaiting for review and an approval maybe. I think I could commit these things myself but the question is _where_ should I put them? PSS: I'd like to make an announce of SableVM *Debian* packages because since last announce changes are quite big: - new arches - current jikes supported - bugfixes If there's no 1.0.9 planned this week (no pressure Etienne, really) then I'll make the announce about the current 1.0.8-4 debian package. I just need to know what's in the schedule. --=20 Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |
From: Grzegorz B. P. <ga...@de...> - 2003-04-01 13:12:38
|
W li=B6cie z wto, 01-04-2003, godz. 10:59, Grzegorz B. Prokopski pisze: > It took a bit longer than expected but in the end the "blind porting" > succeeded. All Debian arches on which sablevm's build-deps are > satisfied are now supported. There's 8 of them, namely: >=20 > i386, powerpc, ia64, s390, arm, sparc, alpha, m68k Apparently we're the first ones that built gnu classpath on s390 and this small fix is needed to make it compile there: --- sablevm-nativelib-1.0.8.orig/src/fdlibm/ieeefp.h +++ sablevm-nativelib-1.0.8/src/fdlibm/ieeefp.h @@ -19,6 +19,10 @@ #define __IEEE_BIG_ENDIAN #endif =20 +#ifdef __s390__ +#define __IEEE_BIG_ENDIAN +#endif + #if defined (__sparc) || defined (__sparc__) #define __IEEE_BIG_ENDIAN #endif this should go to the upstream too (Cc:ing) Cheers, Grzegorz B. Prokopski --=20 Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |
From: Grzegorz B. P. <ga...@de...> - 2003-04-01 09:00:25
|
Hi! It took a bit longer than expected but in the end the "blind porting" succeeded. All Debian arches on which sablevm's build-deps are satisfied are now supported. There's 8 of them, namely: i386, powerpc, ia64, s390, arm, sparc, alpha, m68k As you probably know - the inlined engine has been disabled in current CVS for non-intel arches. So it is in debian package. However in this patch you'll find pieces responsible for flushing the cache with __clear_cache when assembler version is not found which will be useful when the inlined engine is proven to be working on other arches. The patch also reorganizes arch-specific stuff which is now #elseifdefed in *alphabetical* order. There's quite a lot of arches, so it makes sense to have them sorted somehow IMO. Cheers, Grzegorz B. Prokopski -- Grzegorz B. Prokopski <ga...@de...> Debian http://www.debian.org/ |