diff options
author | obache <obache@pkgsrc.org> | 2014-02-08 09:41:29 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2014-02-08 09:41:29 +0000 |
commit | b0759959be1ea25f4a2c98af63b0d51e085c15bd (patch) | |
tree | d33ce85a1e5daa5f915345162644c23086c1af09 /lang/jamvm/patches | |
parent | a69f26e5d4b56ec6c730840e680079c954752199 (diff) | |
download | pkgsrc-b0759959be1ea25f4a2c98af63b0d51e085c15bd.tar.gz |
Update jamvm to 1.5.4.
Based on PR pkg/45604 by Nikolai Lifanov.
JamVM 1.5.4 released on 1st January 2010
========================================
A summary of changes since 1.5.3:
- GC changes:
- Mark phase rewritten to use an explicit fixed-size mark stack,
with a moving heap scan pointer. The previous recursive marking
could lead to stack overflow when marking complex, deeply-linked
structures. If the explicit mark stack overflows, a slower,
fallback mechanism is used of scanning the heap. The new mark
phase is upto 50% faster than the old recursive marking.
- bug fix for unallocated blocks within the heap of >= 1 GB.
- JNI changes:
- Updated to JNI version 1.6. This adds the function
GetObjectRefType().
- Fully implemented JNI weak global references (NewWeakGlobalRef
and DeleteWeakGloablRef). Note, these are different to Java
Soft/Weak/Phantom References which have been supported since
JamVM 1.4.0.
- verbose:jni now shows details of the opening of native libraries.
If a library fails to open a diagnostic message is shown (if
available). This is intended to help debug common library
problems.
- bug fix for ToReflected[Method|Field] and GetSuperClass. A
local reference must be created for the return value.
- Platform changes:
- Interpreter inlining (aka code-copying JIT) now enabled by
default on ARM systems. Testing on Cortex-A8 indicates
82% speed improvement on integer benchmarks, and 55% on
floating-point.
- If cross-compiling, and interpreter inlining is enabled, runtime
relocation checks will be enabled (relocation information is
normally generated at compile time; as this can't be done
when cross-compiling it must be done at runtime, but it
increases the size of the executable by ~30%).
- Initial port to Sparc/FreeBSD. My thanks to Per Ola Ingvarsson
for architecture dependent definitions. Interpreter inlining
(aka code-copying JIT) is currently not supported due to missing
code for flushing the instruction/data caches, and branch
generation. It also requires libffi, which is enabled by default.
- Changes to x86 and x86_64 across all platforms to zero/sign
extend return values from native methods whose size is less
than an int (i.e. boolean, byte, char and short). This is
necessary due to changes in code produced by gcc >= 4.3.
- Rare race-condition in thin-locking code on x86 and x86_64
architectures, leading to deadlock. On modern x86 CPUs, an
extra memory barrier is required. Seen intermittently while
running a thread intensive benchmark using at least 4 cores.
- Extensive changes to support 64-bit Big Endian systems. These
were previously supported, but support was completely broken
with the introduction of the new object layout in JamVM 1.5.2.
- Miscellaneous fixes:
- Interpreter inlining bug fix: reference to memory after it
had been freed
- java.lang.reflect.VMField getAnnotation() implemented. This
has been missing since the reflection rework in JamVM 1.5.2.
- ThreadMXBean: fixes for getThreadInfoForId (VMThreadMXBeanImpl).
- Did not correctly report lock or lock owner, when the thread was
blocked on an object which was thin-locked by another thread
- It was using a constructor which has since been removed
- Fixes for NULL handling in findClassFromSignature() and
utf8CharLen()
- Fixed memory leak in bytecode rewriting. Due to missing
parantheses, old bytecode stream was not being freed (for
example, this leaks 47K when running "Hello, World")
- Bug-fix for theoretical race-condition in thread deletion when
notifying joining threads after thread ID has been reused.
JamVM 1.5.3 released on 14th April 2009
=======================================
JamVM 1.5.3 is primarily a bug-fix release. It fixes issues seen
while running Eclipse 3.4.2 and JRuby 1.2.0RC2, and adds some minor
features. A summary of the changes:
- Zip/Jar support in the boot classloader has been rewritten to
no longer require the Zip/Jar files to be mmap-ed read/write.
This increases shareability between multiple VM instances, and
improves memory-usage on embedded systems.
- JNI invocation API:
- set thread-self to NULL when thread detaches (if the thread tries
to re-attach, it appears to still be attached)
- init args_count in dummy stack frame (fix problem if the thread
detaches and then re-attaches)
- Do not create a library unloader for libraries loaded by the bootstrap
loader if they have an JNI_OnUnload method (the bootstrap loader is
never unloaded, and so they will never be called). Fixes a SEGV with
JRuby.
- Fix to annotation handling. When the annotation value is an array,
the native annotation parser constructs an Object array. However,
the method return value is the specific type. This leads to an
AnnotationTypeMismatchException. The fix coerces the Object
array to the correct type.
- Simple implementation of java.lang.management.VMManagementFactory
(returns no memory pool, memory manager or GC names). Sufficient
to run JRuby.
- Implemented package support in the bootstrap class loader. Package
information is obtained from the manifest file if it exists. However,
GNU Classpath's glibj.zip's manifest has no package information.
The class library is therefore recognised by the presence of
java/lang/Object.class, and appropriate package information is
constructed.
- Fix broken implementation of VMClass.getSimpleName() (use the
implementation from gcj)
- Default Java stack size increased to 256K from 64K
- Fix to bootstrap loader getResources() when the bootclasspath
entry is relative (prepend the current working directory)
- Fix minor memory leak in bootstrap loader getResources()
- Add --enable-tls option to configure, enabling thread-local-storage
(__thread) to be disabled
JamVM 1.5.2 released on 1st February 2009
=========================================
A summary of changes since 1.5.1:
- Interpreter inlining changes
- Basic-blocks are now inlined across block boundaries removing
the need for dispatching between blocks in the case of
fall-through control flow
- Control-flow within inlined sequences now patched with real jumps,
removing the need for computed jumps
- Control flow between non-shared sequences now patched, replacing
dispatch with real jumps
- Simple basic-block profiling is now implemented. This considerably
reduces the size of the code-cache, without reducing performance
- Reworked Object layout
- Previously, on 64-bit machines the object layout was wasteful, with
padding on fields less than 64-bits (to preserve 64-bit alignment).
The new object layout on average reduces heap usage by approx
10 - 15%
- On 32-bit machines, 64-bit fields are now 64-bit aligned (without
introducing extra padding if possible)
- Various alignment fixes
- 64-bit alignment of operand stack
- 64-bit alignment of static variable data
- Reflection support
- Reworking required for new object layout
- Reworked to use VMConstructor, VMMethod, etc.
- Reworked to improve field access and method invocation performance
(this offsets the extra costs of the VM interface, and improves
performance over 1.5.1).
- Access permission checks take precedence over other errors
- Class/method signatures : do not convert slash to dots
- JNI fixes/improvements
- Class references returned by JNI now use local references
- Throw InstantiationException not InstantiationError when allocating
objects and the class is an interface or abstract
- Reworked JNI global references
- Fix memory leak when expanding list
- Improve performance (optimise case where references are
created/deleted in a stack-like manner)
- OpenSolaris/Solaris/x86 port
- GC fixes
- Fix race-condition in registering references with the GC
- Separate "Async GC" thread is now disabled by default. It didn't
improve performance, and could increase power-consumption on
embedded systems
- Exception handling
- Fix method-skipping when filling in stack trace (methods could
be incorrectly excluded from the trace when a class subclassed
Throwable)
- Uncaught exceptions in the "main" thread will now use the thread's
uncaughtExceptionHandler
- Various compatibility command line options recognised (and
ignored). These include -XX:PermSize and XX:MaxPermSize
required to build OpenJDK.
- sun.misc.Unsafe
- Object methods (compareAndSwapObject, etc.) fixed on 64-bit
machines
- Implemented support for thread park and unpark (removing previous
highly inefficient "empty" implementation)
- Use thread-local storage (__thread), if available, instead of
pthread keys
- Various minor race-conditions seen while running Dacapo benchmarks
- Strict-aliasing fixes when compiled with GCC 4.3, interpreter
stack-caching is enabled, and interpreter inlining is on
- A large amount of code-tidying throughout the VM
- Minimum heap size increased to 16MB
- Various compiler warnings.
Diffstat (limited to 'lang/jamvm/patches')
-rw-r--r-- | lang/jamvm/patches/patch-aa | 44 | ||||
-rw-r--r-- | lang/jamvm/patches/patch-bsdosc | 14 | ||||
-rw-r--r-- | lang/jamvm/patches/patch-src_interp_engine_interp.h | 23 |
3 files changed, 47 insertions, 34 deletions
diff --git a/lang/jamvm/patches/patch-aa b/lang/jamvm/patches/patch-aa index a319523139b..3ac38ef40de 100644 --- a/lang/jamvm/patches/patch-aa +++ b/lang/jamvm/patches/patch-aa @@ -1,23 +1,23 @@ -$NetBSD: patch-aa,v 1.6 2013/10/28 23:47:18 joerg Exp $ +$NetBSD: patch-aa,v 1.7 2014/02/08 09:41:29 obache Exp $ - improve recognition of various host platforms - honor PTHREAD_LDFLAGS and PTHREAD_LIBS ---- configure.orig 2008-03-02 04:16:07.000000000 +0000 +--- configure.orig 2009-12-31 18:41:44.000000000 +0000 +++ configure -@@ -2549,17 +2549,25 @@ i[3456]86-*-darwin*) host_cpu=i386 host_ +@@ -2684,20 +2684,30 @@ 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 ;; -+i[34]86-*-netbsd*) host_os=bsd libdl_needed=no ;; ++i[34]86-*-netbsd*) host_cpu=i386 host_os=bsd libdl_needed=no ;; +i386-*-dragonfly*) host_os=bsd libdl_needed=no ;; + i386-*-solaris*) host_cpu=x86 host_os=solaris ;; 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 ;; -+x86_64-*-openbsd*) host_os=bsd libdl_needed=no ;; -+x86_64-*-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 ;; ++amd64-*-freebsd*) host_os=bsd host_cpu=x86_64 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 ;; @@ -31,9 +31,13 @@ $NetBSD: patch-aa,v 1.6 2013/10/28 23:47:18 joerg Exp $ +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;} -@@ -2828,7 +2820,7 @@ cat >>confdefs.h <<\_ACEOF + sparc*-*-freebsd*) host_cpu=sparc host_os=bsd libdl_needed=no ;; ++sparc*-*-openbsd*) host_cpu=sparc host_os=bsd libdl_needed=no ;; ++sparc*-*-netbsd*) host_cpu=sparc host_os=bsd libdl_needed=no ;; + *) { { $as_echo "$as_me:$LINENO: error: $host not supported" >&5 + $as_echo "$as_me: error: $host not supported" >&2;} + { (exit 1); exit 1; }; } ;; +@@ -2957,7 +2967,7 @@ cat >>confdefs.h <<\_ACEOF #define INLINING 1 _ACEOF @@ -42,16 +46,16 @@ $NetBSD: patch-aa,v 1.6 2013/10/28 23:47:18 joerg Exp $ if test "$enable_runtime_reloc_checks" != no; then -@@ -20707,13 +20715,13 @@ done - +@@ -21329,13 +21339,13 @@ _ACEOF + else --{ 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; } +-{ $as_echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5 +-$as_echo_n "checking for pthread_self in -lpthread... " >&6; } ++{ $as_echo "$as_me:$LINENO: checking for pthread_self in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 ++$as_echo_n "checking for pthread_self in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... " >&6; } if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" @@ -59,7 +63,7 @@ $NetBSD: patch-aa,v 1.6 2013/10/28 23:47:18 joerg Exp $ cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -20773,7 +20781,7 @@ if test $ac_cv_lib_pthread_pthread_self +@@ -21399,7 +21409,7 @@ if test "x$ac_cv_lib_pthread_pthread_sel #define HAVE_LIBPTHREAD 1 _ACEOF @@ -67,4 +71,4 @@ $NetBSD: patch-aa,v 1.6 2013/10/28 23:47:18 joerg Exp $ + LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" else - { { echo "$as_me:$LINENO: error: libpthread is missing" >&5 + { { $as_echo "$as_me:$LINENO: error: libpthread is missing" >&5 diff --git a/lang/jamvm/patches/patch-bsdosc b/lang/jamvm/patches/patch-bsdosc deleted file mode 100644 index 01cc9abb96d..00000000000 --- a/lang/jamvm/patches/patch-bsdosc +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-bsdosc,v 1.1 2007/06/05 14:08:44 rillig Exp $ - -Needed for NetBSD 3.0. - ---- src/os/bsd/os.c.orig 2007-01-12 01:20:14.000000000 +0100 -+++ src/os/bsd/os.c 2007-06-05 16:01:18.000000000 +0200 -@@ -24,6 +24,7 @@ - #include <stdlib.h> - #include <dlfcn.h> - #include <sys/types.h> -+#include <sys/param.h> - #include <sys/sysctl.h> - #include <pthread.h> - diff --git a/lang/jamvm/patches/patch-src_interp_engine_interp.h b/lang/jamvm/patches/patch-src_interp_engine_interp.h new file mode 100644 index 00000000000..4c2cae77389 --- /dev/null +++ b/lang/jamvm/patches/patch-src_interp_engine_interp.h @@ -0,0 +1,23 @@ +$NetBSD: patch-src_interp_engine_interp.h,v 1.1 2014/02/08 09:41:29 obache Exp $ + +* {u,}int? is defined as __{u,}int? in NetBSD + +--- src/interp/engine/interp.h.orig 2009-12-31 18:40:46.000000000 +0000 ++++ src/interp/engine/interp.h +@@ -46,11 +46,16 @@ + + #define STACK_float(offset) *((float*)&ostack[offset] + IS_BE64) + #define STACK_uint64_t(offset) *(uint64_t*)&ostack[offset * 2] ++#define STACK___uint64_t(offset) STACK_uint64_t(offset) + #define STACK_int64_t(offset) *(int64_t*)&ostack[offset * 2] ++#define STACK___int64_t(offset) STACK_int64_t(offset) + #define STACK_double(offset) *(double*)&ostack[offset * 2] + #define STACK_uint16_t(offset) (uint16_t)ostack[offset] ++#define STACK___uint16_t(offset) STACK_uint16_t(offset) + #define STACK_int16_t(offset) (int16_t)ostack[offset] ++#define STACK___int16_t(offset) STACK_int16_t(offset) + #define STACK_int8_t(offset) (int8_t)ostack[offset] ++#define STACK___int8_t(offset) STACK_int8_t(offset) + #define STACK_int(offset) (int)ostack[offset] + + #define STACK(type, offset) STACK_##type(offset) |