cacao.git
14 years ago* src/vm/jit/codegen-common.cpp (codegen_emit): Fixed temporary registers in
Michael Starzinger [Mon, 9 Nov 2009 15:48:58 +0000 (16:48 +0100)]
* src/vm/jit/codegen-common.cpp (codegen_emit): Fixed temporary registers in
invocations for machines passing float arguments in integer registers.

14 years ago* src/vm/jit/stubs.cpp: Removed obsolete legacy C interface.
Michael Starzinger [Mon, 9 Nov 2009 09:40:25 +0000 (10:40 +0100)]
* src/vm/jit/stubs.cpp: Removed obsolete legacy C interface.
* src/vm/jit/stubs.hpp: Likewise.

14 years ago* tests/regression/base/All.java: Added test case for AbstractMethodError.
Michael Starzinger [Thu, 5 Nov 2009 15:36:15 +0000 (16:36 +0100)]
* tests/regression/base/All.java: Added test case for AbstractMethodError.
* tests/regression/base/TestAbstractMethodError.java: Likewise.

14 years ago* src/vm/jit/trap.cpp (trap_handle): Activated new stack unwinding for i386.
Michael Starzinger [Thu, 5 Nov 2009 10:36:55 +0000 (11:36 +0100)]
* src/vm/jit/trap.cpp (trap_handle): Activated new stack unwinding for i386.

14 years ago* src/vm/jit/trap.cpp (trap_handle): Activated new stack unwinding for Alpha.
Michael Starzinger [Thu, 5 Nov 2009 10:12:57 +0000 (11:12 +0100)]
* src/vm/jit/trap.cpp (trap_handle): Activated new stack unwinding for Alpha.

14 years ago* src/vm/jit/executionstate.c (executionstate_unwind_exception): Added generic
Michael Starzinger [Wed, 4 Nov 2009 17:47:29 +0000 (18:47 +0100)]
* src/vm/jit/executionstate.c (executionstate_unwind_exception): Added generic
function to perform stack unwinding on all architectures. This will become the
replacement for asm_handle_exception on all architectures soon.
* src/vm/jit/executionstate.h: Likewise.
* src/vm/jit/trap.cpp (trap_handle): Activated above function for x86_64.

14 years ago* src/vm/jit/executionstate.c (executionstate_pop_stackframe): Moved here from
Michael Starzinger [Wed, 4 Nov 2009 17:32:33 +0000 (18:32 +0100)]
* src/vm/jit/executionstate.c (executionstate_pop_stackframe): Moved here from
replacement, was previously called md_pop_stackframe. This is needed for stack
unwinding in C, so this is the right place to put it.
* src/vm/jit/executionstate.h: Added prototype for above function.
* src/vm/jit/replace.cpp: See above.

14 years ago* src/vm/jit/replace.cpp: Use architectures STACKFRAME_RA_LINKAGE_AREA define.
Michael Starzinger [Wed, 4 Nov 2009 12:29:38 +0000 (13:29 +0100)]
* src/vm/jit/replace.cpp: Use architectures STACKFRAME_RA_LINKAGE_AREA define.
* src/vm/jit/alpha/arch.h: Correctly set above define.
* src/vm/jit/arm/arch.h: Likewise.
* src/vm/jit/i386/arch.h: Likewise.
* src/vm/jit/m68k/arch.h: Likewise.
* src/vm/jit/mips/arch.h: Likewise.
* src/vm/jit/powerpc/arch.h: Likewise.
* src/vm/jit/powerpc64/arch.h: Likewise.
* src/vm/jit/replace.cpp: Likewise.
* src/vm/jit/s390/arch.h: Likewise.
* src/vm/jit/sparc64/arch.h: Likewise.
* src/vm/jit/x86_64/arch.h: Likewise.

14 years ago* src/native/vm/nativevm.cpp (nativevm_preinit): Sanity check current time.
Michael Starzinger [Wed, 4 Nov 2009 10:52:06 +0000 (11:52 +0100)]
* src/native/vm/nativevm.cpp (nativevm_preinit): Sanity check current time.

14 years ago* configure.ac: Added check for mach/mach.h header.
Michael Starzinger [Tue, 3 Nov 2009 18:31:56 +0000 (19:31 +0100)]
* configure.ac: Added check for mach/mach.h header.
* src/vm/os.hpp: Includes above header with proper checking.
* src/threads/posix/thread-posix.cpp: Don't include above header directly.
* src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp: Likewise.

14 years ago* src/vm/jit/powerpc/arch.h: We have leaf-method optimization in place.
Michael Starzinger [Tue, 3 Nov 2009 18:15:49 +0000 (19:15 +0100)]
* src/vm/jit/powerpc/arch.h: We have leaf-method optimization in place.
* src/vm/jit/powerpc/md.c (md_patch_replacement_point): Fixed.
* src/vm/jit/replace.cpp: Fixed replacement for big-endian 32-bit machines.

14 years ago* configure.ac: Added check for sys/utsname.h header.
Michael Starzinger [Tue, 3 Nov 2009 15:15:59 +0000 (16:15 +0100)]
* configure.ac: Added check for sys/utsname.h header.
* src/vm/os.hpp: Properly includes above header.

* src/mm/codememory.c: Removed includes of "uncommon" headers.
* src/mm/gc-none.cpp: Likewise.
* src/mm/tlh.c: Likewise.
* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.cpp: Likewise.
* src/native/vm/cldc1.1/com_sun_cldc_io_j2me_socket_Protocol.cpp: Likewise.
* src/native/vm/gnuclasspath/java_lang_VMClassLoader.cpp: Likewise.
* src/native/vm/gnuclasspath/java_lang_VMRuntime.cpp: Likewise.
* src/native/vm/openjdk/jvm.cpp: Likewise.
* src/vm/exceptions.cpp: Likewise.
* src/vm/properties.cpp: Likewise.
* src/vm/signal.cpp: Likewise.
* src/vm/zip.cpp: Likewise.

14 years ago* src/vm/os.cpp: System header checks are done in os.hpp, so no need to do
Michael Starzinger [Tue, 3 Nov 2009 15:05:18 +0000 (16:05 +0100)]
* src/vm/os.cpp: System header checks are done in os.hpp, so no need to do
them here again.

14 years ago* configure.ac: Check for jvmti.h header if JVMTI is enabled.
Michael Starzinger [Tue, 3 Nov 2009 14:19:34 +0000 (15:19 +0100)]
* configure.ac: Check for jvmti.h header if JVMTI is enabled.
* m4/jvmti.m4 (AC_CHECK_WITH_JVMTI_H): Added function for above task.

14 years ago* src/vm/primitive.cpp (Primitive::get_type_by_primitiveclass): Implemented.
Michael Starzinger [Mon, 2 Nov 2009 16:39:36 +0000 (17:39 +0100)]
* src/vm/primitive.cpp (Primitive::get_type_by_primitiveclass): Implemented.
* src/vm/primitive.hpp (Primitive): Added get_type_by_primitiveclass function.

14 years ago* src/vm/options.c (opt_TraceJVMTICalls): Added new -XX option.
Michael Starzinger [Mon, 2 Nov 2009 16:05:14 +0000 (17:05 +0100)]
* src/vm/options.c (opt_TraceJVMTICalls): Added new -XX option.
* src/vm/options.h: Likewise.

14 years ago* src/vm/method.cpp (method_load): Loads LocalVariableTable attribute.
Michael Starzinger [Mon, 2 Nov 2009 16:00:57 +0000 (17:00 +0100)]
* src/vm/method.cpp (method_load): Loads LocalVariableTable attribute.
* src/vm/method.hpp (methodinfo): Added localvarcount and localvars field.
* src/vm/utf8.c (utf_LocalVariableTable): Added global variable
* src/vm/utf8.h: Likewise.

14 years ago* src/threads/posix/thread-posix.hpp: Removed public semaphore interface.
Michael Starzinger [Mon, 2 Nov 2009 12:23:42 +0000 (13:23 +0100)]
* src/threads/posix/thread-posix.hpp: Removed public semaphore interface.
* src/threads/posix/thread-posix.cpp: Moved includes here from header.

14 years ago* src/vm/hook.hpp: Use hook points for OProfile agent.
Michael Starzinger [Mon, 2 Nov 2009 12:19:05 +0000 (13:19 +0100)]
* src/vm/hook.hpp: Use hook points for OProfile agent.
* src/vm/jit/jit.cpp: Likewise and also fire jit_generated hook.
* src/vm/jit/oprofile-agent.cpp (OprofileAgent::initialize): Fixed minor typo.
* src/vm/vm.cpp: Fire vm_preinit and vm_shutdown hooks.

14 years ago* src/native/vm/openjdk/jvm.cpp (JVM_GetVersionInfo): Fixing printf
Stefan Ring [Thu, 29 Oct 2009 17:43:54 +0000 (18:43 +0100)]
* src/native/vm/openjdk/jvm.cpp (JVM_GetVersionInfo): Fixing printf
argument (again).

14 years ago* src/threads/posix/thread-posix.cpp: Implemented thread suspension mechanism.
Michael Starzinger [Thu, 29 Oct 2009 14:00:36 +0000 (15:00 +0100)]
* src/threads/posix/thread-posix.cpp: Implemented thread suspension mechanism.
* src/threads/posix/thread-posix.hpp: Likewise.
* src/threads/threadlist.cpp (ThreadList::dump_threads): Use above mechanism.
* src/native/vm/openjdk/jvm.cpp (JVM_SuspendThread, JVM_ResumeThread): Likewise.

* src/vm/signal.cpp (signal_handler_sigusr1): Added generic suspension handler.
* src/vm/signallocal.hpp (md_signal_handler_sigusr1): Removed prototype.
* src/vm/jit/alpha/linux/md-os.c: Removed implementation of above function.
* src/vm/jit/arm/linux/md-os.c: Likewise.
* src/vm/jit/i386/freebsd/md-os.c: Likewise.
* src/vm/jit/i386/linux/md-os.c: Likewise.
* src/vm/jit/i386/solaris/md-os.c: Likewise.
* src/vm/jit/m68k/linux/md-os.c: Likewise.
* src/vm/jit/powerpc/linux/md-os.c: Likewise.
* src/vm/jit/x86_64/linux/md-os.c: Likewise.
* src/vm/jit/x86_64/solaris/md-os.c: Likewise.

14 years ago* src/vm/jit/x86_64/codegen.h: Generate mfence instruction.
Stefan Ring [Tue, 22 Sep 2009 15:42:08 +0000 (17:42 +0200)]
* src/vm/jit/x86_64/codegen.h: Generate mfence instruction.
* src/vm/jit/x86_64/emit.c, src/vm/jit/x86_64/emit.h: Likewise.
(transplanted from 864ea9d2c217)

14 years ago* src/native/jni.cpp: Issue a memory barriers after each volatile store.
Stefan Ring [Mon, 21 Sep 2009 20:55:03 +0000 (22:55 +0200)]
* src/native/jni.cpp: Issue a memory barriers after each volatile store.
(based on d53d813a5b09 from stefan-jmm branch)

14 years ago* src/native/jni.cpp: Fixed a typo.
Stefan Ring [Mon, 21 Sep 2009 20:44:10 +0000 (22:44 +0200)]
* src/native/jni.cpp: Fixed a typo.
This is already obsolete; however, I don't like making changes on top of
obviously incorrect code.

14 years ago* src/threads/lock.cpp: Slight memory barrier clarification.
Stefan Ring [Mon, 21 Sep 2009 18:39:19 +0000 (20:39 +0200)]
* src/threads/lock.cpp: Slight memory barrier clarification.
* src/vm/jit/i386/arch.h: Define CAS_PROVIDES_FULL_BARRIER.
* src/vm/jit/x86_64/arch.h: Likewise.

14 years ago* src/vm/jit/trap.cpp (trap_init): Disabled mmapping of first page by default.
Michael Starzinger [Sat, 19 Sep 2009 21:59:03 +0000 (23:59 +0200)]
* src/vm/jit/trap.cpp (trap_init): Disabled mmapping of first page by default.
* src/vm/options.c: Added -XX:+AlwaysMmapFirstPage to enable it again.
* src/vm/options.h: Likewise.

14 years ago* src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
Michael Starzinger [Sat, 19 Sep 2009 21:26:25 +0000 (23:26 +0200)]
* src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
* src/vm/jit/verify/typecheck-typeinferer-gen.inc: Likewise.
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.

14 years ago* src/vm/jit/verify/generate.pl: Adapted to renamed source file.
Michael Starzinger [Sat, 19 Sep 2009 21:24:25 +0000 (23:24 +0200)]
* src/vm/jit/verify/generate.pl: Adapted to renamed source file.

14 years ago* src/vm/breakpoint.hpp: Added header file for breakpoint handling.
Michael Starzinger [Sat, 19 Sep 2009 21:18:25 +0000 (23:18 +0200)]
* src/vm/breakpoint.hpp: Added header file for breakpoint handling.
* src/vm/Makefile.am (libvm_la_SOURCES): Added above file.
* src/vm/method.hpp (methodinfo): Added pointer to breakpoint table.
* src/vm/method.cpp (method_free): Frees breakpoint table if present.

* src/vm/jit/patcher-common.cpp (patcher_breakpoint): Added patcher method.
* src/vm/jit/patcher-common.hpp: Likewise.

* src/vm/jit/ir/icmd.hpp (ICMD_BREAKPOINT): Added.
* src/vm/jit/ir/icmdtable.inc: Adapted entry for above ICMD.
* src/vm/jit/parse.cpp (parse): Generate breakpoints if requested.
* src/vm/jit/stack.c: Correctly handles ICMD_BREAKPOINT.
* src/vm/jit/allocator/simplereg.c: Likewise.
* src/vm/jit/codegen-common.cpp (codegen_emit): Generate ICMD_BREAKPOINT code.

14 years ago* src/vm/initialize.cpp: Added a required memory barrier.
Stefan Ring [Sat, 19 Sep 2009 19:08:27 +0000 (21:08 +0200)]
* src/vm/initialize.cpp: Added a required memory barrier.
* src/vm/linker.cpp: Cosmetics.

14 years agoMerged MIPS stuff.
Stefan Ring [Thu, 17 Sep 2009 13:49:54 +0000 (15:49 +0200)]
Merged MIPS stuff.

14 years agoMIPS repair work
Stefan Ring [Thu, 17 Sep 2009 13:36:04 +0000 (15:36 +0200)]
MIPS repair work

* src/vm/jit/mips/codegen.c: Make it compile.
* src/vm/jit/mips/codegen.h: Added M_ALD_DSEG.
* src/vm/jit/mips/linux/md-os.c: Fixes.
* src/vm/jit/mips/md.c: Fixed includes.
* src/vm/jit/mips/md.h: Likewise.

14 years ago* src/vm/jit/builtin.hpp (builtintable_entry): Added function pointer to
Michael Starzinger [Wed, 16 Sep 2009 07:48:44 +0000 (09:48 +0200)]
* src/vm/jit/builtin.hpp (builtintable_entry): Added function pointer to
fast-path emitter. At the moment we have lock fast-path on x86_64.
* src/vm/jit/builtin.cpp: Builtin table now needs emit-common.hpp included.
* src/vm/jit/builtintable.inc: Adapted to above change.
* src/threads/lock.hpp: Moved builtin function defines to where they belong.
* src/vm/jit/codegen-common.cpp (codegen_emit): Added preliminary fast-path
generation implementation. Yet to be fully optimized.
* src/vm/jit/emit-common.hpp: Added prototypes for lock fast-path emitters.
* src/vm/jit/x86_64/emit.c: Added stubs for lock fast-path emitters.

14 years ago* src/vm/jit/mips/linux/md-os.c: Simplified signal handlers.
Stefan Ring [Sun, 13 Sep 2009 12:23:10 +0000 (14:23 +0200)]
* src/vm/jit/mips/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/mips/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/mips/md.c (md_trap_decode): Implemented.

(like 96f53095598b)

14 years ago* src/vm/jit/mips/linux/md-os.c: Further simplified signal handler.
Stefan Ring [Sun, 13 Sep 2009 12:02:02 +0000 (14:02 +0200)]
* src/vm/jit/mips/linux/md-os.c: Further simplified signal handler.

(like e4ed4d38a2de)

14 years ago* src/vm/jit/trap.cpp (trap_handle) [__MIPS__]: Use executionstate for trap
Stefan Ring [Sun, 13 Sep 2009 12:00:29 +0000 (14:00 +0200)]
* src/vm/jit/trap.cpp (trap_handle) [__MIPS__]: Use executionstate for trap
handling.
* src/vm/jit/mips/linux/md-os.c: Simplified signal handlers.

(like 1d0460714bf6)

14 years ago* src/toolbox/sequence.hpp: Added new file to hold sequence builder class.
Michael Starzinger [Mon, 7 Sep 2009 22:23:11 +0000 (00:23 +0200)]
* src/toolbox/sequence.hpp: Added new file to hold sequence builder class.
* src/toolbox/Makefile.am (libtoolbox_la_SOURCES): Added above file.
* src/native/vm/nativevm.cpp: Use new sequence builder class.
* src/native/vm/openjdk/hpi.cpp: Likewise.
* src/native/vm/gnuclasspath/gnu_classpath_VMSystemProperties.cpp: Likewise.

14 years ago* src/native/native.hpp (NativeAgent, NativeAgents): Added new classes for
Michael Starzinger [Sun, 6 Sep 2009 21:58:54 +0000 (23:58 +0200)]
* src/native/native.hpp (NativeAgent, NativeAgents): Added new classes for
handling JVMTI agent loading.
* src/native/native.cpp: Implemented methods for above classes.
* src/vm/vm.hpp (VM): Added table to hold all registered agents.
* src/vm/vm.cpp (VM::VM): Agents are now correctly registered and loaded
during VM startup.

14 years ago* src/toolbox/list.hpp (DumpList): Made sort function accessible.
Michael Starzinger [Tue, 1 Sep 2009 00:59:25 +0000 (02:59 +0200)]
* src/toolbox/list.hpp (DumpList): Made sort function accessible.
* src/vm/jit/code.cpp (code_codeinfo_free): Release memory for profiling.
* src/vm/jit/code.hpp (codeinfo): Basicblockcount only needed for profiling.
* src/vm/jit/codegen-common.cpp (codegen_emit): Adapted CPU cycle counting.
* src/vm/jit/emit-common.hpp: Likewise.
* src/vm/jit/jit.cpp (jit_compile): This is not the place to free resources.
* src/vm/jit/optimizing/Makefile.am (PROFILE_SOURCES): Moved to C++.
* src/vm/jit/optimizing/profile.cpp: Fixed and moved to C++.
* src/vm/jit/optimizing/profile.hpp: Likewise.
* src/vm/vm.cpp: Fixed includes.

* src/vm/jit/i386/emit.c: Added dummies for CPU cycle counting.
* src/vm/jit/powerpc/emit.c: Likewise.
* src/vm/jit/s390/emit.c: Likewise.
* src/vm/jit/x86_64/emit.c: Moved CPU cycle counting here.

14 years ago* src/vm/jit/codegen-common.cpp (codegen_emit): New generic version of the
Michael Starzinger [Mon, 31 Aug 2009 22:59:30 +0000 (00:59 +0200)]
* src/vm/jit/codegen-common.cpp (codegen_emit): New generic version of the
code generating loop. This is the main point of this huge commit.

There are some other changes which might be interesting about this commit,
which are described in detail:
* src/vm/jit/code.hpp (codeinfo): Added runtime information to replace most
parts of the method header.
* src/vm/jit/codegen-common.cpp (codegen_finish): Sets runtime information.
(codegen_start_native_call): Use MD function to determine size of stackframe.
(codegen_finish_native_call): Likewise.
* src/vm/jit/codegen-common.hpp: Added prototypes of new MD functions.
* src/vm/jit/emit-common.hpp: Added prototypes of new MD functions.
(emit_xmove): Added generic inline functions for register moves.
* src/vm/jit/optimizing/profile.c: Disabled some broken profiling code.
* src/vm/jit/optimizing/profile.h: Moved definitions CPU cycle counting
macros to where they belong.
* src/vm/jit/replace.cpp: Uses new architecture description macros.
* src/vm/jit/stacktrace.cpp: Use MD function to determine size of stackframe.

The rest of the files were machine dependent adaptions of the different ports
with too many changes to describe here, so I just list the files:
* src/vm/jit/alpha/arch.h
* src/vm/jit/alpha/codegen.c
* src/vm/jit/alpha/codegen.h
* src/vm/jit/alpha/emit.c
* src/vm/jit/alpha/md.h
* src/vm/jit/arm/arch.h
* src/vm/jit/arm/codegen.c
* src/vm/jit/arm/codegen.h
* src/vm/jit/arm/emit.c
* src/vm/jit/arm/md.h
* src/vm/jit/i386/arch.h
* src/vm/jit/i386/codegen.c
* src/vm/jit/i386/codegen.h
* src/vm/jit/i386/emit.c
* src/vm/jit/i386/emit.h
* src/vm/jit/i386/md.h
* src/vm/jit/m68k/arch.h
* src/vm/jit/m68k/codegen.c
* src/vm/jit/m68k/codegen.h
* src/vm/jit/m68k/emit.c
* src/vm/jit/m68k/md.h
* src/vm/jit/mips/arch.h
* src/vm/jit/mips/codegen.c
* src/vm/jit/mips/codegen.h
* src/vm/jit/mips/emit.c
* src/vm/jit/mips/md.h
* src/vm/jit/powerpc/arch.h
* src/vm/jit/powerpc/codegen.c
* src/vm/jit/powerpc/codegen.h
* src/vm/jit/powerpc/emit.c
* src/vm/jit/powerpc/md.h
* src/vm/jit/powerpc64/arch.h
* src/vm/jit/powerpc64/codegen.c
* src/vm/jit/powerpc64/codegen.h
* src/vm/jit/powerpc64/emit.c
* src/vm/jit/powerpc64/md.h
* src/vm/jit/s390/arch.h
* src/vm/jit/s390/codegen.c
* src/vm/jit/s390/codegen.h
* src/vm/jit/s390/emit.c
* src/vm/jit/s390/md.h
* src/vm/jit/sparc64/arch.h
* src/vm/jit/sparc64/codegen.c
* src/vm/jit/sparc64/codegen.h
* src/vm/jit/sparc64/emit.c
* src/vm/jit/sparc64/md.h
* src/vm/jit/x86_64/arch.h
* src/vm/jit/x86_64/codegen.c
* src/vm/jit/x86_64/codegen.h
* src/vm/jit/x86_64/emit.c
* src/vm/jit/x86_64/emit.h
* src/vm/jit/x86_64/md.h

14 years ago* src/vm/jit/show.cpp (show_method): Now shows patcher references as well.
Michael Starzinger [Mon, 31 Aug 2009 14:51:17 +0000 (16:51 +0200)]
* src/vm/jit/show.cpp (show_method): Now shows patcher references as well.
* src/vm/jit/patcher-common.cpp (patcher_list_show): Supports above task.
* src/vm/jit/patcher-common.hpp: Likewise.
* src/vm/global.h (PRINTF_FORMAT_INTPTR_T): Added very useful define.

14 years ago* src/vm/jit/methodtree.c (methodtree_find): Detect and avoid endless loop when
Michael Starzinger [Mon, 31 Aug 2009 14:51:16 +0000 (16:51 +0200)]
* src/vm/jit/methodtree.c (methodtree_find): Detect and avoid endless loop when
methodtree lookup fails during stacktrace creation.

14 years ago* src/vm/loader.cpp (load_constantpool): Uses DumpList instead of reinvented
Michael Starzinger [Mon, 31 Aug 2009 13:25:49 +0000 (15:25 +0200)]
* src/vm/loader.cpp (load_constantpool): Uses DumpList instead of reinvented
wheel to resolve forward references.

14 years ago* src/mm/dumpmemory.hpp (DumpClass): Added new base class for dump memory.
Michael Starzinger [Mon, 31 Aug 2009 13:22:31 +0000 (15:22 +0200)]
* src/mm/dumpmemory.hpp (DumpClass): Added new base class for dump memory.
* src/toolbox/list.hpp (DumpList): Uses above class to be allocated on dump
memory.

14 years ago* src/vm/primitive.cpp: Removed obsolete legacy C interface.
Michael Starzinger [Mon, 24 Aug 2009 10:02:42 +0000 (12:02 +0200)]
* src/vm/primitive.cpp: Removed obsolete legacy C interface.
* src/vm/primitive.hpp: Likewise.

14 years ago* src/toolbox/hashtable.hpp: Added preliminary C++ hashtable class.
Michael Starzinger [Tue, 11 Aug 2009 09:03:18 +0000 (11:03 +0200)]
* src/toolbox/hashtable.hpp: Added preliminary C++ hashtable class.
* src/threads/mutex.hpp (MutexLocker): Helper which might come in handy.
(transplanted from aefdd2b45fcf0086266e43032ce0bda0a9f8a0f9)

--HG--
extra : transplant_source : %AE%FD%D2%B4_%CF%00%86%26nC%03%2C%E0%BD%A0%A9%F8%A0%F9

14 years ago* src/native/native.cpp: Fixed bogus log_print calls. Please don't use strings
Michael Starzinger [Wed, 28 Oct 2009 11:00:41 +0000 (12:00 +0100)]
* src/native/native.cpp: Fixed bogus log_print calls. Please don't use strings
that are dynamically generated as format strings, this is dangerous.

14 years ago* src/vm/vm.cpp (usage): Made function static. Also removed legacy C functions.
Michael Starzinger [Wed, 28 Oct 2009 09:31:58 +0000 (10:31 +0100)]
* src/vm/vm.cpp (usage): Made function static. Also removed legacy C functions.
* src/vm/vm.hpp: Removed obsolete prototypes.

14 years ago* src/native/vm/openjdk/jvm.cpp (JVM_GetVersionInfo): Fixed typo and bogus size.
Michael Starzinger [Tue, 27 Oct 2009 00:21:42 +0000 (01:21 +0100)]
* src/native/vm/openjdk/jvm.cpp (JVM_GetVersionInfo): Fixed typo and bogus size.

14 years ago* src/native/vm/openjdk/jvm.cpp (JVM_GetVersionInfo): Implemented.
Stefan Ring [Sun, 25 Oct 2009 12:29:38 +0000 (13:29 +0100)]
* src/native/vm/openjdk/jvm.cpp (JVM_GetVersionInfo): Implemented.
Parts taken from icedtea patch by Andrew John Hughes <ahughes@redhat.com>.
(transplanted from 5f6614d3497636a298267d9036fe3e13f0b637c3)

14 years ago* src/vm/jit/replace.cpp (replace_handler): Adapted replacement handler to take
Michael Starzinger [Thu, 22 Oct 2009 11:31:05 +0000 (13:31 +0200)]
* src/vm/jit/replace.cpp (replace_handler): Adapted replacement handler to take
an executionstate from the trap handler. Fixes -XX:+TestReplacement again.
* src/vm/jit/replace.hpp: Likewise.
* src/vm/jit/trap.cpp (trap_handle): Adapted to above change.

14 years ago* src/vm/jit/trap.cpp (trap_handle): Adapted to support "reusable trap points".
Michael Starzinger [Thu, 22 Oct 2009 11:30:44 +0000 (13:30 +0200)]
* src/vm/jit/trap.cpp (trap_handle): Adapted to support "reusable trap points".
* src/vm/jit/patcher-common.cpp (patcher_handler): Changed to return status
instead of the causing exception object itself.
* src/vm/jit/patcher-common.hpp: Likewise.

14 years ago* src/vm/os.cpp: Removed obsolete legacy C functions.
Michael Starzinger [Wed, 21 Oct 2009 13:41:01 +0000 (15:41 +0200)]
* src/vm/os.cpp: Removed obsolete legacy C functions.
* src/vm/os.hpp: Likewise.

14 years ago* configure.ac: Define detailed version numbers.
Michael Starzinger [Wed, 21 Oct 2009 12:06:31 +0000 (14:06 +0200)]
* configure.ac: Define detailed version numbers.
* m4/version.m4: New file to define all kinds of version macros.

14 years ago* src/toolbox/util.c (_Jv_getcwd): Moved convenience function to os wrapper.
Michael Starzinger [Thu, 15 Oct 2009 16:33:49 +0000 (18:33 +0200)]
* src/toolbox/util.c (_Jv_getcwd): Moved convenience function to os wrapper.
* src/toolbox/util.h: Likewise.
* src/vm/os.cpp: Likewise.
* src/vm/os.hpp (os::getcwd): Added system function wrapper.
* src/vm/properties.cpp (Properties::Properties): Adapted to above change.
* src/vm/suck.cpp (SuckClasspath::add): Likewise.

14 years ago* src/vm/hook.hpp: Added new file for hook points.
Michael Starzinger [Thu, 15 Oct 2009 13:05:05 +0000 (15:05 +0200)]
* src/vm/hook.hpp: Added new file for hook points.
* src/vm/Makefile.am (libvm_la_SOURCES): Added above file.

* src/native/native.cpp (resolve_method): Added native_resolved hook.
* src/threads/posix/thread-posix.cpp (threads_startup_thread): Added hooks.
* src/vm/linker.cpp (link_class): Added class_linked hook.
* src/vm/loader.cpp (load_class_from_classbuffer): Added class_loaded hook.
* src/vm/vm.cpp (VM::VM): Added vm_init hook.
* src/vm/jit/patcher-common.cpp (patcher_breakpoint): Added breakpoint hook.
* src/vm/jit/trace.cpp: Added hooks.

* src/cacao/cacao.cpp: Launcher is not allowed to interact with JVMTI.
* src/native/jni.cpp (jni_RegisterNatives): Removed bogus JVMTI events.
* src/native/vm/cldc1.1/java_lang_Object.cpp: Likewise.
* src/native/vm/gnuclasspath/java_lang_VMObject.cpp: Likewise.

14 years ago* src/native/vm/openjdk/management.cpp: Added support for verbose attributes.
Michael Starzinger [Thu, 15 Oct 2009 08:58:01 +0000 (10:58 +0200)]
* src/native/vm/openjdk/management.cpp: Added support for verbose attributes.
* src/vm/os.hpp (os::getpid): Added system function wrapper.
* configure.ac: Added check for getpid function.

14 years ago* configure.ac: Added check for sys/loadavg.h (for OpenSolaris).
Stefan Ring [Thu, 15 Oct 2009 06:26:19 +0000 (08:26 +0200)]
* configure.ac: Added check for sys/loadavg.h (for OpenSolaris).
* src/vm/os.hpp: Using sys/loadavg.h.

14 years ago* src/vm/jit/codegen-common.cpp (codegen_emit): Fixed support to pass float
Michael Starzinger [Wed, 14 Oct 2009 14:37:23 +0000 (16:37 +0200)]
* src/vm/jit/codegen-common.cpp (codegen_emit): Fixed support to pass float
arguments via integer registers (i.e. ARM) in generic codegen loop.
* src/vm/jit/arm/codegen.h: Relaxed assertions in M_LDR.
* src/vm/jit/arm/codegen.c (codegen_emit_stub_native): Stackframe size for
native stubs is stored as number of stackslots.

14 years ago* src/vm/jit/arm/codegen.c (codegen_emit_stub_native): Removed obsolete calls
Michael Starzinger [Wed, 14 Oct 2009 11:57:25 +0000 (13:57 +0200)]
* src/vm/jit/arm/codegen.c (codegen_emit_stub_native): Removed obsolete calls
to Java call tracer as this should be done by codegen intrisics.

14 years ago* src/native/vm/openjdk/sun_misc_Perf.cpp: Added new file.
Michael Starzinger [Wed, 14 Oct 2009 08:56:49 +0000 (10:56 +0200)]
* src/native/vm/openjdk/sun_misc_Perf.cpp: Added new file.
* src/native/vm/openjdk/Makefile.am (libnativevmcore_la_SOURCES): Added file.
* src/native/vm/nativevm.cpp (nativevm_preinit): Register sun.misc.Perf methods.
* src/native/vm/nativevm.hpp (_Jv_sun_misc_Perf_init): Added.

14 years ago* src/vm/types.h: Saner defines for internal types (s1, u1, s4, u4, s8, ...)
Stefan Ring [Tue, 13 Oct 2009 17:28:02 +0000 (19:28 +0200)]
* src/vm/types.h: Saner defines for internal types (s1, u1, s4, u4, s8, ...)

14 years ago* src/native/jni.cpp: Partial backout of 54ab738ea6b2 (OpenSolaris i386).
Stefan Ring [Tue, 13 Oct 2009 17:26:27 +0000 (19:26 +0200)]
* src/native/jni.cpp: Partial backout of 54ab738ea6b2 (OpenSolaris i386).
Let's keep everything consistent.

14 years ago* src/vm/jit/mips/codegen.c: LADDCONST/LSUBCONST/IREMPOW2 fixes.
Stefan Ring [Wed, 7 Oct 2009 11:57:41 +0000 (13:57 +0200)]
* src/vm/jit/mips/codegen.c: LADDCONST/LSUBCONST/IREMPOW2 fixes.
Thanks to Joe Buehler for reporting the LADDCONST/LSUBCONST bug.

14 years ago* src/vm/jit/mips/codegen.c: LAND/LOR/LXOR fixes.
Stefan Ring [Wed, 7 Oct 2009 11:54:48 +0000 (13:54 +0200)]
* src/vm/jit/mips/codegen.c: LAND/LOR/LXOR fixes.
Patch by Joe Buehler <aspam@cox.net>
http://c1.complang.tuwien.ac.at/pipermail/cacao/2009-September/001146.html

14 years ago* src/vm/jit/mips/linux/md-os.c (md_signal_handler_sigsegv): Restored an
Stefan Ring [Mon, 5 Oct 2009 22:32:10 +0000 (00:32 +0200)]
* src/vm/jit/mips/linux/md-os.c (md_signal_handler_sigsegv): Restored an
ugly hack for finding the instruction pointer.
(md_signal_handler_sigill): Fixed, for the previous version was based on QEMU's
behavior which does not appear to be correct.

14 years ago*src/vm/vm.cpp (version): Adjusted date in copyright statement.
Stefan Ring [Tue, 6 Oct 2009 08:39:39 +0000 (10:39 +0200)]
*src/vm/vm.cpp (version): Adjusted date in copyright statement.

14 years ago* src/vm/javaobjects.cpp (java_lang_management_MemoryUsage): Added new
Michael Starzinger [Thu, 24 Sep 2009 14:56:02 +0000 (16:56 +0200)]
* src/vm/javaobjects.cpp (java_lang_management_MemoryUsage): Added new
constructor for MemoryUsage objects.
* src/vm/javaobjects.hpp (java_lang_management_MemoryUsage): Added accessor.
* src/native/vm/gnuclasspath/gnu_java_lang_management_VMClassLoadingMXBeanImpl.cpp,
* src/native/vm/gnuclasspath/gnu_java_lang_management_VMMemoryMXBeanImpl.cpp:
Fixed broken methods and use above invocation wrapper now.

14 years ago* src/native/vm/openjdk/management.cpp (jmm_GetBoolAttribute): Stub implemented.
Michael Starzinger [Thu, 24 Sep 2009 09:40:51 +0000 (11:40 +0200)]
* src/native/vm/openjdk/management.cpp (jmm_GetBoolAttribute): Stub implemented.
(jmm_SetBoolAttribute, jmm_GetLongAttribute, jmm_ResetStatistic): Likewise.
* src/vm/options.c (opt_TraceJMMCalls): Added new -XX option to trace JMM calls.
* src/vm/options.h: Likewise.

14 years ago* src/threads/threadlist.hpp (ThreadList): Adapted thread counting methods to
Michael Starzinger [Thu, 24 Sep 2009 09:06:20 +0000 (11:06 +0200)]
* src/threads/threadlist.hpp (ThreadList): Adapted thread counting methods to
hide internal threads from Java. Also added some comments.
* src/threads/threadlist.cpp (ThreadList::get_active_java_threads): Implemented.
(ThreadList::get_number_of_daemon_java_threads): Likewise.

* src/native/vm/gnuclasspath/gnu_java_lang_management_VMThreadMXBeanImpl.cpp:
Adapted to above changes.
* src/native/vm/openjdk/jvm.cpp (JVM_GetAllThreads): Likewise.
* src/threads/posix/thread-posix.cpp: Removed obsolete counting code.
* src/threads/thread.cpp (thread_new): Counting via threadlist requires that
flags are set during threadobject creation.
* src/vm/global.h (MAX): Defined as macro.
* src/vm/vm.cpp (VM::VM): Remember VM initialization time.
* src/vm/vm.hpp (VM::get_inittime): Returns above time.

14 years ago* src/vm/classcache.cpp (classcache_get_loaded_classes): Removed obsolete method.
Michael Starzinger [Thu, 24 Sep 2009 07:53:50 +0000 (09:53 +0200)]
* src/vm/classcache.cpp (classcache_get_loaded_classes): Removed obsolete method.
The logic of this method is already present in classcache_foreach_loaded_class.
* src/vm/classcache.hpp: Likewise.

14 years ago* src/vm/vm.hpp (VM::start_runtime_agents): Added new helper method.
Michael Starzinger [Wed, 23 Sep 2009 19:13:15 +0000 (21:13 +0200)]
* src/vm/vm.hpp (VM::start_runtime_agents): Added new helper method.
* src/vm/vm.hpp (VM::VM): Start runtime agents after the VM is created.
(VM::start_runtime_agents): Implemented for different JRE configurations.

14 years ago* src/native/vm/sun_misc_Unsafe.cpp (Java_sun_misc_Unsafe_getLoadAverage): Added.
Michael Starzinger [Wed, 23 Sep 2009 11:45:08 +0000 (13:45 +0200)]
* src/native/vm/sun_misc_Unsafe.cpp (Java_sun_misc_Unsafe_getLoadAverage): Added.
* src/vm/os.hpp (os::getloadavg): Added new OS wrapper.
* configure.ac: Added check for getloadavg.

15 years ago* INSTALL: Minor textual changes.
Stefan Ring [Thu, 12 Feb 2009 19:10:08 +0000 (20:10 +0100)]
* INSTALL: Minor textual changes.
* README: Likewise.

14 years ago* src/vm/jit/trace.cpp: Method tracer can now trace builtin functions as well.
Michael Starzinger [Sun, 2 Aug 2009 12:13:17 +0000 (14:13 +0200)]
* src/vm/jit/trace.cpp: Method tracer can now trace builtin functions as well.
* src/vm/jit/codegen-common.cpp: Some minor adaption to allow above change.
* src/vm/options.c (opt_TraceBuiltinCalls): Added new tracer option.
* src/vm/options.h (opt_TraceBuiltinCalls): Likewise.

14 years ago* src/vm/global.h: Added definition of MIN macro with guard.
Michael Starzinger [Wed, 15 Jul 2009 11:03:54 +0000 (13:03 +0200)]
* src/vm/global.h: Added definition of MIN macro with guard.
* src/vm/jit/sparc64/md-abi.c (MIN): Removed macro.
* src/vm/jit/stack.c (MIN): Likewise.

14 years agoi386 / x86_64: Align patcher trap instruction.
Stefan Ring [Mon, 6 Jul 2009 15:16:20 +0000 (17:16 +0200)]
i386 / x86_64: Align patcher trap instruction.
* src/vm/jit/i386/emit.c: Added emit_patcher_alignment.
* src/vm/jit/x86_64/emit.c: Likewise.
* src/vm/jit/i386/md-trap.h: Added emit_patcher_alignment, defined
ALIGN_PATCHER_TRAP.
* src/vm/jit/x86_64/md-trap.h: Likewise.
* src/vm/jit/patcher-common.cpp (patcher_add_patch_ref): Use
emit_patcher_alignment if requested.

14 years ago* src/vm/jit/show.cpp (show_method, show_allocation): Show register
Stefan Ring [Wed, 1 Jul 2009 06:58:28 +0000 (08:58 +0200)]
* src/vm/jit/show.cpp (show_method, show_allocation): Show register
allocation even without disassembler.

14 years ago* src/vm/jit/trap.cpp (trap_handle): Suppress PR85 warning by default.
Stefan Ring [Tue, 30 Jun 2009 14:44:11 +0000 (16:44 +0200)]
* src/vm/jit/trap.cpp (trap_handle): Suppress PR85 warning by default.

14 years ago* NEWS: Slight clarification.
Stefan Ring [Tue, 30 Jun 2009 09:14:34 +0000 (11:14 +0200)]
* NEWS: Slight clarification.

14 years ago* NEWS: Brought in line with cacao-1.0.x branch, added preliminary release info
Stefan Ring [Tue, 30 Jun 2009 06:14:51 +0000 (08:14 +0200)]
* NEWS: Brought in line with cacao-1.0.x branch, added preliminary release info
for trunk.

14 years agoOpenSolaris x86_64
Stefan Ring [Mon, 29 Jun 2009 15:50:56 +0000 (17:50 +0200)]
OpenSolaris x86_64
* src/vm/jit/x86_64/md-abi.h: #undef REG_SP on Solaris.
* src/vm/jit/x86_64/codegen.c, src/vm/jit/x86_64/emit.c: Added an
include in order to pick up the register defines from
/usr/include/sys.

* src/vm/jit/x86_64/solaris/md-os.c: Simplified signal handlers
("new-trap-decoding").
(md_executionstate_read, md_executionstate_write): Fixed register
translation.

14 years ago* src/vm/jit/i386/solaris/md-os.c: Forgot to remove a comment.
Stefan Ring [Mon, 29 Jun 2009 08:20:53 +0000 (10:20 +0200)]
* src/vm/jit/i386/solaris/md-os.c: Forgot to remove a comment.

14 years agoNow runs on OpenSolaris i386.
Stefan Ring [Sat, 27 Jun 2009 15:33:23 +0000 (17:33 +0200)]
Now runs on OpenSolaris i386.
* src/vm/array.hpp, src/native/jni.cpp: Compile fixes (on OpenSolaris).
* src/vm/jit/i386/arch.h: Added SKIP_REG_DEFS for Solaris build.
Also #undef register symbols on Solaris.
* src/vm/jit/i386/md-abi.h: #undef REG_SP on Solaris.
* src/vm/jit/i386/codegen.c, src/vm/jit/i386/emit.c: Added an include
in order to pick up the register defines from /usr/include/sys.

* src/vm/jit/i386/solaris/md-os.c: Simplified signal handlers
("new-trap-decoding"). Also using UESP instead of ESP.

* src/vm/jit/optimizing/recompiler.cpp: Fixed a bug.
This "sanity" check is not sane in the presence of spurious wakeups.

14 years agoAdded test for PR131.
Stefan Ring [Fri, 26 Jun 2009 14:44:10 +0000 (16:44 +0200)]
Added test for PR131.

14 years ago* tests/regression/bugzilla/PR119.java: Compile fix.
Stefan Ring [Fri, 26 Jun 2009 14:52:10 +0000 (16:52 +0200)]
* tests/regression/bugzilla/PR119.java: Compile fix.

14 years agoMinor bugfix for previous commit.
Stefan Ring [Wed, 24 Jun 2009 06:26:11 +0000 (08:26 +0200)]
Minor bugfix for previous commit.
* src/threads/lock.cpp (lock_hashtable_get): Use unordered finalization
like in src/mm/gc-boehm.cpp (heap_alloc).

14 years agoFixes PR131.
Stefan Ring [Tue, 23 Jun 2009 13:13:04 +0000 (15:13 +0200)]
Fixes PR131.
* src/threads/lock.cpp: Remove lock records only after they have become
absolutely unreachable.
* src/threads/lock.hpp: Added lock_schedule_lockrecord_removal.
* src/vm/finalizer.cpp: Schedule lock record removal.

14 years ago* configure.ac: Added AC_CONFIG_AUX_DIR.
Stefan Ring [Mon, 22 Jun 2009 19:55:11 +0000 (21:55 +0200)]
* configure.ac: Added AC_CONFIG_AUX_DIR.
Without this, autogen'ing inside an icedtea tree did not work with libtool
2.2.6.

14 years agoFixes PR130 (os::scandir invocation).
Stefan Ring [Sat, 20 Jun 2009 13:32:59 +0000 (15:32 +0200)]
Fixes PR130 (os::scandir invocation).
* src/vm/os.hpp (os::scandir): Invoke the system's scandir function via
a template helper.

14 years ago* src/vm/options.c (options_xx): Don't clutter output with warning (print to
Stefan Ring [Tue, 2 Jun 2009 23:35:48 +0000 (01:35 +0200)]
* src/vm/options.c (options_xx): Don't clutter output with warning (print to
stderr instead).

14 years agoFixes PR128 (changed resolution order for native methods).
Stefan Ring [Tue, 2 Jun 2009 12:24:17 +0000 (14:24 +0200)]
Fixes PR128 (changed resolution order for native methods).
* src/native/native.cpp (NativeMethods::resolve_method): Consider internal
methods before descending into java.lang.ClassLoader.

14 years ago* src/native/vm/sun_misc_Unsafe.cpp: Make both OpenJDK 6/7 versions of
Stefan Ring [Tue, 2 Jun 2009 12:15:35 +0000 (14:15 +0200)]
* src/native/vm/sun_misc_Unsafe.cpp: Make both OpenJDK 6/7 versions of
setMemory/copyMemory available.

14 years ago* src/vm/os.cpp (os::abort_errnum, os::abort_errno): Fixed.
Stefan Ring [Thu, 28 May 2009 08:33:15 +0000 (10:33 +0200)]
* src/vm/os.cpp (os::abort_errnum, os::abort_errno): Fixed.

14 years ago* src/native/jni.cpp (_Jv_JNI_CallStaticObjectMethodV,
Stefan Ring [Thu, 28 May 2009 08:31:45 +0000 (10:31 +0200)]
* src/native/jni.cpp (_Jv_JNI_CallStaticObjectMethodV,
_Jv_JNI_CallStaticVoidMethodV): Cannot dump va_list in a meaningful way.

14 years ago* src/vm/os.hpp (os::fprintf): Fixed vfprintf invocation.
Stefan Ring [Tue, 26 May 2009 12:03:39 +0000 (14:03 +0200)]
* src/vm/os.hpp (os::fprintf): Fixed vfprintf invocation.
Looks like a typo; was discovered because of a gcc warning on Alpha.

--HG--
extra : transplant_source : U%24%C4%C3%FE%1Dk%0D%1E%A1%B4%EEC%B3%EAB%EA%B4Q%E7

14 years ago* src/native/vm/openjdk/jvm.cpp (JVM_GetAllThreads): Fixed minor typo
Michael Starzinger [Wed, 20 May 2009 15:15:31 +0000 (17:15 +0200)]
* src/native/vm/openjdk/jvm.cpp (JVM_GetAllThreads): Fixed minor typo
missed during list renaming.

14 years ago* src/vm/jit/codegen-common.cpp (codegen_start_native_call) [__MIPS__],
Michael Starzinger [Wed, 20 May 2009 15:13:39 +0000 (17:13 +0200)]
* src/vm/jit/codegen-common.cpp (codegen_start_native_call) [__MIPS__],
(codegen_finish_native_call) [__MIPS__]: Trace native calls implicitly now.
* src/vm/jit/mips/codegen.c (codegen_emit_stub_native): Removed explicit
calltracer code generation.

14 years ago* src/vm/jit/mips/codegen.c (codegen_emit): Fixed minor problem in ICMD_ATHROW.
Michael Starzinger [Wed, 20 May 2009 14:43:41 +0000 (16:43 +0200)]
* src/vm/jit/mips/codegen.c (codegen_emit): Fixed minor problem in ICMD_ATHROW.

14 years ago* src/toolbox/list.hpp (List): Added new list class without a mutex.
Michael Starzinger [Tue, 12 May 2009 08:21:16 +0000 (10:21 +0200)]
* src/toolbox/list.hpp (List): Added new list class without a mutex.
(LockedList): Renamed list class with mutex to make mutex obvious.
* src/threads/threadlist.hpp (ThreadList): Use above class.
* src/threads/threadlist.cpp: Likewise.
* src/vm/jit/code.hpp (codeinfo): Patcher list uses above class.
* src/vm/jit/patcher-common.cpp (patcher_list_create): Likewise.