harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r563557 - in /harmony/enhanced/drlvm/trunk: build/make/excludes/ vm/jitrino/src/codegenerator/ia32/ vm/port/src/lil/em64t/pim/ vm/vmcore/include/ vm/vmcore/src/exception/ vm/vmcore/src/jit/ vm/vmcore/src/util/linux/ vm/vmcore/src/util/win/i...
Date Tue, 07 Aug 2007 17:04:08 GMT
Author: gshimansky
Date: Tue Aug  7 10:04:04 2007
New Revision: 563557

URL: http://svn.apache.org/viewvc?view=rev&rev=563557
Log:
Applied patch from HARMONY-4264
[drlvm][stack] Tune size requred for set up guard page, class loading and method compilation.


Modified:
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jet
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jit
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.srv
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jet
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jit
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.srv
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jet
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jit
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.srv
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jet
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jit
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
    harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
    harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/stack_iterator_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jet
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jet?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jet (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jet Tue
Aug  7 10:04:04 2007
@@ -7,6 +7,9 @@
 # HARMONY-3495 hangs intermittently
 gc/NPE.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jit
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jit?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jit (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.jit Tue
Aug  7 10:04:04 2007
@@ -7,6 +7,9 @@
 # HARMONY-3495 hangs intermittently
 gc/NPE.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.opt Tue
Aug  7 10:04:04 2007
@@ -7,6 +7,9 @@
 # HARMONY-3495 hangs intermittently
 gc/NPE.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.srv
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.srv?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.srv (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86.srv Tue
Aug  7 10:04:04 2007
@@ -7,8 +7,8 @@
 # HARMONY-3495 hangs intermittently
 gc/NPE.java
 
-# HARMONY-3731
-StackTest.java
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
 
 # HARMONY-3917
 gc/PhantomReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jet
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jet?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jet
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jet
Tue Aug  7 10:04:04 2007
@@ -6,16 +6,14 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-2972
-StackTest.java
-exception/FinalizeStackTest.java
-stress/Stack.java
-
 # fails on Ubuntu6 x86_64
 gc/Mark.java
 
 # HARMONY-2772 fails intermittently 
 stress/Mix.java
+
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
 
 # HARMONY-3495 hangs intermittently
 gc/NPE.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jit
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jit?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jit
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.jit
Tue Aug  7 10:04:04 2007
@@ -6,16 +6,14 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-2972
-StackTest.java
-exception/FinalizeStackTest.java
-stress/Stack.java
-
 # fails on Ubuntu6 x86_64
 gc/Mark.java
 
 # HARMONY-2772 fails intermittently 
 stress/Mix.java
+
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
 
 # HARMONY-3495 hangs intermittently
 gc/NPE.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.opt
Tue Aug  7 10:04:04 2007
@@ -6,16 +6,14 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-2972
-StackTest.java
-exception/FinalizeStackTest.java
-stress/Stack.java
-
 # fails on Ubuntu6 x86_64
 gc/Mark.java
 
 # HARMONY-2772 
 stress/Mix.java
+
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
 
 # HARMONY-3299 intermittent
 stress/Sync.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.srv
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.srv?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.srv
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.linux.x86_64.srv
Tue Aug  7 10:04:04 2007
@@ -6,16 +6,14 @@
 gc/MultiThreads.java
 perf/MultiThreadsSimple.java
 
-# HARMONY-2972
-StackTest.java
-exception/FinalizeStackTest.java
-stress/Stack.java
-
 # fails on Ubuntu6 x86_64
 gc/Mark.java
 
 # HARMONY-2772 
 stress/Mix.java
+
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
 
 # HARMONY-3299 intermittent
 stress/Sync.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jet
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jet?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jet (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jet Tue
Aug  7 10:04:04 2007
@@ -4,6 +4,9 @@
 # HARMONY-2977
 io/Integers.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jit
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jit?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jit (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.jit Tue
Aug  7 10:04:04 2007
@@ -4,6 +4,9 @@
 # HARMONY-2977
 io/Integers.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.opt Tue
Aug  7 10:04:04 2007
@@ -4,6 +4,9 @@
 # HARMONY-2977
 io/Integers.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.srv
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.srv?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.srv (original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86.srv Tue
Aug  7 10:04:04 2007
@@ -4,8 +4,8 @@
 # HARMONY-2977
 io/Integers.java
 
-# HARMONY-3731
-StackTest.java
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
 
 # HARMONY-3917
 gc/PhantomReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jet
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jet?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jet
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jet
Tue Aug  7 10:04:04 2007
@@ -9,6 +9,9 @@
 # HARMONY-2977
 io/Integers.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jit
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jit?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jit
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.jit
Tue Aug  7 10:04:04 2007
@@ -14,6 +14,9 @@
 # HARMONY-2977
 io/Integers.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.opt
Tue Aug  7 10:04:04 2007
@@ -11,6 +11,9 @@
 exception/FinalizeStackTest.java
 stress/Stack.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # HARMONY-3917
 gc/PhantomReferenceTest.java
 gc/WeakReferenceTest.java

Modified: harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
(original)
+++ harmony/enhanced/drlvm/trunk/build/make/excludes/exclude.drlvm_smoke.windows.x86_64.srv
Tue Aug  7 10:04:04 2007
@@ -11,6 +11,9 @@
 exception/FinalizeStackTest.java
 stress/Stack.java
 
+# HARMONY-3010 HARMONY-4292
+stress/Stack.java
+
 # Server mode failures specific to Windows x86_64
 stress/Mix.java
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32StackInfo.cpp Tue Aug
 7 10:04:04 2007
@@ -213,43 +213,46 @@
             <<::std::endl;
     }
 
-    assert(!(context->rsp & 15));
     context->rsp += stackDepth;
+    assert((context->rsp & 0xf) == 0x8);
 
     POINTER_SIZE_INT offset = context->rsp;
     context->p_rip = (POINTER_SIZE_INT *) (offset);
 
-    offset += icalleeOffset; 
-    if(getRegMask(RegName_R15) & icalleeMask) {
-        context->p_r15 = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_R14) & icalleeMask) {
-        context->p_r14 = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_R13) & icalleeMask) {
-        context->p_r13 = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_R12) & icalleeMask) {
-        context->p_r12 = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_RDI) & icalleeMask) {
-        context->p_rdi = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_RSI) & icalleeMask) {
-        context->p_rsi = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_RBP) & icalleeMask) {
-        context->p_rbp = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_RBX) & icalleeMask) {
-        context->p_rbx = (POINTER_SIZE_INT *)  offset;
+    offset += icalleeOffset;
+
+    if(stackDepth != 0) {
+        if(getRegMask(RegName_R15) & icalleeMask) {
+            context->p_r15 = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_R14) & icalleeMask) {
+            context->p_r14 = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_R13) & icalleeMask) {
+            context->p_r13 = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_R12) & icalleeMask) {
+            context->p_r12 = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_RDI) & icalleeMask) {
+            context->p_rdi = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_RSI) & icalleeMask) {
+            context->p_rsi = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_RBP) & icalleeMask) {
+            context->p_rbp = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_RBX) & icalleeMask) {
+            context->p_rbx = (POINTER_SIZE_INT *)  offset;
+        }
     }
     context->rsp += offset_step; //IP register size
 #else
@@ -265,21 +268,23 @@
     uint32 offset = context->esp;
     context->p_eip = (POINTER_SIZE_INT *) offset;
 
-    offset += icalleeOffset; 
-    if(getRegMask(RegName_EDI) & icalleeMask) {
-        context->p_edi = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_ESI) & icalleeMask) {
-        context->p_esi = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_EBP) & icalleeMask) {
-        context->p_ebp = (POINTER_SIZE_INT *)  offset;
-        offset += offset_step;
-    }
-    if(getRegMask(RegName_EBX) & icalleeMask) {
-        context->p_ebx = (POINTER_SIZE_INT *)  offset;
+    offset += icalleeOffset;
+    if(stackDepth != 0) {
+        if(getRegMask(RegName_EDI) & icalleeMask) {
+            context->p_edi = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_ESI) & icalleeMask) {
+            context->p_esi = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_EBP) & icalleeMask) {
+            context->p_ebp = (POINTER_SIZE_INT *)  offset;
+            offset += offset_step;
+        }
+        if(getRegMask(RegName_EBX) & icalleeMask) {
+            context->p_ebx = (POINTER_SIZE_INT *)  offset;
+        }
     }
     context->esp += offset_step; //IP register size
 #endif

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/stack_iterator_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/stack_iterator_em64t.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/stack_iterator_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/lil/em64t/pim/stack_iterator_em64t.cpp Tue Aug
 7 10:04:04 2007
@@ -495,7 +495,8 @@
 }
 
 void si_set_callback(StackIterator* si, NativeCodePtr* callback) {
-    si->jit_frame_context.rsp = si->jit_frame_context.rsp - 4;
+    const static uint64 red_zone_size = 0x80;
+    si->jit_frame_context.rsp = si->jit_frame_context.rsp - red_zone_size - sizeof(void*);
     *((uint64*) si->jit_frame_context.rsp) = *(si->jit_frame_context.p_rip);
     si->jit_frame_context.p_rip = ((uint64*)callback);
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions.h?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/exceptions.h Tue Aug  7 10:04:04 2007
@@ -270,6 +270,7 @@
 void exn_rethrow_if_pending();
 
 void set_guard_stack();
+void remove_guard_stack();
 void init_stack_info();
 #ifndef WIN32
 void remove_guard_stack();

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp Tue Aug  7 10:04:04
2007
@@ -158,7 +158,12 @@
         tmn_suspend_enable();
         jthrowable exc_object = create_exception(
             (Class*) exn_class, (Method*) exn_constr, vm_exn_constr_args);
-        result = exc_object->object;
+
+        if (exc_object) {
+            result = exc_object->object;
+        } else {
+            result = NULL;
+        }
         tmn_suspend_disable();
     }
     set_unwindable(unwindable);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp Tue Aug  7 10:04:04 2007
@@ -747,11 +747,9 @@
     } else if (method->get_state()==Method::ST_NotCompiled && exn_raised()) {
         method->unlock();
         return JIT_FAILURE;
-#ifndef _EM64T_	
-    } else if(!check_available_stack_size(get_default_stack_size()/100)) {
+    } else if(!check_available_stack_size(0x4000)) {
         method->unlock();
         return JIT_FAILURE;
-#endif
     }
 
     if (method->is_native()) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_em64t.cpp Tue Aug  7 10:04:04
2007
@@ -137,6 +137,21 @@
         : /* no output operands */
         : /* no input operands */
     );
+#ifdef _DEBUG
+    asm (
+        "movq %%rbp, %%rsp\n"
+        "popq %%rbp\n"
+        "retq $0x80;\n"
+        : /* no output operands */
+        : /* no input operands */
+    );
+#else // _DEBUG
+    asm (
+        "retq $0x80;\n"
+        : /* no output operands */
+        : /* no input operands */
+    );
+#endif // ! _DEBUG}
 }
 
 // exception catch support for JVMTI
@@ -291,11 +306,42 @@
 void set_guard_stack();
 
 void init_stack_info() {
-    p_TLS_vmthread->stack_addr = find_stack_addr();
-    p_TLS_vmthread->stack_size = hythread_get_thread_stacksize(hythread_self());
+    char* stack_addr = (char *)find_stack_addr();
+    unsigned int stack_size = hythread_get_thread_stacksize(hythread_self());
+    p_TLS_vmthread->stack_addr = stack_addr;
+    p_TLS_vmthread->stack_size = stack_size;
     common_guard_stack_size = find_guard_stack_size();
     common_guard_page_size =find_guard_page_size();
 
+    // stack should be mapped so it's result of future mapping
+    char* res;
+
+    // begin of the stack can be protected by OS, but this part already mapped
+    // found address of current stack page
+    char* current_page_addr =
+            (char*)(((size_t)&res) & (~(common_guard_page_size-1)));
+
+    // leave place for mmap work
+    char* mapping_page_addr = current_page_addr - common_guard_page_size;
+
+    // makes sure that stack allocated till mapping_page_addr
+    //stack_holder(mapping_page_addr);
+
+    // found size of the stack area which should be maped
+    size_t stack_mapping_size = (size_t)mapping_page_addr
+            - (size_t)stack_addr + stack_size;
+
+    // maps unmapped part of the stack
+    res = (char*) mmap(stack_addr - stack_size,
+            stack_mapping_size,
+            PROT_READ | PROT_WRITE,
+            MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS | MAP_GROWSDOWN,
+            -1,
+            0);
+    // stack should be mapped, checks result
+    assert(res == (stack_addr - stack_size));
+
+    // set guard page
     set_guard_stack();
 }
 
@@ -306,6 +352,9 @@
     size_t guard_stack_size = get_guard_stack_size();
     size_t guard_page_size = get_guard_page_size();
 
+    assert(((size_t)(&stack_addr)) > ((size_t)((char*)stack_addr - stack_size
+        + guard_stack_size + 2 * guard_page_size)));
+
     err = mprotect(stack_addr - stack_size + guard_page_size + guard_stack_size,
         guard_page_size, PROT_NONE);
 
@@ -320,16 +369,31 @@
 }
 
 size_t get_available_stack_size() {
-    char* stack_adrr = (char*) get_stack_addr();
-    size_t used_stack_size = stack_adrr - ((char*)&stack_adrr);
-    size_t available_stack_size =
-            get_stack_size() - used_stack_size
+    char* stack_addr = (char*) get_stack_addr();
+    size_t used_stack_size = stack_addr - ((char*)&stack_addr);
+    int available_stack_size;
+
+    if (((char*)&stack_addr) > (stack_addr - get_stack_size() + get_guard_page_size()
+ get_guard_stack_size())) {
+        available_stack_size = get_stack_size() - used_stack_size
             - 2 * get_guard_page_size() - get_guard_stack_size();
-    return available_stack_size;
+    } else {
+        available_stack_size = get_stack_size() - used_stack_size - get_guard_page_size();
+    }
+
+    if (available_stack_size > 0) {
+        return (size_t) available_stack_size;
+    } else {
+        return 0;
+    }
 }
 
 bool check_available_stack_size(size_t required_size) {
-    if (get_available_stack_size() < required_size) {
+    size_t available_stack_size = get_available_stack_size();
+
+    if (available_stack_size < required_size) {
+        if (available_stack_size < get_guard_stack_size()) {
+            remove_guard_stack();
+        }
         Global_Env *env = VM_Global_State::loader_env;
         exn_raise_by_class(env->java_lang_StackOverflowError_Class);
         return false;
@@ -339,7 +403,7 @@
 }
 
 size_t get_restore_stack_size() {
-    return 0x8000;
+    return 0x0800;
 }
 
 bool check_stack_size_enough_for_exception_catch(void* sp) {
@@ -379,6 +443,10 @@
 
     char* guard_page_begin = stack_addr - stack_size + guard_page_size + guard_stack_size;
     char* guard_page_end = guard_page_begin + guard_page_size;
+
+    // FIXME: Workaround for main thread
+    guard_page_end += guard_page_size;
+
     char* fault_addr = (char*)(info->si_addr);
     //char* esp_value = (char*)(uc->uc_mcontext.gregs[REG_ESP]);
 
@@ -410,7 +478,6 @@
         } else {
             remove_guard_stack();
             exn_raise_by_class(env->java_lang_StackOverflowError_Class);
-            p_TLS_vmthread->restore_guard_page = true;
         }
     }
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ia32.cpp Tue Aug  7 10:04:04
2007
@@ -391,6 +391,9 @@
     size_t guard_stack_size = get_guard_stack_size();
     size_t guard_page_size = get_guard_page_size();
 
+    assert(((size_t)(&stack_addr)) > ((size_t)((char*)stack_addr - stack_size
+        + guard_stack_size + 2 * guard_page_size)));
+
     err = mprotect(stack_addr - stack_size  + guard_page_size +  
             guard_stack_size, guard_page_size, PROT_NONE );
 
@@ -409,19 +412,34 @@
 }
 
 size_t get_available_stack_size() {
-    char* stack_adrr = (char*) get_stack_addr();
-    size_t used_stack_size = stack_adrr - ((char*)&stack_adrr);
-    size_t available_stack_size =
-            get_stack_size() - used_stack_size
+    char* stack_addr = (char*) get_stack_addr();
+    size_t used_stack_size = stack_addr - ((char*)&stack_addr);
+    int available_stack_size;
+
+    if (((char*)&stack_addr) > (stack_addr - get_stack_size() + get_guard_page_size()
+ get_guard_stack_size())) {
+        available_stack_size = get_stack_size() - used_stack_size
             - 2 * get_guard_page_size() - get_guard_stack_size();
-    return available_stack_size;
+    } else {
+        available_stack_size = get_stack_size() - used_stack_size - get_guard_page_size();
+    }
+
+    if (available_stack_size > 0) {
+        return (size_t) available_stack_size;
+    } else {
+        return 0;
+    }
 }
 size_t get_default_stack_size() {
     size_t default_stack_size = get_stack_size();
     return default_stack_size;
 }
 bool check_available_stack_size(size_t required_size) {
-    if (get_available_stack_size() < required_size) {
+    size_t available_stack_size = get_available_stack_size();
+
+    if (available_stack_size < required_size) {
+        if (available_stack_size < get_guard_stack_size()) {
+            remove_guard_stack();
+        }
         Global_Env *env = VM_Global_State::loader_env;
         exn_raise_by_class(env->java_lang_StackOverflowError_Class);
         return false;
@@ -431,7 +449,7 @@
 }
 
 size_t get_restore_stack_size() {
-    return 0x8000;
+    return 0x0200;
 }
 
 bool check_stack_size_enough_for_exception_catch(void* sp) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp Tue Aug  7 10:04:04
2007
@@ -273,6 +273,9 @@
     size_t guard_stack_size = get_guard_stack_size();
     size_t guard_page_size = get_guard_page_size();
 
+    assert(((size_t)(&stack_addr)) > ((size_t)((char*)stack_addr - stack_size
+        + guard_stack_size + 2 * guard_page_size)));
+
     // map the guard page and protect it
     void UNUSED *res = mmap(stack_addr - stack_size + guard_page_size +
     guard_stack_size, guard_page_size,  PROT_READ | PROT_WRITE,
@@ -304,12 +307,22 @@
 }
 
 size_t get_available_stack_size() {
-    char* stack_adrr = (char*) get_stack_addr();
-    size_t used_stack_size = stack_adrr - ((char*)&stack_adrr);
-    size_t available_stack_size =
-            get_stack_size() - used_stack_size
+    char* stack_addr = (char*) get_stack_addr();
+    size_t used_stack_size = stack_addr - ((char*)&stack_addr);
+    int available_stack_size;
+
+    if (((char*)&stack_addr) > (stack_addr - get_stack_size() + get_guard_page_size()
+ get_guard_stack_size())) {
+        available_stack_size = get_stack_size() - used_stack_size
             - 2 * get_guard_page_size() - get_guard_stack_size();
-    return available_stack_size;
+    } else {
+        available_stack_size = get_stack_size() - used_stack_size - get_guard_page_size();
+    }
+
+    if (available_stack_size > 0) {
+        return (size_t) available_stack_size;
+    } else {
+        return 0;
+    }
 }
 
 size_t get_default_stack_size() {
@@ -318,7 +331,12 @@
 }
 
 bool check_available_stack_size(size_t required_size) {
-    if (get_available_stack_size() < required_size) {
+    size_t available_stack_size = get_available_stack_size();
+
+    if (available_stack_size < required_size) {
+        if (available_stack_size < get_guard_stack_size()) {
+            remove_guard_stack();
+        }
         exn_raise_by_name("java/lang/StackOverflowError");
         return false;
     } else {
@@ -327,7 +345,7 @@
 }
 
 size_t get_restore_stack_size() {
-    return 0x8000;
+    return 0x0200;
 }
 
 bool check_stack_size_enough_for_exception_catch(void* sp) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp?view=diff&rev=563557&r1=563556&r2=563557
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/win/ia32_em64t/nt_exception_filter_common.cpp
Tue Aug  7 10:04:04 2007
@@ -156,6 +156,7 @@
     void* stack_addr = get_stack_addr();
     size_t stack_size = get_stack_size();
     size_t page_size = get_guard_page_size();
+    assert(((size_t)(&stack_addr)) > ((size_t)((char*)stack_addr - stack_size + 3
* page_size)));
 
     if (!VirtualFree((char*)stack_addr - stack_size + page_size,
         page_size, MEM_DECOMMIT)) {
@@ -174,20 +175,45 @@
     p_TLS_vmthread->restore_guard_page = false;
 }
 
+void remove_guard_stack() {
+    void* stack_addr = get_stack_addr();
+    size_t stack_size = get_stack_size();
+    size_t page_size = get_guard_page_size();
+    DWORD oldProtect;
+
+    assert(((size_t)(&stack_addr)) > ((size_t)((char*)stack_addr - stack_size + 3
* page_size)));
+    p_TLS_vmthread->restore_guard_page = true;
+
+    if (!VirtualProtect((char*)stack_addr - stack_size + page_size + page_size,
+        page_size, PAGE_READWRITE, &oldProtect)) {
+        // should be successful always
+        assert(0);
+    }
+}
+
 size_t get_available_stack_size() {
-    char* stack_adrr = (char*) get_stack_addr();
-    size_t used_stack_size = ((size_t)stack_adrr) - ((size_t)(&stack_adrr));
-    size_t available_stack_size =
+    char* stack_addr = (char*) get_stack_addr();
+    size_t used_stack_size = ((size_t)stack_addr) - ((size_t)(&stack_addr));
+    int available_stack_size =
             get_stack_size() - used_stack_size
             - 2 * get_guard_page_size() - get_guard_stack_size();
-    return available_stack_size;
+
+    if (available_stack_size > 0) {
+        return (size_t) available_stack_size;
+    } else {
+        return 0;
+    }
 }
 size_t get_default_stack_size() {
     size_t default_stack_size = get_stack_size();
     return default_stack_size;
 }
 bool check_available_stack_size(size_t required_size) {
-    if (get_available_stack_size() < required_size) {
+    size_t available_stack_size = get_available_stack_size();
+    if (available_stack_size < required_size) {
+        if (available_stack_size < get_guard_stack_size()) {
+            remove_guard_stack();
+        }
         Global_Env *env = VM_Global_State::loader_env;
         exn_raise_by_class(env->java_lang_StackOverflowError_Class);
         return false;
@@ -197,7 +223,7 @@
 }
 
 size_t get_restore_stack_size() {
-    return 0x8000;
+    return 0x0100;
 }
 
 bool check_stack_size_enough_for_exception_catch(void* sp) {



Mime
View raw message