sablevm-developer Mailing List for SableVM (Page 10)
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: Arnaud V. <av...@us...> - 2004-04-09 11:30:22
|
I reported this to #sablevm but not on the list.
*** Couldn't bind native method Java_java_util_TimeZone_getDefaultTimeZoneId ***
*** or Java_java_util_TimeZone_getDefaultTimeZoneId__ ***
$ cd ~/debian/avdyk/libcommons-pool-java/commons-pool-1.1/; debuild
dpkg-buildpackage: source package is commons-pool
dpkg-buildpackage: source version is 1.1-4
dpkg-buildpackage: source maintainer is Arnaud Vandyck <av...@de...>
dpkg-buildpackage: host architecture is powerpc
fakeroot debian/rules clean
test -x debian/rules
test "`id -u`" = 0
if test -n "" && test "" != "."; then rmdir ""; fi
if test "." != "."; then rmdir .; fi
dh_clean
cd . && /usr/bin/java-sablevm -classpath /usr/share/ant1.5/lib/ant.jar:/usr/share/java/commons-collections.jar:/usr/share/java/junit.jar: -Dant.home=/usr/share/ant1.5 org.apache.tools.ant.Main -Dcompile.debug=true -Dcompile.optimize=true -Dbuild.compiler=jikes clean || true
Buildfile: build.xml
*** Couldn't bind native method Java_java_util_TimeZone_getDefaultTimeZoneId ***
*** or Java_java_util_TimeZone_getDefaultTimeZoneId__ ***
java.lang.UnsatisfiedLinkError
at java.util.TimeZone.getDefaultTimeZoneId (TimeZone.java)
at java.util.TimeZone.defaultZone (TimeZone.java:99)
at java.util.TimeZone.getDefault (TimeZone.java:1147)
at java.util.GregorianCalendar.GregorianCalendar (GregorianCalendar.java:121)
at java.text.SimpleDateFormat.SimpleDateFormat (SimpleDateFormat.java:205)
at org.apache.tools.ant.util.DateUtils.static{} (DateUtils.java:101)
at java.lang.VMClass.step8 (VMClass.java)
at java.lang.VMClass.initialize (VMClass.java:126)
at java.lang.Class.initialize (Class.java:163)
at org.apache.tools.ant.DefaultLogger.formatTime (DefaultLogger.java:308)
at org.apache.tools.ant.DefaultLogger.buildFinished (DefaultLogger.java:192)
at org.apache.tools.ant.Project.fireBuildFinished (Project.java:1913)
at org.apache.tools.ant.Main.runBuild (Main.java:628)
at org.apache.tools.ant.Main.start (Main.java:196)
at org.apache.tools.ant.Main.main (Main.java:235)
at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
at java.lang.VirtualMachine.main (VirtualMachine.java:88)
...
Cheers,
--
Arnaud Vandyck
|
|
From: David <db...@cs...> - 2004-04-09 02:55:06
|
Hi, =46rom my understanding the AM_CFLAGS would be used by the Makefile.am writer to specify additional flags in Makefile.am instead of using CFLAGS that is set by the build system. http://sources.redhat.com/automake/automake.html#User%20Variables The -O2 comes from the: AC_PROG_CC macro. If it detects that the C compiler is gcc, it will set "-O2" if no CFLAGS is set. Additionnally, it will set -g if gcc supports it on that platform. One option could be to add: + if test "$with_threading" =3D "inlined"; then + CFLAGS=3D"$CFLAGS -O2" + fi + in the configure.ac in the section with gcc specific options. The SableVM hacker will not be ?!?? if he sets additional compiled options via CFLAGS that should not affect the inlined. What do you think? David On Mon, Apr 05, 2004 at 02:45:05PM -0400, Etienne Gagnon wrote: > I think there exists some AM_CFLAGS that we should be using. Any devote > soul willing to dig through the automake/conf docs to find out? >=20 > Etienne >=20 >=20 >=20 > David B=E9langer wrote: > >Hi, > > > >If the CFLAGS env variable is set (even to an empty string) when SableVM > >is built, the inlined interpreter will crash quite early. Both on x86 > >and ppc with several compiler versions... > > > >I looked quickly and not having the CFLAGS set, the compiler receives: > >-g -O2 > >in addition to SableVM specified CFLAGS in ./configure. > > > >Setting the CFLAGS env var to "-g -O2" or only "-O2" works. > > > >So, maybe we could specify -O2 explicitly in configure.ac and/or warn the > >user if he/she specifies his/her own CFLAGS. > > > >Any comments? > > > >David > > > >--- > > > >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 > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by: IBM Linux Tutorials > >Free Linux tutorial presented by Daniel Robbins, President and CEO of > >GenToo technologies. Learn everything from fundamentals to system > >administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > >_______________________________________________ > >Sablevm-developer mailing list > >Sab...@li... > >https://lists.sourceforge.net/lists/listinfo/sablevm-developer > > > >. > > >=20 >=20 > --=20 > Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ > SableVM: http://www.sablevm.org/ > SableCC: http://www.sablecc.org/ >=20 --=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: David <db...@cs...> - 2004-04-07 20:37:20
|
On Mon, Apr 05, 2004 at 10:14:11AM +0100, S. Meslin-Weber wrote: > Hi everyone, >=20 > As reported on #sablevm I'm happy to say that Odonata[1] runs well unde= r > SableVM. I haven't measured any speeds or memory usage but with regards > to visual output SableVM is on a par with GIJ (both use GNU Classpath, > I know, but I didn't want to assume that all JVM using GNU Classpath > would give the same results). I believe that the GNUClasspath AWT is th= e > cause of any visual/behavioural discrepancies I see when running Odonat= a > on SableVM (and GIJ) and on Sun's 1.4.2 Java2 SDK. >=20 Hi, Good work! > On a related note, I develop Odonata against Sun's 1.4.2 Java2 SDK and > make use of the -Xbootclasspath/p feature to prepend my classes ahead o= f > the JVM's own classes so that mine will be loaded in preference to any > default ones. >=20 > With SableVM I had to resort to extracting my jar file *over* SableVM's > core classpath installation. This is due to the bootclasspath argument > in SableVM seemingly not being able to take more than one path. Ideally= , > Sun-like arguments to override, append or prepend to the bootclasspath > would be highly beneficial. >=20 Yes, this functionality is currently not in SableVM. In case you or some SableVM developer is interested, it should be relatively easy to change the code in: function _svmh_bootcl_internal_load_class_file in file src/libsablevm/class_loader.c to parse the boot class path property for multiple paths. This will allow an override but with multiple paths. Ex: your_path:sablevm_boot_classpath The next step will consist of playing with src/sablevm/sablevm.c to add append, prepend options. David --- 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: David <db...@cs...> - 2004-04-07 20:27:45
|
On Tue, Apr 06, 2004 at 04:11:03PM -0400, Fancong Zeng wrote: > I am glad to know that Sable VM now supports GNU > Classpath 0.08. >=20 > I am wondering if Sable now runs Tomcat, a servelt container? >=20 > Furthermore, does Sable run the RUBiS benchmarks (the bookstore and > auction)? =20 >=20 Hi, I guess the best thing would be to try out and report whether they work successfully. :) If your apps works with CP 0.08, then they may work with SableVM. If not, please report the problem. Things that prevent apps from running are usually given higher priority. David --- 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: Fancong Z. <fz...@cs...> - 2004-04-06 20:11:06
|
I am glad to know that Sable VM now supports GNU Classpath 0.08. I am wondering if Sable now runs Tomcat, a servelt container? Furthermore, does Sable run the RUBiS benchmarks (the bookstore and auction)? Regards, -- Fancong Zeng Department of Computer Science Rutgers University Piscataway, NJ, 08854 (732)445-6994 http://www.cs.rutgers.edu/~fzeng |
|
From: Grzegorz B. P. <ga...@de...> - 2004-04-06 07:24:07
|
On Mon, Apr 05, 2004 at 11:32:02PM -0400, David B?langer wrote:
> {Get,Set}*ArrayRegion were buggy and were fixed upstream in:
> r1908 2004-03-28
> The Debian version is older and does not have that fix.
Perhaps if this bugfix (and others) were promoted to bugfree, as they
should, I could then put them in 1.1.1 debian package. There's no way
I could relese 1.1.2 these days.
GBP
--
Grzegorz B. Prokopski <ga...@de...>
Debian GNU/Linux http://www.debian.org
SableVM - LGPLed JVM http://www.sablevm.org
Why SableVM ?!? http://devel.sablevm.org/wiki/WhySableVM
|
|
From: David <db...@cs...> - 2004-04-06 03:55:31
|
Hi,
FYI,
{Get,Set}*ArrayRegion were buggy and were fixed upstream in:
r1908 2004-03-28
The Debian version is older and does not have that fix.
David
On Mon, Apr 05, 2004 at 08:43:12PM -0400, Etienne Gagnon wrote:
> Package: sablevm
> Version: 1.1.1-1
> Severity: normal
>=20
> The "upstream" sablevm version works, but not the debian version.
> See below.
>=20
> ### upstream ###
>=20
> $ ~/work/bin/sablevm -Y JNITest
> value =3D 47
> $ ~/work/bin/sablevm -V JNITest=20
> SableVM version staging+1942
> - compile date and time: 2004-04-05 23:45:04 UTC
> - gcc version: 3.3.3 (Debian 20040401)
> - signal based exception detection
> - copying garbage collection
> - bidirectional object layout
> - inline-threaded interpreter
>=20
> ### Debian ###
>=20
> $ sablevm -Y JNITest=20
> java.lang.NullPointerException
> at JNITest.testPtr (JNITest.java)
> at JNITest.main (JNITest.java:11)
> at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
> at java.lang.VirtualMachine.main (VirtualMachine.java:88)
> $ sablevm -V JNITest=20
> SableVM version 1.1.1
> - compile date and time: 2004-03-21 05:36:38 UTC
> - gcc version: 3.3.3 (Debian 20040306)
> - 'real life brokenness' features enabled
> - signal based exception detection
> - copying garbage collection
> - bidirectional object layout
> - inline-threaded interpreter
>=20
> Should the test code be attached to a bug report? If yes, please
> grab the code at:
>=20
> http://www.info.uqam.ca/~egagnon/jnitest/
>=20
> you compile it with:
> $ jikes JNITest.java
> $ gcc -Wall -pedantic -O3 -shared -o libtest.o libtest.c
>=20
>=20
> FYI: The broken behavior shows under both x86 and ppc.
>=20
> Thanks,
>=20
> Etienne
>=20
>=20
> -- System Information:
> Debian Release: testing/unstable
> APT prefers unstable
> APT policy: (500, 'unstable')
> Architecture: i386 (i686)
> Kernel: Linux 2.4.24
> Locale: LANG=3DC, LC_CTYPE=3DC
>=20
> Versions of packages sablevm depends on:
> ii java-common 0.22 Base of all Java packages
> ii libc6 2.3.2.ds1-11 GNU C Library: Shared libr=
aries an
> ii libffi2 1:3.3.3-6 Foreign Function Interface=
library
> ii libltdl3 1.5.4-1 A system independent dlope=
n wrappe
> ii libpopt0 1.7-4 lib for parsing cmdline pa=
rameters
> ii libsablevm1 1.1.1-1 Free implementation of JVM=
second=20
> ii unzip 5.50-3 De-archiver for .zip files
>=20
> -- no debconf information
>=20
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc=
lick
> _______________________________________________
> 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: Etienne G. <gag...@uq...> - 2004-04-06 01:08:22
|
Package: sablevm Version: 1.1.1-1 Severity: normal The "upstream" sablevm version works, but not the debian version. See below. ### upstream ### $ ~/work/bin/sablevm -Y JNITest value = 47 $ ~/work/bin/sablevm -V JNITest SableVM version staging+1942 - compile date and time: 2004-04-05 23:45:04 UTC - gcc version: 3.3.3 (Debian 20040401) - signal based exception detection - copying garbage collection - bidirectional object layout - inline-threaded interpreter ### Debian ### $ sablevm -Y JNITest java.lang.NullPointerException at JNITest.testPtr (JNITest.java) at JNITest.main (JNITest.java:11) at java.lang.VirtualMachine.invokeMain (VirtualMachine.java) at java.lang.VirtualMachine.main (VirtualMachine.java:88) $ sablevm -V JNITest SableVM version 1.1.1 - compile date and time: 2004-03-21 05:36:38 UTC - gcc version: 3.3.3 (Debian 20040306) - 'real life brokenness' features enabled - signal based exception detection - copying garbage collection - bidirectional object layout - inline-threaded interpreter Should the test code be attached to a bug report? If yes, please grab the code at: http://www.info.uqam.ca/~egagnon/jnitest/ you compile it with: $ jikes JNITest.java $ gcc -Wall -pedantic -O3 -shared -o libtest.o libtest.c FYI: The broken behavior shows under both x86 and ppc. Thanks, Etienne -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.4.24 Locale: LANG=C, LC_CTYPE=C Versions of packages sablevm depends on: ii java-common 0.22 Base of all Java packages ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an ii libffi2 1:3.3.3-6 Foreign Function Interface library ii libltdl3 1.5.4-1 A system independent dlopen wrappe ii libpopt0 1.7-4 lib for parsing cmdline parameters ii libsablevm1 1.1.1-1 Free implementation of JVM second ii unzip 5.50-3 De-archiver for .zip files -- no debconf information |
|
From: Etienne G. <gag...@uq...> - 2004-04-05 18:59:28
|
I think there exists some AM_CFLAGS that we should be using. Any devote soul willing to dig through the automake/conf docs to find out? Etienne David B=E9langer wrote: > Hi, >=20 > If the CFLAGS env variable is set (even to an empty string) when SableV= M > is built, the inlined interpreter will crash quite early. Both on x86 > and ppc with several compiler versions... >=20 > I looked quickly and not having the CFLAGS set, the compiler receives: > -g -O2 > in addition to SableVM specified CFLAGS in ./configure. >=20 > Setting the CFLAGS env var to "-g -O2" or only "-O2" works. >=20 > So, maybe we could specify -O2 explicitly in configure.ac and/or warn t= he > user if he/she specifies his/her own CFLAGS. >=20 > Any comments? >=20 > David >=20 > --- >=20 > David B=E9langer > Graduate Student > School of Computer Science > McGill University > Office: MC226 >=20 > Web page: http://www.cs.mcgill.ca/~dbelan2/ > Public key: http://www.cs.mcgill.ca/~dbelan2/public_key.txt >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > _______________________________________________ > Sablevm-developer mailing list > Sab...@li... > https://lists.sourceforge.net/lists/listinfo/sablevm-developer >=20 > . >=20 --=20 Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
|
From: David <db...@cs...> - 2004-04-05 18:31:32
|
Hi, If the CFLAGS env variable is set (even to an empty string) when SableVM is built, the inlined interpreter will crash quite early. Both on x86 and ppc with several compiler versions... I looked quickly and not having the CFLAGS set, the compiler receives: -g -O2 in addition to SableVM specified CFLAGS in ./configure. Setting the CFLAGS env var to "-g -O2" or only "-O2" works. So, maybe we could specify -O2 explicitly in configure.ac and/or warn the user if he/she specifies his/her own CFLAGS. Any comments? David --- 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: S. Meslin-W. <tw...@ad...> - 2004-04-05 09:19:46
|
Hi everyone,
As reported on #sablevm I'm happy to say that Odonata[1] runs well under
SableVM. I haven't measured any speeds or memory usage but with regards
to visual output SableVM is on a par with GIJ (both use GNU Classpath,
I know, but I didn't want to assume that all JVM using GNU Classpath
would give the same results). I believe that the GNUClasspath AWT is the
cause of any visual/behavioural discrepancies I see when running Odonata
on SableVM (and GIJ) and on Sun's 1.4.2 Java2 SDK.
On a related note, I develop Odonata against Sun's 1.4.2 Java2 SDK and
make use of the -Xbootclasspath/p feature to prepend my classes ahead of
the JVM's own classes so that mine will be loaded in preference to any
default ones.
With SableVM I had to resort to extracting my jar file *over* SableVM's
core classpath installation. This is due to the bootclasspath argument
in SableVM seemingly not being able to take more than one path. Ideally,
Sun-like arguments to override, append or prepend to the bootclasspath
would be highly beneficial.
Thanks for the great work on SableVM!
Stephane
[1] Odonata is a set of 100% Java AWT peers for use with framebuffers.
It is released under the GPL and further information can be found
at: http://odonata.tangency.co.uk
|
|
From: <can...@ya...> - 2004-04-02 12:35:59
|
Hi, everyone! Happy fool's day! But the following message is true! We added a variable localthreadheap at "_svmt_JNIEnv "in the types.h, as follow: _svmt_heap localthread_heap; /* for local thread's heap */ But when we reinstall sablevm, we meet some problem at make command. ofcourse:/home/softw/sablevm-1.1.1 # make In file included from libsablevm.c:34: types.h:173: field `localthread_heap' has incomplete type make[5]: *** [libsablevm.lo] Error 1 make[5]: Leaving directory `/home/softw/sablevm-1.1.1/src/libsablevm' make[4]: *** [install-recursive] Error 1 make[4]: Leaving directory `/home/softw/sablevm-1.1.1/src/libsablevm' make[3]: *** [install] Error 2 make[3]: Leaving directory `/home/softw/sablevm-1.1.1/src/libsablevm' make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory `/home/softw/sablevm-1.1.1/src' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/softw/sablevm-1.1.1' make: *** [install] Error 2 --------------------------------- Do You Yahoo!? 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 |
|
From: Etienne G. <gag...@uq...> - 2004-04-02 09:06:44
|
Chris Pickett wrote: > If not, why do we need to keep these (apart from efficiency)? Apart from efficiency? Efficiency (and lower GC pressure) is the whole point. :-) Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
|
From: Etienne G. <gag...@uq...> - 2004-04-02 08:30:19
|
> PS: How could I ever seriously say that?! > >>On that occasion I also found out that I am unable to peacefuly work >>with Subversion. CVS is *so* much better! Heh! Some people do prefer CVS. Not me! :-) Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
|
From: Etienne G. <gag...@uq...> - 2004-04-02 08:12:21
|
Chris Pickett wrote:
> Can you please write about the types of stack frames / methods that
> might be on the stack in SableVM, and when they are pushed and popped?
> For one, I would like to know about pushing and popping native methods.
SableVM has 3 types of "method frames" on a thread stack:
- Normal Java method frame
- Native method frame
- Internal method frame
Both the normal Java method and native method frames are already
explained in stack_layout.txt.
Internal method frame
=====================
When JNI_CreateJavaVM is invoked (and for each new thread), an
initial stack is created. (a) It needs a bottom "method frame", yet,
we are not yet executing any specific Java method. So, the frame
type needs to be some non-Java frame type. We do need a frame
as JNI calls need to work, and particularly local native reference
must be allocatable. [local native references are stored on the
stack]. (b) But, we are not executing any specific "native" method,
so, the method frame cannot be of type "native method". But it should
be pretty similar, as we need native locals, etc.
So, SableVM adds a third type of frame: Internal method frame.
An internal method frame is identified by the SVM_ACC_INTERNAL
access flag. There are, in fact, 3 "subtypes" of internal method
frames:
- stack_bottom_method: The initial frame of the stack of a thread.
- vm_initiated_call_method: Used by the VM when it calls (of its
own) a Java method. (See below for motivation.)
- internal_call_method: Used by the VM when executing JNI Call*
instructions.
stack_bottom_method
-------------------
mostly self explanatory.
vm_initiated_call_method
------------------------
SableVM often calls Java methods of its
own. A typical example of such a call is the invocation of
static initializers. A static initializer is never invoked directly
from Java code, nor is it called from JNI library code.
So, what's the problem? Imagine the situation: SableVM is executing
some Java code and reaches a GETSTATIC instruction. A potential side
effect of executing such instruction is the invocation of a static
initializer ("<clinit>") *before* actually executing the real access
to the static field. Yet, the current stack looks like:
| |
current_frame - +--------------------+
method->start_offset |local 0 | *
| 1 | *
| 2 | *
| ... | *
|local n | *
env->stack. +--------------------+ *
current_frame ----> | stack_frame_struct | * current frame
| | *
| | *
+--------------------+ *
| padding to align | *
current_frame + +--------------------+ *
_svmv_stack_offset -> | expression stack | *
| | *
| | *
| | *
| | *
current_frame + +--------------------+ *
end_off ---> | |
If we simply put the static initializer frame after this frame,
and then invoke _svmf_interpreter() to start executing "<clinit>"
the RETURN instruction of the static initializer will look for
its previous frame and find the "current" frame, and discover
that it simply is a normal Java method frame, so it will continue
bytecode interpretation at current_frame->pc. In other words,
the called _svmf_interpreter() will continue executing code.
| |
+--------------------+
|local 0 | *
| 1 | *
| 2 | *
| ... | *
|local n | *
+--------------------+ *
| stack_frame_struct | * current frame
| | *
| | *
+--------------------+ *
| padding to align | *
+--------------------+ *
| expression stack | *
| | *
| | *
| | *
| | *
+--------------------+ *
|local 0 | @
| 1 | @
| 2 | @
| ... | @
|local n | @
+--------------------+ @
| stack_frame_struct | @ static initializer frame
| | @
| | @
+--------------------+ @
| padding to align | @
+--------------------+ @
| expression stack | @
| | @
| | @
| | @
| | @
+--------------------+ @
But, we DON'T want normal execution to continue! We want
_svmf_interpreter() to "return" so that we can resume the execution
of the GETSTATIC instruction. Of course, one try to make
a more complex implementation of the RETURN bytecode that would
be smarter and somehow detect that the method was the bottom
one of the "current" invocation of _svmf_interpreter(), and
that would thus simply "return".
Instead, SableVM uses a simpler strategy; it inserts a "fake"
method frame (e.g. internal method frame), which has a
frame->pc pointing to a INTERNAL_CALL_END (sablevm-specific)
bytecode instruction. e.g.
| |
+--------------------+
|local 0 | *
| 1 | *
| 2 | *
| ... | *
|local n | *
+--------------------+ *
| stack_frame_struct | * current frame
| | *
| | *
+--------------------+ *
| padding to align | *
+--------------------+ *
| expression stack | *
| | *
| | *
| | *
| | *
+--------------------+ *
| stack_frame_struct |
|(pc = INT._CALL_END)|
| |
| |
+--------------------+
|local 0 | @
| 1 | @
| 2 | @
| ... | @
|local n | @
+--------------------+ @
| stack_frame_struct | @ static initializer frame
| | @
| | @
+--------------------+ @
| padding to align | @
+--------------------+ @
| expression stack | @
| | @
| | @
| | @
| | @
+--------------------+ @
This way, when _svmf_interpreter() executes the
static initializer's RETURN bytecode, it simply continues
execution at the previous frame's frame->pc bytecode,
which happens, in this case, to be INTERNAL_CALL_END.
As you can guess, INTERNAL_CALL_END's body first removes
the "internal frame", and executes a C "return" statement
that terminates the _svmf_interpreter() function call.
internal_call_method
--------------------
It's the exact same idea as vm_initiated_call_method, but
it is used when executing a JNI Call* function. We use
a "different" internal frame to distinguish between
"application call stack" (which includes Java methods
and JNI functions), and "vm initiated" call stack. This
is necessary for all sort of things like implementing
SecurityManager.currentClassLoader() calls reliably.
>... I'll
> take whatever you write and incorporate it into David's
> "stack_layout.txt" document.
Thanks!
Etienne
--
Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/
SableVM: http://www.sablevm.org/
SableCC: http://www.sablecc.org/
|
|
From: Chris P. <chr...@ma...> - 2004-04-02 03:26:26
|
sorry for all the postings -- i promise this is the last one -- count is
declared in the function as a jint, but the method returns a size_t
(because all stats are size_t's) -- i just wanted to point out that this
doesn't affect the result.
Chris Pickett wrote:
>
> inline static size_t
> _svmf_count_java_stack_frames (_svmt_JNIEnv *env)
>
> {
[...]
> jint count = 0;
[...]
> return count;
> }
Cheers,
Chris
|
|
From: Chris P. <chr...@ma...> - 2004-04-02 03:16:50
|
Chris Pickett wrote:
> I wrote a simple function to count Java stack frames, but it gives me
> more frames than those that are pushed directly with (PREPARE_)INVOKE<X>
> (as calculated by a more indirect method). I assume it's because some
> Java frames are pushed without (PREPARE_)INVOKE<X>. I would really like
> to know if it's possible to count frames pushed only with
> (PREPARE_)INVOKE<X> by simply looking at the stack
It seems that I can do this if I don't count any frame that has a
non-"pushed by (PREPARE_)INVOKE<X>" frame below it. The code following
almost works, but appears to be off-by-one. If you can spot an obvious
error I'd be grateful, otherwise I'll just keep digging (into source and
specifications).
Cheers,
Chris
inline static size_t
_svmf_count_java_stack_frames (_svmt_JNIEnv *env)
{
_svmt_stack_frame *frame = env->stack.current_frame;
_svmt_method_info *method = frame->method;
jint count = 0;
while (method != &env->vm->stack_bottom_method)
{
jboolean found_java_frame = JNI_FALSE;
/* is the current frame internal? */
if (_svmf_is_set_flag (method->access_flags, SVM_ACC_INTERNAL)
== JNI_FALSE)
{
found_java_frame = JNI_TRUE;
}
/* pop stack frame */
frame = (_svmt_stack_frame *)
(((char *) frame) - frame->previous_offset);
method = frame->method;
/* if the previous frame was not internal and this one
is not internal, increment the count of
pushed-by-java frames
*/
if (_svmf_is_set_flag (method->access_flags, SVM_ACC_INTERNAL)
== JNI_FALSE &&
found_java_frame == JNI_TRUE)
{
count++;
}
}
return count;
}
|
|
From: Chris P. <chr...@ma...> - 2004-04-01 21:53:24
|
Hi Etienne (and possibly David or Greg, but not sure),
Can you please write about the types of stack frames / methods that
might be on the stack in SableVM, and when they are pushed and popped?
For one, I would like to know about pushing and popping native methods.
I wrote a simple function to count Java stack frames, but it gives me
more frames than those that are pushed directly with (PREPARE_)INVOKE<X>
(as calculated by a more indirect method). I assume it's because some
Java frames are pushed without (PREPARE_)INVOKE<X>. I would really like
to know if it's possible to count frames pushed only with
(PREPARE_)INVOKE<X> by simply looking at the stack, or whether I have to
go in and increment a counter on every push and keep track of pops
explicitly (which gets a little complicated because of exceptions).
I would like to do this so that I can make some basic assertions about
post-execution system properties of programs running with spmt. I'll
take whatever you write and incorporate it into David's
"stack_layout.txt" document.
Thanks very much,
Chris
========================================================================
inline static size_t
_svmf_count_java_stack_frames (_svmt_JNIEnv *env)
{
_svmt_stack_frame *frame = env->stack.current_frame;
_svmt_method_info *method = frame->method;
jint count = 0;
while (method != &env->vm->stack_bottom_method)
{
if (_svmf_is_set_flag (method->access_flags, SVM_ACC_INTERNAL)
== JNI_FALSE &&
_svmf_is_set_flag (method->access_flags, SVM_ACC_NATIVE)
== JNI_FALSE)
{
count++;
}
frame = (_svmt_stack_frame *)
(((char *) frame) - frame->previous_offset);
method = frame->method;
}
return count;
}
|
|
From: Grzegorz B. P. <ga...@de...> - 2004-04-01 20:54:17
|
On Thu, 2004-04-01 at 15:22, Chris Pickett wrote: > Grzegorz B. Prokopski wrote: > > Hi everyone, > > > > I'd better send an explanation already, I started getting emails... > > > > FOR THE RECORD: This was 1st april joke! yeah, truly. > > > > I thought it was quite a weak joke as nobody would ever treat it > > seriously, once he saw the title. Well, I was somewhat wrong and not > > sure if it's good or bad. :-/ > > > I suppose you'll never know whether those of us fools who wrote you > privately were playing along or not ... In either case, Chris, thanks a lot for your email. Seriously. Cheers, Grzegorz B. Prokopski |
|
From: Chris P. <chr...@ma...> - 2004-04-01 20:21:11
|
Grzegorz B. Prokopski wrote: > Hi everyone, > > I'd better send an explanation already, I started getting emails... > > FOR THE RECORD: This was 1st april joke! yeah, truly. > > I thought it was quite a weak joke as nobody would ever treat it > seriously, once he saw the title. Well, I was somewhat wrong and not > sure if it's good or bad. :-/ I suppose you'll never know whether those of us fools who wrote you privately were playing along or not ... |
|
From: Grzegorz B. P. <ga...@de...> - 2004-04-01 20:00:35
|
Hi everyone, I'd better send an explanation already, I started getting emails... FOR THE RECORD: This was 1st april joke! yeah, truly. I thought it was quite a weak joke as nobody would ever treat it seriously, once he saw the title. Well, I was somewhat wrong and not sure if it's good or bad. :-/ So, seriously this time: NO, I am NOT going to quit this project anytime soon. And I think you'd have hard time trying to find a single sentence in my original email that would be true. For now you'll have to bear with me ! ;-) Grzegorz B. Prokopski PS: How could I ever seriously say that?! > On that occasion I also found out that I am unable to peacefuly work > with Subversion. CVS is *so* much better! |
|
From: Mark W. <ma...@kl...> - 2004-04-01 10:50:27
|
Hi, On Thu, 2004-03-25 at 19:23, Mark Wielaard wrote: > On Wed, 2004-03-24 at 19:39, Etienne Gagnon wrote: > > > http://people.redhat.com/~graydon/free-swing-mar-23-2004.png > >=20 > > OK SableVM guys! I'd like to see this in SableVM's staging tree *now*! > [...] > > What's missing? >=20 > [...] > - Although we have a TestAWT application, we don't have a TestSwing > application. It would be nice if Graydon could post the sources of the > demos he used for the nice shots at http://people.redhat.com/~graydon/ > Hint, hint, ... ;) OK, this one is fixed now! http://people.redhat.com/~graydon/testswing.java And it actually works with GNU Classpath from CVS, hurray! Although it certainly has some drawing bugs (and you have to click slightly under the buttons to actually hit them!). I just checked in one little (compile) fix that I discussed with Graydon on irc. The rest of the free Swing fixes will come later this month when we sync again with the libgcj gui-branch. Other happy news on the GUI front is the release of Odonata 0.1 by Stephane Meslin-Weber. "Odonata is a set of 100% Java AWT peers for use with framebuffers. It is released under the GPL and the ultimate aim is to provide an alternative replacement for native bindings such as QtAWT, Gtk or MFC. Replacing AWT peers is a transparent method of extending the range of platforms and hardware that Java's AWT can be used on." See for source, screenshots, etc. http://odonata.tangency.co.uk/ Quickly tried it out with jamvm + GNU Classpath cvs and gij (CVS, not gui-branch) on the VNC backend (it actually includes and runs a VNCj server!) and there are clearly some drawing/layout problems [lots of black backgrounds] in our code, but some of the basics work. (For current GNU Classpath it seems you have to comment out the drawLogo() call in the uk.co.tangency.odonata.Toolkit constructor - although the logo shows fine under gij 3.4/CVS.) Cheers, Mark |
|
From: Grzegorz B. P. <ga...@de...> - 2004-04-01 05:39:32
|
Dear SableVM Developers, I have thought about it since some time and I think the time has come to make it public. There are a few things that I can not bear anymore. I've tried hard to make SableVM be the JVM of choice for masses, but I feel that I failed miserably. There's simply too many bugs in SableVM and too many unimplemented features... I lost any hope to ever make it anyhow usable. In addition I have these neverending disputes w/ Etienne, who does not seem to agree with pretty much any of my proposals, does not like the way I code and even if he somewhat does - he always shows me that he can do everything better. This is so depressing! Also, I feel ashamed of the things we wanted to put into GNU Classpath. Fortunatelly they haven't been accepted as they would only disrupt all this carefuly crafted code, and impose additional work on all JVMs with no benefits whatsoever. On that occasion I also found out that I am unable to peacefuly work with Subversion. CVS is *so* much better! So in the end I see no chances for this project to ever acutally "pick up" if it keeps going like that (and it doesn't seem it's going to change anytime soon). And I do not see myself working here not seeing any chance to actually achieve something meaningful. Therefore, I believe, that the only reasonable thing that I can do is simply: to quit. I hope you'll understand, Grzegorz B. Prokopski PS: To everybody reading this message: *PLEASE*, do NOT ever follow any of the links below !!! -- Grzegorz B. Prokopski <ga...@de...> Debian GNU/Linux http://www.debian.org SableVM - LGPLed JVM http://www.sablevm.org Why SableVM ?!? http://devel.sablevm.org/wiki/WhySableVM |
|
From: Chris P. <chr...@ma...> - 2004-03-31 02:09:33
|
Hi, Is it safe to write NULL to 'frame->stack_trace_element' anywhere outside of Java_java_lang_Throwable_nativeGetStackTraceList()? If not, why do we need to keep these (apart from efficiency)? If so, is it furthermore safe to write arbitrary values to 'frame->stack_trace_element' anywhere outside of [...]nativeGetStackTraceList()? Thanks, Chris P.S. It is a bit of a long story. Quickly: if a parent speculative thread throws an exception, but the exception is caught and handled by the parent without touching the frame that the child was forked in, we don't need to kill the child. However, there may be pointers to cached stackTraceElement's on the stack in the parent as a result of calling Throwable.getStackTrace(), and this invalidates the speculation that the stack after return from a method call is identical to the stack before return from a method call. |
|
From: Grzegorz B. P. <ga...@de...> - 2004-03-30 01:43:55
|
W li=B6cie z pon, 29-03-2004, godz. 05:20, Paolino paperino pisze:=20
> Sorry for this mail but in sourceforge i can't delete
> my subscrption to this mailing list. Somebody con do
> it or tell me how to do this..
> Thank's a lot
>From the header of your (or any other) message:
List-Unsubscribe:
<https://lists.sourceforge.net/lists/listinfo/sablevm-developer>,
<mailto:sab...@li...?subject=3D=
unsubscribe>
List-Id: SableVM Developer Mailing List
<sablevm-developer.lists.sourceforge.net>
List-Post: <mailto:sab...@li...>
List-Help:
<mailto:sab...@li...?subject=3D=
help>
List-Subscribe:
<https://lists.sourceforge.net/lists/listinfo/sablevm-developer>,
<mailto:sab...@li...?subject=3D=
subscribe>
List-Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=3Dsablevm-dev=
eloper>
So I guess sending mail to:
sab...@li...
with subject:
unsubscribe
should work. I guess that in the worst case you'll receive further
informations in the response from mail list server.
Please contact me off-list if you need further assistance,
Grzegorz B. Prokopski
--=20
Grzegorz B. Prokopski <ga...@de...>
Debian GNU/Linux http://www.debian.org
SableVM - LGPLed JVM http://www.sablevm.org
Why SableVM ?!? http://devel.sablevm.org/wiki/WhySableVM
|