cacao.git
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.

15 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.

15 years ago* configure.ac: Made ARM cpu types more generic.
Michael Starzinger [Mon, 11 May 2009 11:23:44 +0000 (13:23 +0200)]
* configure.ac: Made ARM cpu types more generic.

15 years ago* src/vm/jit/powerpc/arch.h: Added USES_NEW_SUBTYPE.
Stefan Ring [Thu, 30 Apr 2009 08:27:57 +0000 (10:27 +0200)]
* src/vm/jit/powerpc/arch.h: Added USES_NEW_SUBTYPE.
* src/vm/jit/powerpc/codegen.c: New subtype code for ppc, almost identical to
the ppc64 code.
* src/vm/jit/powerpc/codegen.h: Added M_CNTLZ.
* src/vm/jit/powerpc/emit.c (emit_classcast_check): Slightly extended.

15 years ago* src/vm/jit/powerpc/darwin/md-os.c: Brought ppc-darwin up to date. Should be
Michael Starzinger [Tue, 28 Apr 2009 16:50:37 +0000 (18:50 +0200)]
* src/vm/jit/powerpc/darwin/md-os.c: Brought ppc-darwin up to date. Should be
backwards compatible to previous darwin versions.

15 years ago* src/vm/jit/alpha/codegen.c: Fixed a register-spilling bug.
Stefan Ring [Wed, 22 Apr 2009 09:20:27 +0000 (11:20 +0200)]
* src/vm/jit/alpha/codegen.c: Fixed a register-spilling bug.

15 years ago* src/vm/jit/powerpc64/codegen.c: Fixed 2 register-spilling bugs.
Stefan Ring [Mon, 20 Apr 2009 17:59:44 +0000 (19:59 +0200)]
* src/vm/jit/powerpc64/codegen.c: Fixed 2 register-spilling bugs.

15 years ago* src/vm/jit/allocator/simplereg.c: Respects opt_RegallocSpillAll flag now.
Michael Starzinger [Mon, 20 Apr 2009 14:10:14 +0000 (16:10 +0200)]
* src/vm/jit/allocator/simplereg.c: Respects opt_RegallocSpillAll flag now.
* src/vm/options.c (opt_RegallocSpillAll): Added.
* src/vm/options.h: Likewise.

15 years ago* src/vm/jit/powerpc64/arch.h: Added USES_NEW_SUBTYPE.
Stefan Ring [Mon, 20 Apr 2009 10:10:53 +0000 (12:10 +0200)]
* src/vm/jit/powerpc64/arch.h: Added USES_NEW_SUBTYPE.
* src/vm/jit/powerpc64/codegen.c: New subtype code for ppc64, brought closer
in line with the Alpha version.
* src/vm/jit/powerpc64/codegen.h: Added M_RLDICL, M_CNTLZ.
* src/vm/jit/powerpc64/emit.c (emit_classcast_check): Slightly extended.

15 years agoMerged with new-trap-decoding branch at rev a792088a3f04 (branch closed).
Michael Starzinger [Wed, 15 Apr 2009 15:04:15 +0000 (17:04 +0200)]
Merged with new-trap-decoding branch at rev a792088a3f04 (branch closed).

15 years ago* src/vm/jit/powerpc/linux/md-os.c: Simplified signal handlers.
Michael Starzinger [Wed, 15 Apr 2009 14:52:31 +0000 (16:52 +0200)]
* src/vm/jit/powerpc/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/powerpc/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/powerpc/md.c (md_trap_decode): Implemented.

--HG--
branch : new-trap-decoding

15 years ago* src/native/vm/openjdk/jvm.cpp (JVM_CurrentClassLoader): Implemented.
Michael Starzinger [Wed, 15 Apr 2009 09:39:14 +0000 (11:39 +0200)]
* src/native/vm/openjdk/jvm.cpp (JVM_CurrentClassLoader): Implemented.
* src/vm/javaobjects.hpp [ENABLE_JAVASE] (java_lang_ClassLoader): Added.
* src/vm/javaobjects.cpp (java_lang_ClassLoader::invoke_getSystemClassLoader):
Implemented new invocation wrapper method.
* src/vm/loader.cpp (load_class_from_sysloader): Use above invocation wrapper.
* src/vm/jit/stacktrace.cpp (stacktrace_first_nonsystem_classloader): Added.
* src/vm/jit/stacktrace.hpp: Likewise.
* src/vm/vm.cpp (vm_get_mainclass_from_jar): Added workaround to make it
compile with CLDC. We have to look into this at some point.

15 years agoFixes PR126.
Michael Starzinger [Thu, 2 Apr 2009 15:45:14 +0000 (17:45 +0200)]
Fixes PR126.
* src/vm/loader.cpp (load_class_from_classloader): Correct faulty classloader behavior.
* src/vm/options.c: Added option flag for -XX:+PrintWarnings.
* src/vm/options.h: Likewise.

15 years ago* src/vm/jit/i386/darwin/md-os.c: Simplified signal handlers.
Stefan Ring [Tue, 24 Mar 2009 09:58:44 +0000 (10:58 +0100)]
* src/vm/jit/i386/darwin/md-os.c: Simplified signal handlers.

--HG--
branch : new-trap-decoding

15 years agoFixes PR125.
Michael Starzinger [Mon, 23 Mar 2009 23:58:04 +0000 (00:58 +0100)]
Fixes PR125.
* src/vm/method.cpp (method_load): Ignore access flags for clinit methods.

15 years ago* tests/regression/bugzilla/PR125.java: Added new regression test.
Michael Starzinger [Mon, 23 Mar 2009 21:49:24 +0000 (22:49 +0100)]
* tests/regression/bugzilla/PR125.java: Added new regression test.
* tests/regression/bugzilla/All.java: Added above test to testsuite.

15 years ago* src/vm/jit/i386/linux/md-os.c: Simplified signal handlers.
Michael Starzinger [Mon, 23 Mar 2009 12:43:51 +0000 (13:43 +0100)]
* src/vm/jit/i386/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/i386/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/i386/md.c (md_trap_decode): Implemented.
* src/vm/jit/trap.cpp (trap_handle) [__I386__]: Fixed minor conflict.

--HG--
branch : new-trap-decoding

15 years ago* src/vm/jit/alpha/linux/md-os.c: Simplified signal handlers.
Michael Starzinger [Mon, 23 Mar 2009 12:37:14 +0000 (13:37 +0100)]
* src/vm/jit/alpha/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/alpha/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/alpha/md.c (md_trap_decode): Implemented.

--HG--
branch : new-trap-decoding

15 years agoFixes PR121. Cherry-picked from upstream BoehmGC CVS head.
Michael Starzinger [Sat, 21 Mar 2009 16:00:53 +0000 (17:00 +0100)]
Fixes PR121. Cherry-picked from upstream BoehmGC CVS head.
* src/mm/boehm-gc/os_dep.c (GC_linux_stack_base): Relax sanity test.

15 years ago* src/native/vm/cldc1.1/java_lang_String.cpp: Added missing include.
Michael Starzinger [Fri, 20 Mar 2009 12:24:09 +0000 (13:24 +0100)]
* src/native/vm/cldc1.1/java_lang_String.cpp: Added missing include.
* 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.

15 years agoMerged with michi branch at rev 1684fe51cf3d.
Michael Starzinger [Mon, 16 Mar 2009 19:45:58 +0000 (20:45 +0100)]
Merged with michi branch at rev 1684fe51cf3d.

15 years ago* src/vm/array.hpp (ArrayTemplate::get_raw_data_ptr): Added as pure virtual.
Michael Starzinger [Mon, 16 Mar 2009 19:35:17 +0000 (20:35 +0100)]
* src/vm/array.hpp (ArrayTemplate::get_raw_data_ptr): Added as pure virtual.
(Array::get_raw_data_ptr): Removed obsolete method.
Removed some superfluous inline keywords.

--HG--
branch : michi

15 years ago* src/vm/jit/powerpc64/linux/md-os.c: Simplified signal handlers.
Michael Starzinger [Fri, 13 Mar 2009 15:01:44 +0000 (16:01 +0100)]
* src/vm/jit/powerpc64/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/powerpc64/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/powerpc64/md.c (md_trap_decode): Implemented.
* src/vm/jit/powerpc64/patcher.c (patcher_is_valid_trap_instruction_at):
Removed obsolete method.

--HG--
branch : new-trap-decoding

15 years ago* src/vm/jit/trap.cpp (trap_handle): Further generalized trap handling and
Michael Starzinger [Thu, 12 Mar 2009 14:35:16 +0000 (15:35 +0100)]
* src/vm/jit/trap.cpp (trap_handle): Further generalized trap handling and
changed signature accordingly.
* src/vm/jit/trap.hpp (trapinfo_t): Added together with signal number defines.

* src/vm/jit/arm/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/arm/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/arm/md.c (md_trap_decode): Implemented.

* src/vm/jit/x86_64/linux/md-os.c: Simplified signal handlers.
* src/vm/jit/x86_64/md-trap.h (MD_TRAP_COMPILER_FIXUP): Implemented.
* src/vm/jit/x86_64/md.c (md_trap_decode): Implemented.

--HG--
branch : new-trap-decoding

15 years ago* src/vm/options.c: Moved -m, -sig and -all flags to -XX options.
Michael Starzinger [Thu, 12 Mar 2009 09:11:25 +0000 (10:11 +0100)]
* src/vm/options.c: Moved -m, -sig and -all flags to -XX options.
* src/vm/options.h: Likewise.
* src/vm/vm.cpp: Removed obsolete flags and adapted to above changes.

15 years ago* src/vm/jit/mips/arch.h (USES_NEW_SUBTYPE): Added define.
Michael Starzinger [Wed, 11 Mar 2009 15:12:59 +0000 (16:12 +0100)]
* src/vm/jit/mips/arch.h (USES_NEW_SUBTYPE): Added define.
* src/vm/jit/mips/codegen.c (codegen_emit): Added new subtype checking code
to ICMD_CHECKCAST and ICMD_INSTANCEOF.
* src/vm/jit/emit-common.cpp (emit_label_beq): Added.
* src/vm/jit/emit-common.hpp (emit_label_beq): Likewise.

15 years ago* src/vm/vm.cpp (vm_abort_errnum, vm_abort_errno): Removed obsolete functions.
Michael Starzinger [Tue, 10 Mar 2009 10:23:15 +0000 (11:23 +0100)]
* src/vm/vm.cpp (vm_abort_errnum, vm_abort_errno): Removed obsolete functions.
* src/vm/vm.hpp: Likewise.
* src/mm/memory.cpp: Adapted to use os::abort_errnum() instead.
* src/native/vm/cldc1.1/com_sun_cldc_io_j2me_socket_Protocol.cpp: Likewise.
* src/threads/posix/thread-posix.cpp: Likewise.
* src/threads/posix/thread-posix.hpp: Likewise.
* src/vm/jit/oprofile-agent.cpp: Likewise.
* src/vm/options.c: Likewise.
* src/vm/signal.cpp: Likewise.

15 years ago* src/vm/jit/arm/arch.h (USES_NEW_SUBTYPE): Added define.
Michael Starzinger [Tue, 10 Mar 2009 10:19:42 +0000 (11:19 +0100)]
* src/vm/jit/arm/arch.h (USES_NEW_SUBTYPE): Added define.
* src/vm/jit/arm/codegen.c (codegen_emit): Added new subtype checking code
to ICMD_CHECKCAST and ICMD_INSTANCEOF.
* src/vm/jit/arm/codegen.h: Added new conditional traps.
* src/vm/jit/arm/emit.c (emit_classcast_check): Likewise.

15 years ago* src/native/jni.hpp (JNI_VERSION_CACAO): Added to be able to reveal ourselves.
Michael Starzinger [Thu, 5 Mar 2009 15:13:32 +0000 (16:13 +0100)]
* src/native/jni.hpp (JNI_VERSION_CACAO): Added to be able to reveal ourselves.
* src/native/jni.cpp (JNI_GetDefaultJavaVMInitArgs): Now accepts above version
number.

15 years ago* src/vm/suck.hpp (SuckClasspath): Added as list of classpath entries.
Michael Starzinger [Thu, 5 Mar 2009 13:44:30 +0000 (14:44 +0100)]
* src/vm/suck.hpp (SuckClasspath): Added as list of classpath entries.
* src/vm/suck.cpp: Moved existing methods into above class.
* src/vm/vm.hpp (VM): Added SuckClasspath as global classpath entries list.
* src/vm/vm.cpp (VM::VM): Adapted to above changes.
* src/vm/loader.cpp (loader_load_all_classes): Likewise.
* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.cpp: Likewise.
* src/native/vm/gnuclasspath/java_lang_VMClassLoader.cpp: Likewise.