Thread: Re: [Sablevm-developer] Porting SableVM to ARM: Questions
Brought to you by:
egagnon
From: Gunda D. <sab...@ho...> - 2002-12-04 23:32:36
|
Etienne/Grzegorz, Thanks for all the advice you guys gave me. I finally got everything compiled and ready to go. When I ran the Hello World program, unfortunately sablevm failed. Here is the invocation I did sablevm -vsgj -c "/usr/local/lib/sablevm/classes-1.0.5" Hello.class The relevant output I got was [verbose jni: JNI_CreateJavaVM] [verbose gc: allocating initial heap (16777216 bytes)] [verbose class: loading "java/lang/Object"] sablevm: cannot create vm What went wrong ? Any help would be appreciated. After some testing I will post the diffs. Thanks. -Gunda PS: Etienne: When you said "The fun part (let say not before January) will be to make the inline-threaded engine functional on ARM" what did you mean ? Is there something that will prevent it from working on ARM ? >From: Grzegorz Prokopski <ga...@de...> >To: Gunda Domlur <sab...@ho...> >CC: SableVM-devel ML <sab...@li...> >Subject: Re: [Sablevm-developer] Porting SableVM to ARM: Questions >Date: 03 Dec 2002 23:59:34 +0100 > >W li¶cie z wto, 03-12-2002, godz. 22:36, Gunda Domlur pisze: > > Hi, > > > > I am trying to port sableVM for ARM linux (netwinder). After looking >thru > > the archives, I already made the following changes > > > > system.c: iflush and compare_and_swap ported to ARM > > system.h: The correct typedefs are in place > > jni_system_specific.h: Necessary changes are done. >Great! >Could you please send the diff? > > > Am I missing anything else ? >If it doesn't work by now - I can't say not looking at your changes. > > > Proabably a stupid question, where does the cpu type definitions (e.g. > > __ia64__) defined ? Is it part of the configure ? Is it in the generated > > Makefiles ? The reason is that after defining the new cpu type as >__arm__ I > > get a error "unknown system" generated from the jni_system_specific.h >file > > when I try to make. Is there a way to force the build to use a >particular > > target type ? >Hmm... I belive that these defines are set by build environment and we >shouldn't need to wory about who exactly is responsible for setting >them. The mechanism is probably a bit complicated - just imagine >crosscompilations and the like. > >But getting back to your problem - AFAIK __arm__ should be defined >while you're doing build for arm. > > > An early reply will be appreciated :-) >Usually You can try to catch me at #debian-devel at irc.debian.org >I am interested in helping you even _now_. > >You're welcomed > > Grzegorz B. Prokopski > > ><< signature.asc >> _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Gunda D. <sab...@ho...> - 2002-12-05 05:29:57
|
>Have you correctly compiled and installed all of sablevm, >sablevm-native-library, sablevm-class-library? SableVM seems not to >find "java.lang.Object" while bootstrapping. I think so. I will check again. I had to do one thing out of the ordinary though. Jikes did not compile on our system (arm/linux), mostly because we don't a working C++ compiler :-( The sablevm-class library was built on a P4/Linux machine and then the whole /usr/local/lib/sablevm/classes-1.0.5 contents were ftp'ed to the arm/linux system to the same path. This step shouldn't affect anything I think. Let me know if I got anything wrong. > >Also, why are you specifying: -c "/usr/local/lib/sablevm/classes-1.0.5" ? I thought this was the way to tell the sablevm the class path. How does the vm know where to look for the class libraries ? Is it thru an environment variable ? After compiling and installing according to your scripts is there anything else I need to set ? > > > PS: Etienne: When you said "The fun part (let say not before January) >will > > be to make the inline-threaded engine functional on ARM" what did you >mean > > ? Is there something that will prevent it from working on ARM ? > > >Getting inline-threading to work on a specific platform requires >(a) understanding how its caches behave (including data AND instruction >caches). It also involves (b) testing the various bytecode >implementations for "inlinability". > >The (a) part requires finding the relevant information, and clearly >understanding it. The (b) part will require some minor rethinking of >how the "inlinability" is encoded in SableVM, so that it becomes easy >to manage this property on an architecture/compiler basis, ideally in >independent files, one per platform. OK I can help with part (a). I don't fully understand part (b). After I get the basic interpreter going I intend to work on the inlining part too. I will bug you again on that. Meanwhile if you can elaborate on the "inlinability" that would get me started thinking ... > >So, yes this will be fun (at least for me), as I will learn a lot >about all these exotic systems! [I do not have any idea what the ARM >architecture is!] > >The main difficulty is that to be more productive, I will need to >have access to such systems. I hear that becoming an official Debian >developer to gain access to various systems (of different >architectures) requires many months. I will have trouble to be >effective without access to such systems to make tests... > >Of course, ideally contributors (with access to such systems) should >be in charge, but it's always fun to land a hand when you're the main >system designer, and people need help... Hmm.. let me think about this for a while. Thanks. -Gunda _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Etienne M. G. <eti...@uq...> - 2002-12-05 17:20:49
|
On Wed, Dec 04, 2002 at 10:29:27PM -0700, Gunda Domlur wrote: > I think so. I will check again. I had to do one thing out of the ordinary > though. Jikes did not compile on our system (arm/linux), mostly because we > don't a working C++ compiler :-( Ah! A good reason for writing the VM and class libraries in plain C. :-) > and The sablevm-class library was built on a > P4/Linux machine and then the whole /usr/local/lib/sablevm/classes-1.0.5 > contents were ftp'ed to the arm/linux system to the same path. This step > shouldn't affect anything I think. Let me know if I got anything wrong. It should be OK. > >Also, why are you specifying: -c "/usr/local/lib/sablevm/classes-1.0.5" ? > > I thought this was the way to tell the sablevm the class path. How does the > vm know where to look for the class libraries ? The default "boot class path" is hardcoded in the VM (value given by the GNU configure stuff), but can be dynamically specified on the command-line using "--property". The command-line options are documented in an appendix of my thesis(to be made public very soon). The "application" class path defaults to "." and can be changed using the --classpath command-line parameter. "boot" and "application" class path are managed separately, which simplifies users life a lot. (Usually, a user should't play with the booclasspath). So, you could write: sablevm --property "sablevm.boot.class.path=/usr/local/lib/sablevm/classes-1.0.5" --classpath .:$HOME/classes HelloWorld For frequently used properties, you can put the into either /etc/sablevm or $HOME/.sablevm like this: # beginning of file property = sablevm.boot.class.path=/usr/local/lib/sablevm/classes-1.0.5 # end of file > OK I can help with part (a). > > I don't fully understand part (b). After I get the basic interpreter going > I intend to work on the inlining part too. I will bug you again on that. > Meanwhile if you can elaborate on the "inlinability" that would get me > started thinking ... Chapter 2 of my thesis should help you there. FYI. I usually use gdb (or more specifically ddd) to debug sablevm. You should definitely build sablevm with: ./configure --enable-debuggin-features This will make debugging much easier, as the normal build puts a "segfault" (which is then catched through a signal habdler) on the normal execution path of VM bootstrap... This can be somewhat unsettling for new developers trying to understand what's happening. ;-) Have fun! Etienne -- Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Etienne M. G. <eti...@uq...> - 2002-12-05 17:27:42
|
On Thu, Dec 05, 2002 at 12:14:03PM -0500, Etienne M. Gagnon wrote: > ./configure --enable-debuggin-features This should be: --enable_debugging_features Etienne -- Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Gunda D. <sab...@ho...> - 2002-12-06 00:05:15
|
Etienne, I think I found the problem. In files class_loader.c at line 305 you are checking for version number of the class file. The Object.class file under ...../java/lang on my machine has a major_version of 47 and a minor_version of 0. With these values the check in the code fails. Don't know the details of this version number. I built the class libraries using jikes 1.18 on a P4/Linux box. What can I do step around this problem ? Thanks. -Gunda >From: "Etienne M. Gagnon" <eti...@uq...> >To: Gunda Domlur <sab...@ho...> >CC: sab...@li... >Subject: Re: [Sablevm-developer] Porting SableVM to ARM: Questions >Date: Thu, 5 Dec 2002 12:17:39 -0500 > >On Thu, Dec 05, 2002 at 12:14:03PM -0500, Etienne M. Gagnon wrote: > > ./configure --enable-debuggin-features > >This should be: --enable_debugging_features > >Etienne >-- >Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/ >SableVM: http://www.sablevm.org/ >SableCC: http://www.sablecc.org/ > > >------------------------------------------------------- >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 _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Etienne M. G. <eti...@uq...> - 2002-12-06 01:19:59
|
On Thu, Dec 05, 2002 at 05:04:19PM -0700, Gunda Domlur wrote: > I think I found the problem. In files class_loader.c at line 305 you are > checking for version number of the class file. The Object.class file under > ...../java/lang on my machine has a major_version of 47 and a minor_version > of 0. With these values the check in the code fails. > > Don't know the details of this version number. I built the class libraries > using jikes 1.18 on a P4/Linux box. > > What can I do step around this problem ? Please compile classes using jikes-1.15. Newer versions of Jikes are not yet supported (there are known problems with Jikes 1.17 them that need further investigation). As for the class version number, it means that Jikes 1.18 generates bytecode which is not supported by the currently published JVM specification (i.e. second edition)... Etienne -- Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Gunda D. <sab...@ho...> - 2002-12-06 19:05:13
|
Etienne, A little progress but my Hello world program still fails. I recompiled all the class libraries with jikes 1.15. Now sablevm can't find the application class. The invocation was sable-debug -v HelloAppworld.class. The java source is class HelloWorldApp { public static void main (String args[]) { System.out.println("Hello World!"); } } /* Expected Output: Hello World! */ I did compile the hello.java with jikes 1.15. Why are we not finding the application class ? Any ideas ? Thanks. -Gunda The output from sablevm is as follows. SableVM version 1.0.5 Copyright (C) 2000-2002 Etienne M. Gagnon <eti...@uq...> and others. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. To get the name of all copyright holders and detailed license information, type "sablevm --license" or look in the directory "/usr/local/share/sablevm". The SableVM web site is located at http://www.sablevm.org/ . [verbose jni: JNI_CreateJavaVM] [verbose gc: allocating initial heap (16777216 bytes)] [verbose class: loading "java/lang/Object"] [verbose class: loading "java/io/Serializable"] [verbose class: loading "java/lang/Cloneable"] [verbose class: creating "[B"] [verbose class: loading "java/lang/Class"] [verbose class: loading "java/lang/StackTraceElement"] [verbose class: loading "java/lang/reflect/Constructor"] [verbose class: loading "java/lang/reflect/AccessibleObject"] [verbose class: loading "java/lang/reflect/Member"] [verbose class: loading "java/lang/reflect/Field"] [verbose class: loading "java/lang/reflect/Method"] [verbose class: loading "java/lang/StringCreator"] [verbose class: loading "java/lang/VirtualMachine"] [verbose class: creating "[Z"] [verbose class: creating "[S"] [verbose class: creating "[C"] [verbose class: creating "[I"] [verbose class: creating "[J"] [verbose class: creating "[F"] [verbose class: creating "[D"] [verbose class: loading "java/lang/ArithmeticException"] [verbose class: loading "java/lang/RuntimeException"] [verbose class: loading "java/lang/Exception"] [verbose class: loading "java/lang/Throwable"] [verbose class: loading "java/lang/ArrayIndexOutOfBoundsException"] [verbose class: loading "java/lang/IndexOutOfBoundsException"] [verbose class: loading "java/lang/ArrayStoreException"] [verbose class: loading "java/lang/ClassCastException"] [verbose class: loading "java/lang/IllegalMonitorStateException"] [verbose class: loading "java/lang/NegativeArraySizeException"] [verbose class: loading "java/lang/NoSuchFieldException"] [verbose class: loading "java/lang/NoSuchMethodException"] [verbose class: loading "java/lang/NullPointerException"] [verbose class: loading "java/lang/AbstractMethodError"] [verbose class: loading "java/lang/IncompatibleClassChangeError"] [verbose class: loading "java/lang/LinkageError"] [verbose class: loading "java/lang/Error"] [verbose class: loading "java/lang/ClassCircularityError"] [verbose class: loading "java/lang/ClassFormatError"] [verbose class: loading "java/lang/ExceptionInInitializerError"] [verbose class: loading "java/lang/InternalError"] [verbose class: loading "java/lang/VirtualMachineError"] [verbose class: loading "java/lang/NoClassDefFoundError"] [verbose class: loading "java/lang/NoSuchFieldError"] [verbose class: loading "java/lang/NoSuchMethodError"] [verbose class: loading "java/lang/OutOfMemoryError"] [verbose class: loading "java/lang/UnsatisfiedLinkError"] [verbose class: loading "java/lang/UnsupportedClassVersionError"] [verbose class: loading "java/lang/VerifyError"] [verbose class: loading "java/lang/String"] [verbose class: loading "java/lang/Comparable"] [verbose class: loading "java/lang/CharSequence"] [verbose class: loading "java/util/WeakHashMap"] [verbose class: loading "java/util/AbstractMap"] [verbose class: loading "java/util/Map"] [verbose class: loading "java/lang/VMObject"] [verbose class: loading "java/util/WeakHashMap$1"] [verbose class: loading "java/util/WeakHashMap$WeakEntrySet"] [verbose class: loading "java/util/AbstractSet"] [verbose class: loading "java/util/AbstractCollection"] [verbose class: loading "java/util/Collection"] [verbose class: loading "java/util/Set"] [verbose class: loading "java/lang/ref/ReferenceQueue"] [verbose class: loading "java/util/WeakHashMap$WeakBucket"] [verbose class: loading "java/lang/ref/WeakReference"] [verbose class: loading "java/lang/ref/Reference"] [verbose class: creating "[Ljava/util/WeakHashMap$WeakBucket;"] [verbose class: loading "java/lang/System"] [verbose class: loading "java/lang/VMSystem"] [verbosjava.lang.ClassNotFoundException: hello.class at gnu.java.lang.SystemClassLoader.findClass(SystemClassLoader.java:73) at java.lang.ClassLoader.loadClass(ClassLoader.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:259) at java.lang.VirtualMachine.main(VirtualMachine.java:79) e class: loading "java/lang/Math"] [verbose class: loading "java/lang/Runtime"] [verbose class: loading "java/util/Properties"] [verbose class: loading "java/util/Hashtable"] [verbose class: loading "java/util/Dictionary"] [verbose class: loading "java/util/Hashtable$HashEntry"] [verbose class: loading "java/util/AbstractMap$BasicMapEntry"] [verbose class: loading "java/util/Map$Entry"] [verbose class: creating "[Ljava/util/Hashtable$HashEntry;"] [verbose class: loading "java/util/StringTokenizer"] [verbose class: loading "java/util/Enumeration"] [verbose class: creating "[Ljava/lang/String;"] [verbose class: loading "java/lang/StringBuffer"] [verbose class: loading "java/lang/VMSecurityManager"] [verbose class: loading "java/util/WeakHashMap$WeakBucket$WeakEntry"] [verbose class: loading "java/io/BufferedInputStream"] [verbose class: loading "java/io/FilterInputStream"] [verbose class: loading "java/io/InputStream"] [verbose class: loading "java/io/FileInputStream"] [verbose class: loading "java/io/FileDescriptor"] [verbose class: loading "java/io/PrintStream"] [verbose class: loading "java/io/FilterOutputStream"] [verbose class: loading "java/io/OutputStream"] [verbose class: loading "java/io/BufferedOutputStream"] [verbose class: loading "java/io/FileOutputStream"] [verbose class: loading "java/io/PrintWriter"] [verbose class: loading "java/io/Writer"] [verbose class: loading "java/io/OutputStreamWriter"] [verbose class: loading "gnu/java/io/EncodingManager"] [verbose class: loading "java/lang/VMClassLoader"] [verbose class: loading "gnu/java/io/decode/Decoder8859_1"] [verbose class: loading "gnu/java/io/decode/DecoderEightBitLookup"] [verbose class: loading "gnu/java/io/decode/Decoder"] [verbose class: loading "java/io/Reader"] [verbose class: creating "[Ljava/lang/Class;"] [verbose class: creating "[Ljava/lang/Object;"] [verbose class: loading "gnu/java/io/encode/Encoder8859_1"] [verbose class: loading "gnu/java/io/encode/EncoderEightBitLookup"] [verbose class: loading "gnu/java/io/encode/Encoder"] [verbose class: loading "java/lang/String$CaseInsensitiveComparator"] [verbose class: loading "java/util/Comparator"] [verbose class: loading "java/lang/ClassLoader"] [verbose class: loading "gnu/java/lang/SystemClassLoader"] [verbose class: loading "java/util/HashMap"] [verbose class: loading "java/util/HashMap$HashEntry"] [verbose class: creating "[Ljava/util/HashMap$HashEntry;"] [verbose class: loading "java/util/HashSet"] [verbose class: loading "java/security/CodeSource"] [verbose class: loading "java/security/Policy"] [verbose class: loading "gnu/java/security/provider/DefaultPolicy"] [verbose class: loading "java/security/AllPermission"] [verbose class: loading "java/security/Permission"] [verbose class: loading "java/security/Guard"] [verbose class: loading "java/security/Permissions"] [verbose class: loading "java/security/PermissionCollection"] [verbose class: loading "java/security/AllPermissionCollection"] [verbose class: loading "java/security/ProtectionDomain"] [verbose class: loading "hello/class"] [verbose class: loading "java/lang/ClassNotFoundException"] [verbose class: loading "java/io/File"] [verbose class: loading "java/util/Locale"] [verbose class: loading "java/lang/Character"] [verbose class: creating "[Ljava/lang/StackTraceElement;"] [verbose class: loading "java/lang/Integer"] [verbose class: loading "java/lang/Number"] [verbose gc: total gc time = 0 sec 0 usec] _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Etienne M. G. <eti...@uq...> - 2002-12-06 20:46:10
|
Gunda Domlur wrote: > java.lang.ClassNotFoundException: hello.class > at gnu.java.lang.SystemClassLoader.findClass(SystemClassLoader.java:73) > at java.lang.ClassLoader.loadClass(ClassLoader.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:259) > at java.lang.VirtualMachine.main(VirtualMachine.java:79) This is Great new! It means SableVM executes quite a lot of code. [Stack traces are computed in Java, so there's quite a lot of things that are running for the VM to be able to throw an exception with a stack trace on loading a class through a Java based class loader.] Now as to why you get an exception, we should investigate. Mainly, you could add a few System.out.println(...) traces in the class: gnu.java.lang.SystemClassLoader in the method "findClass(...)" This is, of course, located in the sablevm-class-library, in the file: src/gnu/java/lang/SystemClassLoader.java You must recompile, and try running SableVM with the modified class library. It's so much fun when bootstrapping is done, as you can start debugging the Java code instead of the C code... ;-) [Usually this is much easier to do, as you have String concatenation, and automatic int->String conversion in Java without worrying about memory]. I hope this helps. Etienne Gunda Domlur wrote: > Etienne, > > A little progress but my Hello world program still fails. > > I recompiled all the class libraries with jikes 1.15. Now sablevm can't > find the application class. > > The invocation was > > sable-debug -v HelloAppworld.class. > > The java source is > > class HelloWorldApp { > public static void main (String args[]) { > System.out.println("Hello World!"); > } > } > > > /* Expected Output: > Hello World! > */ > > I did compile the hello.java with jikes 1.15. > > Why are we not finding the application class ? Any ideas ? > > Thanks. > -Gunda > > The output from sablevm is as follows. > > > SableVM version 1.0.5 > Copyright (C) 2000-2002 Etienne M. Gagnon <eti...@uq...> and > others. All rights reserved. > > This software comes with ABSOLUTELY NO WARRANTY. This is free > software, and you are welcome to redistribute it under certain > conditions. > > To get the name of all copyright holders and detailed license > information, type "sablevm --license" or look in the directory > "/usr/local/share/sablevm". > > The SableVM web site is located at http://www.sablevm.org/ . > > [verbose jni: JNI_CreateJavaVM] > [verbose gc: allocating initial heap (16777216 bytes)] > [verbose class: loading "java/lang/Object"] > [verbose class: loading "java/io/Serializable"] > [verbose class: loading "java/lang/Cloneable"] > [verbose class: creating "[B"] > [verbose class: loading "java/lang/Class"] > [verbose class: loading "java/lang/StackTraceElement"] > [verbose class: loading "java/lang/reflect/Constructor"] > [verbose class: loading "java/lang/reflect/AccessibleObject"] > [verbose class: loading "java/lang/reflect/Member"] > [verbose class: loading "java/lang/reflect/Field"] > [verbose class: loading "java/lang/reflect/Method"] > [verbose class: loading "java/lang/StringCreator"] > [verbose class: loading "java/lang/VirtualMachine"] > [verbose class: creating "[Z"] > [verbose class: creating "[S"] > [verbose class: creating "[C"] > [verbose class: creating "[I"] > [verbose class: creating "[J"] > [verbose class: creating "[F"] > [verbose class: creating "[D"] > [verbose class: loading "java/lang/ArithmeticException"] > [verbose class: loading "java/lang/RuntimeException"] > [verbose class: loading "java/lang/Exception"] > [verbose class: loading "java/lang/Throwable"] > [verbose class: loading "java/lang/ArrayIndexOutOfBoundsException"] > [verbose class: loading "java/lang/IndexOutOfBoundsException"] > [verbose class: loading "java/lang/ArrayStoreException"] > [verbose class: loading "java/lang/ClassCastException"] > [verbose class: loading "java/lang/IllegalMonitorStateException"] > [verbose class: loading "java/lang/NegativeArraySizeException"] > [verbose class: loading "java/lang/NoSuchFieldException"] > [verbose class: loading "java/lang/NoSuchMethodException"] > [verbose class: loading "java/lang/NullPointerException"] > [verbose class: loading "java/lang/AbstractMethodError"] > [verbose class: loading "java/lang/IncompatibleClassChangeError"] > [verbose class: loading "java/lang/LinkageError"] > [verbose class: loading "java/lang/Error"] > [verbose class: loading "java/lang/ClassCircularityError"] > [verbose class: loading "java/lang/ClassFormatError"] > [verbose class: loading "java/lang/ExceptionInInitializerError"] > [verbose class: loading "java/lang/InternalError"] > [verbose class: loading "java/lang/VirtualMachineError"] > [verbose class: loading "java/lang/NoClassDefFoundError"] > [verbose class: loading "java/lang/NoSuchFieldError"] > [verbose class: loading "java/lang/NoSuchMethodError"] > [verbose class: loading "java/lang/OutOfMemoryError"] > [verbose class: loading "java/lang/UnsatisfiedLinkError"] > [verbose class: loading "java/lang/UnsupportedClassVersionError"] > [verbose class: loading "java/lang/VerifyError"] > [verbose class: loading "java/lang/String"] > [verbose class: loading "java/lang/Comparable"] > [verbose class: loading "java/lang/CharSequence"] > [verbose class: loading "java/util/WeakHashMap"] > [verbose class: loading "java/util/AbstractMap"] > [verbose class: loading "java/util/Map"] > [verbose class: loading "java/lang/VMObject"] > [verbose class: loading "java/util/WeakHashMap$1"] > [verbose class: loading "java/util/WeakHashMap$WeakEntrySet"] > [verbose class: loading "java/util/AbstractSet"] > [verbose class: loading "java/util/AbstractCollection"] > [verbose class: loading "java/util/Collection"] > [verbose class: loading "java/util/Set"] > [verbose class: loading "java/lang/ref/ReferenceQueue"] > [verbose class: loading "java/util/WeakHashMap$WeakBucket"] > [verbose class: loading "java/lang/ref/WeakReference"] > [verbose class: loading "java/lang/ref/Reference"] > [verbose class: creating "[Ljava/util/WeakHashMap$WeakBucket;"] > [verbose class: loading "java/lang/System"] > [verbose class: loading "java/lang/VMSystem"] > [verbosjava.lang.ClassNotFoundException: hello.class > at gnu.java.lang.SystemClassLoader.findClass(SystemClassLoader.java:73) > at java.lang.ClassLoader.loadClass(ClassLoader.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:259) > at java.lang.VirtualMachine.main(VirtualMachine.java:79) > e class: loading "java/lang/Math"] > [verbose class: loading "java/lang/Runtime"] > [verbose class: loading "java/util/Properties"] > [verbose class: loading "java/util/Hashtable"] > [verbose class: loading "java/util/Dictionary"] > [verbose class: loading "java/util/Hashtable$HashEntry"] > [verbose class: loading "java/util/AbstractMap$BasicMapEntry"] > [verbose class: loading "java/util/Map$Entry"] > [verbose class: creating "[Ljava/util/Hashtable$HashEntry;"] > [verbose class: loading "java/util/StringTokenizer"] > [verbose class: loading "java/util/Enumeration"] > [verbose class: creating "[Ljava/lang/String;"] > [verbose class: loading "java/lang/StringBuffer"] > [verbose class: loading "java/lang/VMSecurityManager"] > [verbose class: loading "java/util/WeakHashMap$WeakBucket$WeakEntry"] > [verbose class: loading "java/io/BufferedInputStream"] > [verbose class: loading "java/io/FilterInputStream"] > [verbose class: loading "java/io/InputStream"] > [verbose class: loading "java/io/FileInputStream"] > [verbose class: loading "java/io/FileDescriptor"] > [verbose class: loading "java/io/PrintStream"] > [verbose class: loading "java/io/FilterOutputStream"] > [verbose class: loading "java/io/OutputStream"] > [verbose class: loading "java/io/BufferedOutputStream"] > [verbose class: loading "java/io/FileOutputStream"] > [verbose class: loading "java/io/PrintWriter"] > [verbose class: loading "java/io/Writer"] > [verbose class: loading "java/io/OutputStreamWriter"] > [verbose class: loading "gnu/java/io/EncodingManager"] > [verbose class: loading "java/lang/VMClassLoader"] > [verbose class: loading "gnu/java/io/decode/Decoder8859_1"] > [verbose class: loading "gnu/java/io/decode/DecoderEightBitLookup"] > [verbose class: loading "gnu/java/io/decode/Decoder"] > [verbose class: loading "java/io/Reader"] > [verbose class: creating "[Ljava/lang/Class;"] > [verbose class: creating "[Ljava/lang/Object;"] > [verbose class: loading "gnu/java/io/encode/Encoder8859_1"] > [verbose class: loading "gnu/java/io/encode/EncoderEightBitLookup"] > [verbose class: loading "gnu/java/io/encode/Encoder"] > [verbose class: loading "java/lang/String$CaseInsensitiveComparator"] > [verbose class: loading "java/util/Comparator"] > [verbose class: loading "java/lang/ClassLoader"] > [verbose class: loading "gnu/java/lang/SystemClassLoader"] > [verbose class: loading "java/util/HashMap"] > [verbose class: loading "java/util/HashMap$HashEntry"] > [verbose class: creating "[Ljava/util/HashMap$HashEntry;"] > [verbose class: loading "java/util/HashSet"] > [verbose class: loading "java/security/CodeSource"] > [verbose class: loading "java/security/Policy"] > [verbose class: loading "gnu/java/security/provider/DefaultPolicy"] > [verbose class: loading "java/security/AllPermission"] > [verbose class: loading "java/security/Permission"] > [verbose class: loading "java/security/Guard"] > [verbose class: loading "java/security/Permissions"] > [verbose class: loading "java/security/PermissionCollection"] > [verbose class: loading "java/security/AllPermissionCollection"] > [verbose class: loading "java/security/ProtectionDomain"] > [verbose class: loading "hello/class"] > [verbose class: loading "java/lang/ClassNotFoundException"] > [verbose class: loading "java/io/File"] > [verbose class: loading "java/util/Locale"] > [verbose class: loading "java/lang/Character"] > [verbose class: creating "[Ljava/lang/StackTraceElement;"] > [verbose class: loading "java/lang/Integer"] > [verbose class: loading "java/lang/Number"] > [verbose gc: total gc time = 0 sec 0 usec] > > > > > > > > > _________________________________________________________________ > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > > -- Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Mark W. <ma...@kl...> - 2002-12-07 00:29:09
|
Hi, On Fri, 2002-12-06 at 20:05, Gunda Domlur wrote: > The invocation was > > sable-debug -v HelloAppworld.class. Try specifying the class without the .class extension: sable-debug -v HelloAppworld Cheers, Mark |
From: Gunda D. <sab...@ho...> - 2002-12-10 00:13:18
|
Thanks Mike for the tip, it worked ! I now have the switched and the direct threaded interpreter working for small programs. I will stress test the vm's in a few days with larger programs. The inlined version still fails. Why ? Any particular area I should look at to solve this problem ? I believe I have the _iflush routine implemented correctly. Any pointers will be appreciated. Thanks. -Gunda >From: Mark Wielaard <ma...@kl...> >To: Gunda Domlur <sab...@ho...> >CC: sab...@li... >Subject: Re: [Sablevm-developer] Porting SableVM to ARM: Questions >Date: 07 Dec 2002 01:27:47 +0100 > >Hi, > >On Fri, 2002-12-06 at 20:05, Gunda Domlur wrote: > > The invocation was > > > > sable-debug -v HelloAppworld.class. > >Try specifying the class without the .class extension: > > sable-debug -v HelloAppworld > >Cheers, > >Mark > > > >------------------------------------------------------- >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 _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Etienne M. G. <eg...@j-...> - 2002-12-10 02:37:31
|
On Mon, Dec 09, 2002 at 04:54:50PM -0700, Gunda Domlur wrote: > The inlined version still fails. Why ? Any particular area I should look at > to solve this problem ? I believe I have the _iflush routine implemented > correctly. Any pointers will be appreciated. Getting the inline-threaded engine to work is tricky. I suggest that you live with the switch and threaded engines for a little time. I'll be improving the portability framework for the inline-threaded engine in January 2003. I'll add the following features: 1- *partly* automatic detection of inlinability of instructions (on a specific architecture/compiler-options. 2- Better separation of inlinability specifications for specific platform/compiler-options. Of course, you can read chapter 2 of my thesis, when I put it online, to get a better idea of the problem. I just don't have time just now to explain all the details. Etienne -- Etienne M. Gagnon eg...@j-... SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Gunda D. <sab...@ho...> - 2003-01-03 17:16:42
|
Hi Etienne, Now I am back after the holidays to look at the problem of making the inlined version working on ARM. As per your previous suggestion (in a different discussion thread) I used the invocation sablevm-inlined -v -p sablevm.verbose.methods=true -p sablevm.verbose.instructions=true HelloWorldApp The program fails at different points in different runs. More than half the time GOTO is the last instruction executed. But the funny thing is that several GOTO's were executed before. Sometimes is fails on IFGT. Any suggestions ? Has anybody got sablevm-inlined working on other architectures (other than x86) ? I would love to hear their experiences. Thanks. -Gunda >From: "Etienne M. Gagnon" <eg...@j-...> >To: Gunda Domlur <sab...@ho...> >CC: ma...@kl..., sab...@li... >Subject: Re: [Sablevm-developer] Porting SableVM to ARM: Questions >Date: Mon, 9 Dec 2002 21:35:59 -0500 > >On Mon, Dec 09, 2002 at 04:54:50PM -0700, Gunda Domlur wrote: > > The inlined version still fails. Why ? Any particular area I should look >at > > to solve this problem ? I believe I have the _iflush routine implemented > > correctly. Any pointers will be appreciated. > >Getting the inline-threaded engine to work is tricky. I suggest that >you live with the switch and threaded engines for a little time. I'll >be improving the portability framework for the inline-threaded engine >in January 2003. I'll add the following features: > >1- *partly* automatic detection of inlinability of instructions (on a >specific architecture/compiler-options. > >2- Better separation of inlinability specifications for specific >platform/compiler-options. > > >Of course, you can read chapter 2 of my thesis, when I put it online, >to get a better idea of the problem. I just don't have time just now >to explain all the details. > >Etienne > >-- >Etienne M. Gagnon eg...@j-... >SableVM: http://www.sablevm.org/ >SableCC: http://www.sablecc.org/ > > >------------------------------------------------------- >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 _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Archie C. <ar...@de...> - 2003-01-03 17:45:08
|
Gunda Domlur wrote: > Now I am back after the holidays to look at the problem of making the > inlined version working on ARM. I happen to have been working with ARM assembly lately, on an unrelated project. One thing that may present difficulties for SableVM inline threading is the way that immediate values are handled. The ARM instruction set does not allow loading of arbitrary immediate values; to typically such values are stored in a 'literals' pool at the end of whatever function, etc. you are assembling or compiling, and then they are loaded using a PC-relative instruction. This means that if you move the code, but don't move the literals, it won't work. Moreover, it's hard to predict when the compiler is going to do this, because some constants can be loaded as immediate values (specifically, those that can be represented as an 8-bit value shifted an even number of bits, or the ones complement of such a value). Here's an example. Consider this C code: extern int x; extern int y; void foo() { x = 0xff000000; /* can be loaded as immediate */ y = 0x12345678; /* cannot be loaded as immediate */ } Here's what GCC outputs: .file "foo.c" .text .align 2 .global foo .type foo,function foo: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. ldr r3, .L2 mov r2, #-16777216 ldr r1, .L2+4 str r2, [r3, #0] ldr r3, .L2+8 @ lr needed for prologue str r1, [r3, #0] bx lr .L3: .align 2 .L2: .word x .word 305419896 .word y .Lfe1: .size foo,.Lfe1-foo .ident "GCC: (GNU) 3.2" Note that the 0x12345678 (305419896) constant is stored in the literal pool (starting at .L2) but the 0xff000000 (-16777216) constant is not. The latter is 'relocatable' but the former is not. So this is going to be tricky to predict which instructions are inlinable; it also depends on how the compiler compiles code. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com |
From: Gunda D. <sab...@ho...> - 2003-01-04 15:24:40
|
Archie, You are right. Dang, don't know how I missed that ! So the test for inlineability is more constrained for ARM. I will look at the m4 file again. Later, -Gunda >From: Archie Cobbs <ar...@de...> >To: Gunda Domlur <sab...@ho...> >CC: eg...@j-..., ma...@kl..., >sab...@li... >Subject: Re: [Sablevm-developer] Porting SableVM to ARM: Questions >Date: Fri, 3 Jan 2003 09:33:52 -0800 (PST) > >Gunda Domlur wrote: > > Now I am back after the holidays to look at the problem of making the > > inlined version working on ARM. > >I happen to have been working with ARM assembly lately, on an >unrelated project. One thing that may present difficulties for >SableVM inline threading is the way that immediate values are >handled. > >The ARM instruction set does not allow loading of arbitrary >immediate values; to typically such values are stored in a >'literals' pool at the end of whatever function, etc. you are >assembling or compiling, and then they are loaded using a >PC-relative instruction. > >This means that if you move the code, but don't move the >literals, it won't work. Moreover, it's hard to predict when >the compiler is going to do this, because some constants >can be loaded as immediate values (specifically, those that >can be represented as an 8-bit value shifted an even number >of bits, or the ones complement of such a value). > >Here's an example. Consider this C code: > > extern int x; > extern int y; > void > foo() > { > x = 0xff000000; /* can be loaded as immediate */ > y = 0x12345678; /* cannot be loaded as immediate */ > } > >Here's what GCC outputs: > > .file "foo.c" > .text > .align 2 > .global foo > .type foo,function > foo: > @ args = 0, pretend = 0, frame = 0 > @ frame_needed = 0, uses_anonymous_args = 0 > @ link register save eliminated. > ldr r3, .L2 > mov r2, #-16777216 > ldr r1, .L2+4 > str r2, [r3, #0] > ldr r3, .L2+8 > @ lr needed for prologue > str r1, [r3, #0] > bx lr > .L3: > .align 2 > .L2: > .word x > .word 305419896 > .word y > .Lfe1: > .size foo,.Lfe1-foo > .ident "GCC: (GNU) 3.2" > > >Note that the 0x12345678 (305419896) constant is stored in the literal >pool (starting at .L2) but the 0xff000000 (-16777216) constant is not. >The latter is 'relocatable' but the former is not. > >So this is going to be tricky to predict which instructions are >inlinable; it also depends on how the compiler compiles code. > >-Archie > >__________________________________________________________________________ >Archie Cobbs * Packet Design * http://www.packetdesign.com _________________________________________________________________ Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail |
From: Etienne M. G. <eti...@uq...> - 2002-12-05 01:31:25
|
On Wed, Dec 04, 2002 at 04:29:26PM -0700, Gunda Domlur wrote: > Thanks for all the advice you guys gave me. I finally got everything > compiled and ready to go. Super! > When I ran the Hello World program, unfortunately sablevm failed. Here is > the invocation I did > > sablevm -vsgj -c "/usr/local/lib/sablevm/classes-1.0.5" Hello.class > > The relevant output I got was > > [verbose jni: JNI_CreateJavaVM] > [verbose gc: allocating initial heap (16777216 bytes)] > [verbose class: loading "java/lang/Object"] > sablevm: cannot create vm Have you correctly compiled and installed all of sablevm, sablevm-native-library, sablevm-class-library? SableVM seems not to find "java.lang.Object" while bootstrapping. Also, why are you specifying: -c "/usr/local/lib/sablevm/classes-1.0.5" ? > PS: Etienne: When you said "The fun part (let say not before January) will > be to make the inline-threaded engine functional on ARM" what did you mean > ? Is there something that will prevent it from working on ARM ? Getting inline-threading to work on a specific platform requires (a) understanding how its caches behave (including data AND instruction caches). It also involves (b) testing the various bytecode implementations for "inlinability". The (a) part requires finding the relevant information, and clearly understanding it. The (b) part will require some minor rethinking of how the "inlinability" is encoded in SableVM, so that it becomes easy to manage this property on an architecture/compiler basis, ideally in independent files, one per platform. So, yes this will be fun (at least for me), as I will learn a lot about all these exotic systems! [I do not have any idea what the ARM architecture is!] The main difficulty is that to be more productive, I will need to have access to such systems. I hear that becoming an official Debian developer to gain access to various systems (of different architectures) requires many months. I will have trouble to be effective without access to such systems to make tests... Of course, ideally contributors (with access to such systems) should be in charge, but it's always fun to land a hand when you're the main system designer, and people need help... Etienne -- Etienne M. Gagnon http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |