summaryrefslogtreecommitdiff
path: root/lang/jamvm
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2008-09-07 06:41:44 +0000
committerdholland <dholland@pkgsrc.org>2008-09-07 06:41:44 +0000
commit17098f44fbdcbf17827114dd0640550aa1718b0c (patch)
tree3f7d1c179fec1c24b79677f5a1cf3c788b025022 /lang/jamvm
parentc68b03b4b70462d17312973b8dbebef94ac07f5f (diff)
downloadpkgsrc-17098f44fbdcbf17827114dd0640550aa1718b0c.tar.gz
Update to 1.5.1 and make it build on amd64. Add destdir support.
JamVM 1.5.1 released on 10th March 2008 ======================================= A summary of changes since 1.5.0: - Implemented a new internal VM symbol framework. This ensures that all class, method, field names, etc. are unique thus removing the need to use strcmp for comparison. - Implemented a new internal VM exception mechanism for frequent exceptions thrown within the VM. - Hand-coded support for AMD64 ABI. Previously AMD64 required libffi but this is not individually packaged on some Linux distributions. On a random set of signatures the hand-coded assembler is 4.6 times faster (and jBYTEmark FP Index is 30% faster). - Ported to Darwin/ARM (i.e. the iPhone). Built using unofficial toolchain and tested on jailbroken iPhone (1.1.3 firmware) - Class initialisation/first active use fixes - initialise if first active use is object allocation via reflection (newInstance) - initialise if first active use is object allocation via JNI (AllocObject/NewObject) - The wait in step 2 of the initialisation sequence must be non-interruptible (not specified in the JVM or Java spec). - If allocation of the ExceptionInInitializerError fails, OutOfMemoryError should be thrown not the original exception - Don't resolve if initialiser throws ExceptionInInitializerError (subsequent resolution will not see the class is erroneous) - JNI_OnLoad fixes - initialise JNI local refs before calling - if JNI_FindClass is called from JNI_OnLoad, ensure correct class loader context is used. - JNI_OnUnload fixes - initialise JNI local refs before calling - If a library defines JNI_OnUnload, and the class loader which loaded it is GCed JNI_OnUnload is called and the library is unloaded. Previously this was done within the GC. If OnUnload allocated objects it could corrupt the heap. Dummy unloader objects are now created, and JNI_OnUnload is called from the finalize method by the finalizer thread. - Fix variable argument passing of floats When calling Java methods from native code - Rework VM initialisation/start-up sequence - Fix for JNI_ThrowNew and exceptions loaded by non-bootstrap classloader - Fix for JNI_GetMethodID and object/class initialiser methods (do not search class hierarchy) - During resolution throw IllegalAccessError and not IllegalAccessException - handle loadClass returning null without throwing exception - Fix for running Jar files where the main class is package-protected - Interpeter inlining changes - Do not inline class initialisers (<clinit>). No performance improvement as they are only ran once. Reduces memory usage - Fix for class unloading when inlining disabled (-Xnoinlining) - Bump java.specification.version to 1.5 - Improve error messages if VM aborts during initialisation - During configure, do not disable zip/jar file support if zlib library or header can't be found (now aborts). Users never saw the warning and they ended up with a build which "didn't work". - Various compiler warnings. JamVM 1.5.0 released on 28th October 2007 ========================================= A summary of changes since 1.4.5: - Substantially modified the interpreter to implement inline-threading (also known as super-instructions or code-copying). This copies code sequences together to produce native code that executes without the normal interpreter dispatch overhead (similar to a simple JIT). - Supported on i386, AMD64, PowerPC and ARM, with or without stack- caching. It is enabled by default on i386, AMD64 and PowerPC. - Performance improvement upto 300% on Pentium 4 (NetBurst), and upto 200% on Athlon 64. Less on Core 2 Duo (upto 70% faster as it has indirect branch prediction), and PowerPC which was already very optimised (upto 30% faster). - Tested on gcc 3.4 (i386, AMD64, PowerPC), 4.0 (i386), 4.1 (i386, AMD64, PowerPC, ARM), 4.2 (i386, AMD64) - Several new command line options to control inlining: -Xreplication : determines whether duplicate code sequences are replicated or shared. Can be set to 'none' (no replication), 'always' (all sequences are copies) or a threshold value (e.g. 10, when sharing of a sequence reaches the threshold the sequence is replicated). -Xcodemem : the maximum amount of memory for super-instructions. Once the maximum is reached no new super-instructions are generated but existing super-instructions are reused (class unloading will also free unused sequences). Can be set to a value or 'unlimited'. This option can be used to limit code memory on systems with little RAM (i.e. embedded). -Xshowreloc : debugging option, which shows which opcodes were determined to be relocatable, and for opcodes which aren't why they aren't relocatable. When using stack-caching there are three versions of each opcode (for 3 stack-cache levels). -Xnoinlining : turns off inlining (equivalent to setting codemem to zero). - Opcode relocatability is determined by default at build time, but this doesn't work when cross-compiling (so inlining is disabled). Relocatability can be determined at runtime using configure option --enable-runtime-reloc-checks, but this increases executable size by approx 30%. - Command line options -version and -showversion now shows build information. This includes the execution engine (e.g. inline- threaded interpreter with stack-caching), the gcc version which was used to compile JamVM (useful for debugging) and the "built in" boot library path and classpath. - Ported to ARM systems using EABI. This is a full port, with hand- coded assembler to handle the construction of a call-frame for calling JNI native methods. - Refactored GC to remove all possible calls which may deadlock with threads suspended in "unsafe" operations. This includes use of malloc/realloc/free and pthreads operations. - In allocClass() check if gcMalloc() returns NULL (i.e. OOM). - Copy Sun's behaviour when dealing with an empty property key or no equals after key. - Add java.util.concurrent.atomic.AtomicLong.VMSupportsCS8. - In method and field access checks, put back in access check for class (removed previously because it caused regressions, since fixed in Classpath). - Enable suspend on thread creation (parent thread created thread with suspension disabled). Effects threads which immediately call a long running native method. - Fixed race condition in thread creation and compaction (start function obtains class reference when it is not suspendable, if compaction occurs, the reference may be threaded, or moved). - Fix potential deadlock in threadInterrupt under Linuxthreads. - Protect lock operation in resetPeakThreadsCount(). - In createJavaThread(), re-enable suspension if pthread_create fails. - Fix race-condition in thread deletion. - Fix bug in hash table "scavenge". This could lead to entries not being freed, and exhaustion of Monitors on embedded systems. - Removed use of malloc/free in thread dump. Removes potential deadlock with threads suspended in malloc/realloc/free. - Added symbolic link from lib/rt.jar to Classpath's glibj.zip (fixes programs such as ecj which locates rt.jar via java.home). - Bumped Java compatible version to 1.5.0 as Classpath is now the generics branch (since Classpath 0.95).
Diffstat (limited to 'lang/jamvm')
-rw-r--r--lang/jamvm/Makefile6
-rw-r--r--lang/jamvm/PLIST3
-rw-r--r--lang/jamvm/distinfo10
-rw-r--r--lang/jamvm/patches/patch-aa46
4 files changed, 31 insertions, 34 deletions
diff --git a/lang/jamvm/Makefile b/lang/jamvm/Makefile
index a81bfc50bf7..4879b57d367 100644
--- a/lang/jamvm/Makefile
+++ b/lang/jamvm/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.6 2007/06/05 14:08:43 rillig Exp $
+# $NetBSD: Makefile,v 1.7 2008/09/07 06:41:44 dholland Exp $
#
-DISTNAME= jamvm-1.4.5
+DISTNAME= jamvm-1.5.1
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=jamvm/}
@@ -9,6 +9,8 @@ MAINTAINER= pancake@phreaker.net
HOMEPAGE= http://jamvm.sourceforge.net/
COMMENT= Compact Java Virtual Machine
+PKG_DESTDIR_SUPPORT= user-destdir
+
DEPENDS+= classpath>=0.19:../../lang/classpath
GNU_CONFIGURE= yes
diff --git a/lang/jamvm/PLIST b/lang/jamvm/PLIST
index c498a2cb167..387cc60ad0e 100644
--- a/lang/jamvm/PLIST
+++ b/lang/jamvm/PLIST
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.3 2007/06/05 14:08:43 rillig Exp $
+@comment $NetBSD: PLIST,v 1.4 2008/09/07 06:41:44 dholland Exp $
bin/jamvm-java
java/jamvm/bin/jamvm
java/jamvm/include/jni.h
java/jamvm/lib/libjvm.la
+java/jamvm/lib/rt.jar
java/jamvm/share/jamvm/classes.zip
@dirrm java/jamvm/share/jamvm
@dirrm java/jamvm/share
diff --git a/lang/jamvm/distinfo b/lang/jamvm/distinfo
index 4ff8ce1462f..94b136bcaf0 100644
--- a/lang/jamvm/distinfo
+++ b/lang/jamvm/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.4 2007/06/05 14:08:43 rillig Exp $
+$NetBSD: distinfo,v 1.5 2008/09/07 06:41:44 dholland Exp $
-SHA1 (jamvm-1.4.5.tar.gz) = ad22e8eedf375230eae2917660c09c9063ffafd8
-RMD160 (jamvm-1.4.5.tar.gz) = 63221c64e285349494f9a3166dce7e2a58381a55
-Size (jamvm-1.4.5.tar.gz) = 547407 bytes
-SHA1 (patch-aa) = e6cb00c963d82dd0617fb20e1e8a35527d891dd6
+SHA1 (jamvm-1.5.1.tar.gz) = fc2707aac5977e5423fd79ee61b9fe7611e34cb7
+RMD160 (jamvm-1.5.1.tar.gz) = 78ecf51bff6e67b3e6debd8c1294432b19f4e0d1
+Size (jamvm-1.5.1.tar.gz) = 599084 bytes
+SHA1 (patch-aa) = 997b09e5a4e4bc5694b272a8d70e8f5e48ed5594
SHA1 (patch-bsdosc) = ac223f74472ec6e9ed69cef04a0d343aa942e8de
diff --git a/lang/jamvm/patches/patch-aa b/lang/jamvm/patches/patch-aa
index 730907db37f..1263e8841c9 100644
--- a/lang/jamvm/patches/patch-aa
+++ b/lang/jamvm/patches/patch-aa
@@ -1,9 +1,9 @@
-$NetBSD: patch-aa,v 1.3 2007/06/05 14:08:43 rillig Exp $
+$NetBSD: patch-aa,v 1.4 2008/09/07 06:41:44 dholland Exp $
---- configure.orig 2007-02-05 04:23:22.000000000 +0100
-+++ configure 2007-06-05 16:03:18.000000000 +0200
-@@ -2029,18 +2029,24 @@ i[3456]86-*-kfreebsd*) host_cpu=i386 hos
- i[3456]86-*-darwin*) host_cpu=i386 host_os=darwin ;;
+--- configure~ 2008-03-01 23:16:07.000000000 -0500
++++ configure 2008-09-07 02:34:29.000000000 -0400
+@@ -2549,17 +2549,25 @@ i[3456]86-*-darwin*) host_cpu=i386 host_
+ arm*-*-darwin*) host_cpu=arm host_os=darwin libdl_needed=no ;;
i386-*-openbsd*) host_os=bsd libdl_needed=no ;;
i386-*-freebsd*) host_os=bsd libdl_needed=no ;;
+i386-*-netbsd*) host_os=bsd libdl_needed=no ;;
@@ -11,39 +11,33 @@ $NetBSD: patch-aa,v 1.3 2007/06/05 14:08:43 rillig Exp $
x86_64-*-linux*) host_os=linux ;;
hppa*-*-linux*) host_cpu=parisc host_os=linux ;;
mipsel-*-linux*) host_cpu=mips host_os=linux ;;
- amd64-*-openbsd*) host_os=bsd libdl_needed=no ;;
- amd64-*-freebsd*) host_os=bsd libdl_needed=no ;;
-+amd64-*-netbsd*) host_os=bsd libdl_needed=no ;;
-+amd64-*-dragonfly*) host_os=bsd libdl_needed=no ;;
+-amd64-*-openbsd*) host_os=bsd libdl_needed=no ;;
+-amd64-*-freebsd*) host_os=bsd libdl_needed=no ;;
++x86_64-*-openbsd*) host_os=bsd libdl_needed=no ;;
++x86_64-*-freebsd*) host_os=bsd libdl_needed=no ;;
++x86_64-*-netbsd*) host_os=bsd libdl_needed=no ;;
++x86_64-*-dragonfly*) host_os=bsd libdl_needed=no ;;
arm*-*-linux*) host_cpu=arm host_os=linux ;;
arm*-*-openbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
arm*-*-freebsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
+arm*-*-netbsd*) host_cpu=arm host_os=bsd libdl_needed=no ;;
++arm*-*-dragonfly*) host_cpu=arm host_os=bsd libdl_needed=no ;;
powerpc*-*-linux*) host_cpu=powerpc host_os=linux ;;
powerpc*-*-openbsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;;
powerpc*-*-freebsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;;
- powerpc-*-darwin*) host_os=darwin ;;
+powerpc*-*-netbsd*) host_cpu=powerpc host_os=bsd libdl_needed=no ;;
++powerpc*-*-dragonfly*) host_cpu=powerpc host_os=bsd libdl_needed=no ;;
+ powerpc-*-darwin*) host_os=darwin ;;
*) { { echo "$as_me:$LINENO: error: $host not supported" >&5
echo "$as_me: error: $host not supported" >&2;}
- { (exit 1); exit 1; }; } ;;
-@@ -2177,7 +2183,7 @@ if test "${enable_int_caching+set}" = se
- enableval="$enable_int_caching"
-
- else
-- if test "$host_cpu" == i386; then
-+ if test "$host_cpu" = i386; then
- enable_int_caching=no
- fi
- fi;
-@@ -20751,13 +20757,13 @@ done
+@@ -20707,13 +20715,13 @@ done
--echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
--echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for pthread_self in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
-+echo $ECHO_N "checking for pthread_self in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6
+-{ echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
+-echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: checking for pthread_self in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5
++echo $ECHO_N "checking for pthread_self in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6; }
if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -53,7 +47,7 @@ $NetBSD: patch-aa,v 1.3 2007/06/05 14:08:43 rillig Exp $
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
-@@ -20820,7 +20826,7 @@ if test $ac_cv_lib_pthread_pthread_self
+@@ -20773,7 +20781,7 @@ if test $ac_cv_lib_pthread_pthread_self
#define HAVE_LIBPTHREAD 1
_ACEOF