Jato mailing list has been moved!

2009-12-18 Thread Pekka Enberg
Hi all, I've moved the Jato mailing list to Google Groups: http://groups.google.com/group/jatovm?hl=en I did this because SF.net mailing lists are slow, the archives are crappy, and I got tired of fighting spam through mailman admin interface. While Google Groups might not be the perfect

[PATCH] x86-64: Fix native_call_gp() clobber list

2009-12-13 Thread Pekka Enberg
As we are doing a call, we must specify all caller-saved registers as clobbered. Cc: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro Cc: Arthur HUILLET arthur.huil...@free.fr Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/call.c |5 +++-- 1 files changed, 3 insertions

[PATCH 3/3] x86: Remove unused INSN_XOR_IMM_REG type

2009-12-13 Thread Pekka Enberg
Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/emit-code.c| 12 arch/x86/include/arch/instruction.h |1 - arch/x86/instruction.c |1 - arch/x86/lir-printer.c |7 --- test/arch-x86/emit-code-test_32.c

[PATCH 2/3] x86: Remove unused INSN_PUSH_MEMBASE type

2009-12-13 Thread Pekka Enberg
Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/emit-code.c|7 --- arch/x86/include/arch/instruction.h |1 - arch/x86/instruction.c |1 - arch/x86/lir-printer.c |7 --- 4 files changed, 0 insertions(+), 16 deletions

[PATCH 1/3] x86: Remove unused INSN_MOV_IP_THREAD_LOCAL_MEMBASE type

2009-12-13 Thread Pekka Enberg
Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/emit-code.c| 11 --- arch/x86/include/arch/instruction.h |1 - arch/x86/instruction.c |1 - arch/x86/lir-printer.c |7 --- 4 files changed, 0 insertions(+), 20

[PATCH 3/3] x86: Unify NO_OPERANDS and SINGLE_OPERAND emission

2009-12-13 Thread Pekka Enberg
Now that NO_OPERANDS and SINGLE_OPERAND emitter share the same function signature we can unify the two. Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/emit-code.c | 19 +-- 1 files changed, 5 insertions(+), 14 deletions(-) diff --git a/arch/x86/emit-code.c b

Re: Entering the GC from the JIT trampolines

2009-12-07 Thread Pekka Enberg
Pekka Enberg kirjoitti: As I mentioned before, I'm seeing deadlocks with GcTortureTest when -Xgc is enabled. I've been debugging the problem for a bit now and I think it's a generic problem of entering the GC from within a JIT trampoline while we're holding cu-mutex. See the below backtrace

Re: Entering the GC from the JIT trampolines

2009-12-07 Thread Pekka Enberg
On Mon, 2009-12-07 at 12:42 +0200, Pekka Enberg wrote: AFAICT entering GC from a JIT trampoline is irrelevant to this discussion. We're really looking at a generic problem where one or more of the threads are already blocked with pthread_mutex_lock() or whatever and we try to stop the world

Entering the GC from the JIT trampolines

2009-12-06 Thread Pekka Enberg
Hi! As I mentioned before, I'm seeing deadlocks with GcTortureTest when -Xgc is enabled. I've been debugging the problem for a bit now and I think it's a generic problem of entering the GC from within a JIT trampoline while we're holding cu-mutex. See the below backtrace for details (I think

Re: [PATCH] vm: fix init_stack_trace_elem_current()

2009-11-17 Thread Pekka Enberg
Tomek Grabiec wrote: The function was setting elem to the init_stack_trace_elem_current()'s frame which is error prone because after function returns its stack frame might be overriden by another function calls done from the caller. A fix for that is to make init_stack_trace_elem_current()

Re: [PATCH] vm: fix init_stack_trace_elem_current()

2009-11-17 Thread Pekka Enberg
Tomasz Grabiec wrote: Dnia 2009-11-17, wto o godzinie 16:39 +0200, Pekka Enberg pisze: Tomek Grabiec wrote: The function was setting elem to the init_stack_trace_elem_current()'s frame which is error prone because after function returns its stack frame might be overriden by another function

Re: [PATCH] vm: fix init_stack_trace_elem_current()

2009-11-17 Thread Pekka Enberg
Tomasz Grabiec wrote: Tomek Grabiec wrote: The function was setting elem to the init_stack_trace_elem_current()'s frame which is error prone because after function returns its stack frame might be overriden by another function calls done from the caller. A fix for that is to make

Re: GC maps

2009-11-16 Thread Pekka Enberg
Hi Tomek, Tomasz Grabiec kirjoitti: Dnia 2009-11-16, pon o godzinie 12:19 +0200, Pekka Enberg pisze: Next step is to change gc_safepoint() to look up struct gc_map based on regs-eip. I was thinking of adding an hash map of GC maps to struct compilation_unit but we first need to be able

Strange code in __insert_spill_reload_insn()

2009-10-24 Thread Pekka Enberg
in the future add ebx, ebx Signed-off-by: Tomek Grabiec tgrab...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi there's a pretty strange change: @@ -198,11 +229,11 @@ static int __insert_spill_reload_insn(struct live_interval *interval, struct com * can't

Re: [RFC PATCH 13/16] x86-64: XMM args register assignment

2009-10-22 Thread Pekka Enberg
On Wed, 2009-10-21 at 19:29 +0200, Tomasz Grabiec wrote: + if (xmm_count 8) { + map-reg = args_map_alloc_xmm(xmm_count++); + map-stack_index = -1; + } else { + map-reg =

[PATCH v2] x86: Fix instruction selector deadlock in invoke()

2009-10-12 Thread Pekka Enberg
Grabiec tgrab...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/insn-selector.brg | 22 -- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/arch/x86/insn-selector.brg b/arch/x86/insn-selector.brg index c2d06c3..26bcfd5 100644 --- a/arch

Re: [PATCH 1/2] vm: parse method and field type on initialization

2009-10-06 Thread Pekka Enberg
On Tue, 2009-10-06 at 11:45 +0200, Tomek Grabiec wrote: struct vm_type_info is introduced to fully describe a java type of a call argument, return type, field type, etc. Method's and field's type strings are parsed on initialization and type information is put to appropriate struct

[PATCH 1/3] x86: Register state saving

2009-09-16 Thread Pekka Enberg
() function for converting gregset_t to struct register_state so we can pass register contents to the gc_safepoint() function. Cc: Tomek Grabiec tgrab...@gmail.com Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/include/arch/registers_32.h | 52

[PATCH 2/3] x86-64: Register state saving

2009-09-16 Thread Pekka Enberg
Add save_registers() and save_signal_registers() to x86-64 as well. Cc: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro Cc: Tomek Grabiec tgrab...@gmail.com Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/x86/include/arch/registers_64.h

[ANNOUNCE] Jato v0.0.1 - a simple JIT-only virtual machine for Java

2009-09-09 Thread Pekka Enberg
Hi all, I am proud to announce the release of Jato v0.0.1 buy more RAM-edition! Jato is a JIT-only virtual machine for Java that can run some simple programs under GNU/Linux on modern 32-bit x86 CPUs. A port to the x86-64 machine architecture is currently being developed. Jato depends on GNU

Re: [PATCH] jit: fix race condition in fixup_direct_calls()

2009-09-08 Thread Pekka Enberg
On Mon, 2009-09-07 at 22:41 +0200, Tomek Grabiec wrote: This fixes incorrect lock order reported by helgrind: OK, so what is the problem? How are you fixing it? The changelog is really too terse for this kind of critical fix. Signed-off-by: Tomek Grabiec tgrab...@gmail.com ---

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-06 Thread Pekka Enberg
On Sun, 2009-09-06 at 10:34 +0200, Vegard Nossum wrote: ACK! Acked-by: Vegard Nossum vegard.nos...@gmail.com It's better because we don't initialize the same fields over and over. Perhaps this is premature optimization, but it's just much more elegant to not do more than we really need.

[PATCH] gc: Fix safepoints when gc_start() is called from object allocator

2009-09-06 Thread Pekka Enberg
no threads are started. With the above fixes, GcTortureTest passes when gc_start() is called from object allocator. Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- vm/gc.c | 76 +- 1 files

Re: [PATCH 15/19] x86-64: move received parameters to non-fixed registers

2009-09-06 Thread Pekka Enberg
On Sat, 2009-09-05 at 13:27 +0300, Eduard - Gabriel Munteanu wrote: We must not keep the parameters we received in fixed registers because they can be clobbered by other insn-selector rules that use them (e.g. method invocation). Signed-off-by: Eduard - Gabriel Munteanu

[PATCH 3/4] vm: Introduce -verbose:gc command line option

2009-09-06 Thread Pekka Enberg
Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- include/vm/gc.h |3 +++ vm/gc.c |4 vm/jato.c |6 ++ 3 files changed, 13 insertions(+), 0 deletions(-) diff --git a/include/vm/gc.h b/include/vm/gc.h index a9bfae9

[PATCH v2 4/4] vm: Introduce -Xgc command line option

2009-09-06 Thread Pekka Enberg
This patch adds a -Xgc command line option that enables the work-in-progress GC infrastructure. Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- include/vm/gc.h |1 + vm/gc.c |3 +++ vm/jato.c |6 ++ 3 files changed

[PATCH v2 3/4] vm: Introduce -verbose:gc command line option

2009-09-06 Thread Pekka Enberg
Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- include/vm/gc.h |3 +++ vm/gc.c |3 +++ vm/jato.c |6 ++ 3 files changed, 12 insertions(+), 0 deletions(-) diff --git a/include/vm/gc.h b/include/vm/gc.h index a9bfae9

[RFC/PATCH v3 3/5] gc: Introduce gc_malloc() entry-point

2009-09-06 Thread Pekka Enberg
This patch introduces a gc_malloc() entry point. It's a simple wrapper on top of kzalloc() for now. Cc: Vegard Nossum vegard.nos...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- include/vm/gc.h |2 ++ test/vm/gc-stub.c |6 ++ vm/gc.c |6 ++ vm

Re: [PATCH] vm: Use calloc() to allocate class methods

2009-09-05 Thread Pekka Enberg
Vegard Nossum wrote: 2009/9/5 Pekka Enberg penb...@cs.helsinki.fi: Good point. I wonder why we have methods without code attribute in classfiles. Native and abstract methods don't have code. It's all here: http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#1546

Re: [PATCH] x86: Introduce workarounds for valgrind to work with jato.

2009-09-01 Thread Pekka Enberg
On Mon, 2009-08-31 at 16:14 +0200, Tomek Grabiec wrote: Jato can be compiled with workarounds which make valgrind work with jato. To do so, define VALGRIND variable for make: make jato VALGRIND=y We can auto-detect whether we're running on valgrind or not: #include valgrind/valgrind.h

Re: [PATCH 1/6] vm: introduce -Xnobuf

2009-09-01 Thread Pekka Enberg
9d6a82a9290f5f75a5018506b4febe31ad8df3e0 Mon Sep 17 00:00:00 2001 From: Pekka Enberg penb...@cs.helsinki.fi Date: Tue, 1 Sep 2009 21:21:15 +0300 Subject: [PATCH] vm: Flush and disable buffering on SIGABRT Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- include/vm/trace.h |1 + vm/signal.c| 23

Re: [PATCH] x86: Introduce workarounds for valgrind to work with jato.

2009-08-31 Thread Pekka Enberg
Hi Tomek, On Mon, 2009-08-31 at 16:14 +0200, Tomek Grabiec wrote: Jato can be compiled with workarounds which make valgrind work with jato. To do so, define VALGRIND variable for make: make jato VALGRIND=y Currently workarounds eliminate class initialization from signal handler by

Re: [PATCH] x86: fix writes below (%esp) which can be fixed at no cost

2009-08-31 Thread Pekka Enberg
Hi Tomek, On Mon, 2009-08-31 at 20:30 +0200, Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- arch/x86/insn-selector.brg | 30 -- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/arch/x86/insn-selector.brg

Re: [PATCH] vm: add unimplemented interface methods to abstract classes

2009-08-23 Thread Pekka Enberg
Hi Vegard, (I'm cc'ing Eduard on the args map question.) On Sat, 2009-08-22 at 23:39 +0200, Vegard Nossum wrote: @@ -371,7 +371,56 @@ int vm_class_link(struct vm_class *vmc, const struct cafebabe_class *class) } } - vmc-methods = malloc(sizeof(*vmc-methods) *

Re: [PATCH] vm: remove extraneous semicolon

2009-08-23 Thread Pekka Enberg
On Sat, 2009-08-22 at 23:39 +0200, Vegard Nossum wrote: Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- vm/object.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vm/object.c b/vm/object.c index 1baa966..36e60c1 100644 --- a/vm/object.c +++

Re: [PATCH] regression: add MirandaInterfaceMethodTest

2009-08-23 Thread Pekka Enberg
On Sun, 2009-08-23 at 09:06 +0200, Vegard Nossum wrote: I did write something about this in the changelog of one of the other patches. It is correct that this is not _exactly_ what a miranda method is, but it would have been called a miranda method if it was generated by javac. But we're doing

Re: [RFC][PATCH 3/3] jit: fix data flow resolution code in presence of empty basic blocks.

2009-08-20 Thread Pekka Enberg
instructions. lab: I tried to write a regression test based on the above description. Unfortunately this doesn't seem to trigger the bug: From d642832b008d8622f01e14eb07c197f40458488a Mon Sep 17 00:00:00 2001 From: Pekka Enberg penb...@cs.helsinki.fi Date: Thu, 20 Aug 2009 09:41:28 +0300

[PATCH 2/3] spill-reload: Remove redundant argument from insert_copy_slot_insn()

2009-08-18 Thread Pekka Enberg
The 'pop_at_insn' argument is not used in insert_copy_slot_insn() function so remove it to clean up code. Cc: Arthur HUILLET arthur.huil...@free.fr Cc: Tomek Grabiec tgrab...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- jit/spill-reload.c | 13 + 1 files changed

[PATCH 3/3] spill-reload: Use radix_tree_lookup() in insert_mov_insns()

2009-08-18 Thread Pekka Enberg
Lets use radix_tree_lookup() and get rid of the nasty loop in bb_last_insn(). For some reason, this seems to fix the infinite loop triggered by empty basic blocks. Cc: Arthur HUILLET arthur.huil...@free.fr Cc: Tomek Grabiec tgrab...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi

[PATCH 1/3] spill-reload: Insert spill instructions before branches

2009-08-18 Thread Pekka Enberg
Use insn_is_branch() to determine whether we must insert a spill instruction before or after the last instruction in a basic block. Cc: Arthur HUILLET arthur.huil...@free.fr Cc: Tomek Grabiec tgrab...@gmail.com Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi --- arch/mmix/include/arch

Re: [PATCH 3/3] spill-reload: Use radix_tree_lookup() in insert_mov_insns()

2009-08-18 Thread Pekka Enberg
on some execution paths. I think the following patch _is_ correct but it breaks make regression so I think we're silently spilling/reloading empty basic blocks. Pekka From 999622798d073ae892c316e6f69fde7697233e4d Mon Sep 17 00:00:00 2001 From: Pekka Enberg penb

Re: [PATCH] vm: introduce per vm_class access flags.

2009-08-17 Thread Pekka Enberg
On Mon, 2009-08-17 at 15:38 +0200, Tomek Grabiec wrote: We need to assign access flags for arrays and primitive classes which have no corresponding cafebabe_class. Therefore -access_flags field is introduced for struct vm_class. Signed-off-by: Tomek Grabiec tgrab...@gmail.com I'd rather we

Re: [PATCH] vm: introduce per vm_class access flags.

2009-08-17 Thread Pekka Enberg
On Mon, 2009-08-17 at 19:36 +0200, Tomek Grabiec wrote: 2009/8/17 Pekka Enberg penb...@cs.helsinki.fi: On Mon, 2009-08-17 at 15:38 +0200, Tomek Grabiec wrote: We need to assign access flags for arrays and primitive classes which have no corresponding cafebabe_class. Therefore -access_flags

[PATCH] linear-scan: Fix range end checks

2009-08-17 Thread Pekka Enberg
From: Pekka Enberg penb...@cs.helsinki.fi The -end member of struct live_range is not part of the range. Fix up some range end checks in jit/linear-scan.c which assume -end is part of the range. Cc: Arthur HUILLET arthur.huil...@free.fr Signed-off-by: Pekka Enberg penb...@cs.helsinki.fi

More GCC warnings enabled

2009-08-16 Thread Pekka Enberg
Hi all, I've enabled some more GCC warnings now. There's still few more I'd like to enable at some point: -Wstack-protector -Wstrict-aliasing=3 -Wswitch-default -Wswitch-enum -Wpacked -Wshadow -Wbad-function-cast Unfortunately all of them make bugs in Jato code visible so

Re: [PATCH 5/5] vm: implement VMClass.getModifiers()

2009-08-13 Thread Pekka Enberg
Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com diff --git a/vm/jato.c b/vm/jato.c index 6d1ac6b..0d32645 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -607,10 +607,32 @@ native_vmclass_isprimitive(struct vm_object *object) static jint native_vmclass_getmodifiers(struct

Native symbol resolution busted

2009-08-06 Thread Pekka Enberg
Hi Tomek, It seems that native symbol resolution is busted somehow: [AWT-EventQueue-2] SIGSEGV at EIP 08055d30 while accessing memory address 002a. [AWT-EventQueue-2] Registers: [AWT-EventQueue-2] eax: ebx: ecx: 0001 edx: [AWT-EventQueue-2] esi:

Re: [PATCH] jit: introduce per-cu lir - insn mapping

2009-08-06 Thread Pekka Enberg
On Thu, 2009-08-06 at 16:13 +0200, Vegard Nossum wrote: This fixes the performance issue in liveness analysis. Signed-off-by: Vegard Nossum vegard.nos...@gmail.com Nice! Perf report looks like this now: # Overhead CommandShared Object Symbol # ...

Re: [PATCH 15/26] vm: set user.dir, user.home, user.name properties

2009-08-03 Thread Pekka Enberg
Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 4a82048..ea176ca 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -206,6 +206,13 @@ static void

Re: [PATCH 25/26] x86: fix 'this' pointer passing to fixup_vtable() for JNI methods.

2009-08-03 Thread Pekka Enberg
Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- arch/x86/emit-code.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/x86/emit-code.c b/arch/x86/emit-code.c index 57de052..521c150 100644 --- a/arch/x86/emit-code.c +++

Re: [PATCH 01/26] vm: introduce vm_thread_get_name()

2009-08-03 Thread Pekka Enberg
The series has been applied, thanks! -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core

Re: [PATCH 09/26] regression: introduce JNI regression tests

2009-08-03 Thread Pekka Enberg
Hi Tomek, I skipped this patch because it's causing too many problems. The regression test didn't compile: make -C regression/jni make[1]: Entering directory `/home/penberg/src/jato/regression/jni' JAVAHjvm_JNITest.h CXX libjnitest.so In file included from jvm_JNITest.cpp:1:

Re: [RFC][PATCH] jit: fix handling of split intervals in register allocator

2009-08-01 Thread Pekka Enberg
On Wed, 2009-07-29 at 15:36 +0200, Tomek Grabiec wrote: Liveness analysis can produce intervals with range not ending at a use position. When splitting such interval after last use position we get the new interval with non-zero range length and without use positions. We should not add such

Re: [PATCH 1/6] jit: ensure tracing mutual exclusion during whole method compilation

2009-08-01 Thread Pekka Enberg
On Thu, 2009-07-30 at 12:50 +0200, Tomek Grabiec wrote: We have to make trace_mutex recursive because java.lang.String initialization might be triggered during compilation of method containing ldc on String constant. Signed-off-by: Tomek Grabiec tgrab...@gmail.com +void init_tracing(void)

Re: [PATCH 3/6] jato: prevent removal of .java regression test suite files on `make clean'

2009-08-01 Thread Pekka Enberg
On Thu, 2009-07-30 at 12:50 +0200, Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- Makefile |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index ede2d0c..c037fb8 100644 --- a/Makefile +++ b/Makefile @@ -308,7 +308,6

Re: [PATCH 4/6] vm: make static field fixup thread safe

2009-08-01 Thread Pekka Enberg
On Thu, 2009-07-30 at 12:50 +0200, Tomek Grabiec wrote: diff --git a/include/vm/class.h b/include/vm/class.h index 2ed5ffe..b827afc 100644 --- a/include/vm/class.h +++ b/include/vm/class.h @@ -2,6 +2,7 @@ #define _VM_CLASS_H #include assert.h +#include pthread.h #include

Re: [PATCH] vm: initialize monitor fields

2009-08-01 Thread Pekka Enberg
On Thu, 2009-07-30 at 14:41 +0200, Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/object.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vm/object.c b/vm/object.c index cb69dca..1a5136a 100644 --- a/vm/object.c +++ b/vm/object.c

Re: [PATCH] jit: fix liveness analysis

2009-08-01 Thread Pekka Enberg
Hi Vegard, On Fri, 2009-07-31 at 18:12 +0200, Vegard Nossum wrote: All registers that were defined in the basic block were subtracted from the use set. This is right if the order is define, use, but it's wrong if the order is use, define. Fix this by checking if the register has already been

Re: [PATCH] jit: fix liveness analysis

2009-08-01 Thread Pekka Enberg
On Fri, 2009-07-31 at 18:12 +0200, Vegard Nossum wrote: All registers that were defined in the basic block were subtracted from the use set. This is right if the order is define, use, but it's wrong if the order is use, define. Fix this by checking if the register has already been

Re: [PATCH 1/2] jit: fix basic block splitting

2009-07-29 Thread Pekka Enberg
On Wed, 2009-07-29 at 12:15 +0200, Vegard Nossum wrote: On splitting a bb, the successors of the new bb were still pointing at the original bb. This caused the CFG to be inconsistent and subsequently also mimic stack spill/restore to do the wrong thing. This fixes the

Re: [RFC][PATCH] jit: set argument index correctly for JNI invocations

2009-07-28 Thread Pekka Enberg
Tomek Grabiec wrote: When method is a JNI method, then we add a pointer to JNI environemnt as the first argument. If method is also static, we put class's object refrence as second argument. All those arguments must be treated same as any other arguments, so they should receive indices 0 and 1

Re: [RFC][PATCH] jit: set argument index correctly for JNI invocations

2009-07-28 Thread Pekka Enberg
On Tue, 2009-07-28 at 17:53 +0300, Eduard - Gabriel Munteanu wrote: On Tue, Jul 28, 2009 at 01:52:39PM +0300, Pekka Enberg wrote: Tomek Grabiec wrote: When method is a JNI method, then we add a pointer to JNI environemnt as the first argument. If method is also static, we put class's object

Re: [PATCH 01/22] x86-64: make native_call() a stub

2009-07-26 Thread Pekka Enberg
The series has been applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH 4/4] vm: use Throwable.stackTraceString() for exception printing.

2009-07-26 Thread Pekka Enberg
On Sun, 2009-07-26 at 13:22 +0200, Tomek Grabiec wrote: Please hold on with merging this one because I noticed that for some reason Caused by: parts are not printed after this patch, which seems to be a bug in JIT. OK, I reverted the commit from master now.

Re: [PATCH 11/14] vm: introduce -native_ptr field in struct compilation_unit

2009-07-22 Thread Pekka Enberg
Hi Tomek, On Wed, 2009-07-22 at 13:03 +0200, Tomek Grabiec wrote: @@ -2024,25 +2024,16 @@ static void invoke(struct basic_block *s, struct tree_node *tree, struct compila struct insn *call_insn; void *target; - if (pthread_mutex_trylock(cu-mutex)) { - /* -

Re: [PATCH 1/2] x86: separate out bfd search of backtrace printing

2009-07-21 Thread Pekka Enberg
applied -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to

Re: [PATCH] x86: ESP and EBP are of GPR type

2009-07-21 Thread Pekka Enberg
On Tue, 2009-07-21 at 11:38 +0200, Arthur Huillet wrote: Hi, this patch fixes an actual bug. Please merge it (unlike the previous one for control flow resolving, which I intended to mark as RFC). Control flow resolving works for SubstringTest, but I prefer to send it once it's

Re: [RFC PATCH 7/9] x86-64: fix stack frame operations

2009-07-16 Thread Pekka Enberg
On Thu, 2009-07-16 at 01:20 +0200, Tomek Grabiec wrote: 2009/7/15 Eduard - Gabriel Munteanu eduard.munte...@linux360.ro: On Wed, Jul 15, 2009 at 10:53:30AM +0200, Vegard Nossum wrote: 2009/7/15 Eduard - Gabriel Munteanu eduard.munte...@linux360.ro: This fixes stack frame operations on

Re: [PATCH 2/7] jit: fix verify_correct_nesting() and add verify_no_recursion()

2009-07-15 Thread Pekka Enberg
On Tue, 2009-07-14 at 21:12 +0200, Tomek Grabiec wrote: verify_no_recursion() checks whether all call sites of given subroutine all outside its body. It's a requirement for inlining to be possible. Does this mean we won't be able to inline all subroutines and thus need support for the 'jsr' and

Re: [PATCH 1/5] vm: constify argument of bytecode read functions

2009-07-13 Thread Pekka Enberg
The series has been applied. Thanks! -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM)

Re: [PATCH 1/5] jato: improve command-line handling

2009-07-10 Thread Pekka Enberg
The series has been applied. Thanks! -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM)

Re: [RFC PATCH 5/9] Fix memory corruption in free_slot() from radix tree

2009-07-09 Thread Pekka Enberg
On Thu, 2009-07-09 at 07:17 +0300, Eduard - Gabriel Munteanu wrote: This bug affects arches where sizeof(int) != sizeof(unsigned long). The key should be unsigned long so it doesn't get truncated. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- lib/radix-tree.c |

Re: [RFC][PATCH 5/5] vm: preliminary jar-file parsing

2009-07-09 Thread Pekka Enberg
On Thu, 2009-07-09 at 01:22 +0200, Vegard Nossum wrote: This provides a recursive-descent parser for the grammar of sections, as given at: http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html The actual manifest parsing has still to be done. Signed-off-by: Vegard Nossum

Re: [PATCH 1/5] vm: constify field flag helper arguments

2009-07-09 Thread Pekka Enberg
1-4 applied, thnx! -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the

Re: [PATCH] vm: Add new classpath autodiscovery path

2009-07-08 Thread Pekka Enberg
applied -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to

Re: [PATCH 1/2] vm: set 'path.separator' to ':'

2009-07-08 Thread Pekka Enberg
On Tue, 2009-07-07 at 22:02 +0200, Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 4eb5dbc..a9eb0a7 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -106,7

Re: [PATCH 2/2] x86: fix bug in emit_jni_trampoline()

2009-07-06 Thread Pekka Enberg
On Mon, 2009-07-06 at 01:16 +0200, Tomek Grabiec wrote: We cannot overwrite a register which is not saved (ESI) because this will lead to a corruption in JIT code. The proper solution is to copy the call arguments. Signed-off-by: Tomek Grabiec tgrab...@gmail.com I'm confused. What exactly

Re: [PATCH] x86: float remainder is FREM in the HIR

2009-07-03 Thread Pekka Enberg
both patches applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] x86: implement OP_FREM

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] x86: floating point returning is now ABI conformant

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] x86: factorize code for INVOKEVIRTUAL and FINVOKEVIRTUAL

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] Makefile: remove .class files from runtime/ on 'make clean'

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] x86: factorize code for INVOKE and FINVOKE

2009-07-03 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] vm, x86: fix fixup_vtable()

2009-07-02 Thread Pekka Enberg
On Thu, 2009-07-02 at 08:24 +0200, Vegard Nossum wrote: 2009/7/2 Tomek Grabiec tgrab...@gmail.com: fixup_vtable() was using old -method_index field which is no longer valid. Signed-off-by: Tomek Grabiec tgrab...@gmail.com Acked-by: Vegard Nossum vegard.nos...@gmail.com Sorry about

Re: [PATCH] vm: initialize static fields (completely) to null

2009-07-01 Thread Pekka Enberg
On Tue, 2009-06-30 at 23:53 +0200, Vegard Nossum wrote: We need to initialize static fields to zero even before the class initializer runs (since the initializer may refer to static fields). This still needs a lot of work, but here is a preliminary fix that initializes a whole pointer

Re: [PATCH] vm: fix method vtables

2009-07-01 Thread Pekka Enberg
On Mon, 2009-06-29 at 22:58 +0200, Vegard Nossum wrote: We used to simply append the subclass' methods to the end of the vtable of the superclass. With this patch, we only append those methods which are not defined in the superclass; the methods which are defined in the superclass are

Re: [PATCH] jit: add more class/field names to tree-printer

2009-07-01 Thread Pekka Enberg
On Tue, 2009-06-30 at 09:08 +0200, Vegard Nossum wrote: 08:59 penberg_home vegard: cool. 08:59 penberg_home vegard: but doesn't that make debugging too easy? Signed-off-by: Vegard Nossum vegard.nos...@gmail.com Applied, thanks!

Re: [PATCH] vm: don't initialize preloaded classes

2009-07-01 Thread Pekka Enberg
On Tue, 2009-06-30 at 00:01 +0200, Vegard Nossum wrote: Alas, we cannot initialize these classes; the JVM spec. forbids it. Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- vm/jato.c |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/vm/jato.c

Re: [PATCH] x86: make code generated for EXPR_INVOKEVIRTUAL shorter

2009-07-01 Thread Pekka Enberg
On Mon, 2009-06-29 at 19:41 +0200, Tomek Grabiec wrote: We do not have to load object reference from stack with this instruction: mov 0(%esp), %reg Before we select the code for EXPR_INVOKEVIRTUAL code for call arguments is selected so we know what register was allocated to the argument

Re: [PATCH] jit: temporaries for mimic stack spilling are now recursively propagated

2009-07-01 Thread Pekka Enberg
On Tue, 2009-06-30 at 16:27 +0200, Arthur Huillet wrote: Hi, On Tue, 30 Jun 2009 16:04:33 +0200 Arthur Huillet arthur.huil...@free.fr wrote: please don't apply right now, I have a test that breaks. Please apply this patch, it is OK. The test wasn't. :) Applied, thanks!

Re: [PATCH 1/9] x86: added REG_MEMDISP instruction

2009-07-01 Thread Pekka Enberg
applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH 2/4] jit: add -Xtrace:invoke for tracing method invocations (v2)

2009-07-01 Thread Pekka Enberg
On Wed, 2009-07-01 at 10:38 +0200, Vegard Nossum wrote: @@ -783,6 +783,17 @@ void emit_prolog(struct buffer *buf, unsigned long nr_locals) __emit_sub_imm_reg(buf, nr_locals * sizeof(unsigned long), REG_ESP); } +void emit_trace_invoke(struct buffer *buf, + const char

Re: [PATCH] vm: fix bug in signal bottom half mechanism

2009-06-29 Thread Pekka Enberg
applied -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH 2/5] classloader: don't run clinits inside the compiler

2009-06-28 Thread Pekka Enberg
Hi Vegard, Vegard Nossum wrote: @@ -120,6 +120,14 @@ void *jit_magic_trampoline(struct compilation_unit *cu) pthread_mutex_unlock(cu-mutex); + /* XXX: + * + * 09:58 penberg but you need to be careful + * 09:58 penberg not to allow any threads to run the

Re: [PATCH 1/11] test: fix `make test` brakage

2009-06-27 Thread Pekka Enberg
Both series have been applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH 1/6] insn-selector: add dummy rules for floating-point

2009-06-27 Thread Pekka Enberg
Series applied, thanks! -- ___ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel

Re: [PATCH] run-suite: fix missing $JAVA_OPTS on cmdline

2009-06-26 Thread Pekka Enberg
On Thu, 2009-06-25 at 18:09 +0200, Vegard Nossum wrote: 2009/6/25 Arthur HUILLET arthur.huil...@free.fr: Signed-off-by: Arthur HUILLET arthur.huil...@free.fr Acked-by: Vegard Nossum vegard.nos...@gmail.com This was a left-over from: commit fd3c3475e6825e52b8d7045b96fd44bb5ae04c81

Re: [PATCH] vm/classloader: stop searching once we've found the class

2009-06-26 Thread Pekka Enberg
On Thu, 2009-06-25 at 18:17 +0200, Vegard Nossum wrote: From 721f6ad6eed965afb940158c25826a4c997cc74b Mon Sep 17 00:00:00 2001 From: Vegard Nossum vegard.nos...@gmail.com Date: Thu, 25 Jun 2009 18:14:30 +0200 Subject: [PATCH] vm/classloader: stop searching once we've found the class If we

Re: [PATCH] vm: fix slash2dots() function

2009-06-26 Thread Pekka Enberg
On Thu, 2009-06-25 at 22:30 +0200, Vegard Nossum wrote: 2009/6/25 Tomek Grabiec tgrab...@gmail.com: Signed-off-by: Tomek Grabiec tgrab...@gmail.com My mistake :-) Acked-by: Vegard Nossum vegard.nos...@gmail.com Applied, thanks!

Re: [PATCH] jit: do not use CLASS_CB macro in jit_native_trampoline()

2009-06-26 Thread Pekka Enberg
On Thu, 2009-06-25 at 23:14 +0200, Tomek Grabiec wrote: Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- jit/trampoline.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/jit/trampoline.c b/jit/trampoline.c index 1afcfbd..05f5cc6 100644 --- a/jit/trampoline.c

  1   2   >