/hg/icedtea6: 2 new changesets

gbenson at icedtea.classpath.org gbenson at icedtea.classpath.org
Fri May 7 02:52:49 PDT 2010


changeset 0e1af84bed2c in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0e1af84bed2c
author: Gary Benson <gbenson at redhat.com>
date: Fri May 07 10:49:34 2010 +0100

	Updated Zero to semi-latest upstream


changeset d5ebbabd7488 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d5ebbabd7488
author: Gary Benson <gbenson at redhat.com>
date: Fri May 07 10:51:15 2010 +0100

	Merge


diffstat:

20 files changed, 373 insertions(+), 159 deletions(-)
ChangeLog                                                    |   58 +++++
netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java   |   48 ++++
ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp        |  109 +++-------
ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp        |    4 
ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp          |    9 
ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp            |    8 
ports/hotspot/src/cpu/zero/vm/fakeStubFrame_zero.hpp         |    4 
ports/hotspot/src/cpu/zero/vm/globals_zero.hpp               |   11 -
ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp      |    8 
ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp         |    7 
ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp         |    1 
ports/hotspot/src/cpu/zero/vm/stack_zero.cpp                 |   73 ++++++
ports/hotspot/src/cpu/zero/vm/stack_zero.hpp                 |   17 +
ports/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp          |   43 +++
ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp         |   73 +++---
ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp |   11 -
ports/hotspot/src/share/vm/includeDB_shark                   |    3 
ports/hotspot/src/share/vm/includeDB_zero                    |   15 +
ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp       |    1 
ports/hotspot/src/share/vm/shark/sharkRuntime.cpp            |   29 +-

diffs (truncated from 920 to 500 lines):

diff -r 540dc0858c17 -r d5ebbabd7488 ChangeLog
--- a/ChangeLog	Wed May 05 11:28:27 2010 +0100
+++ b/ChangeLog	Fri May 07 10:51:15 2010 +0100
@@ -1,3 +1,61 @@ 2010-05-05  Gary Benson  <gbenson at redhat
+2010-05-07  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp
+	(ZeroStack::_shadow_pages_size): New field.
+	(ZeroStack::ZeroStack): Initialize the above.
+	(ZeroStack::shadow_pages_size): New method.
+	(ZeroStack::overflow_check): Likewise.
+	(ZeroStack::handle_overflow): Likewise.
+	* ports/hotspot/src/cpu/zero/vm/stack_zero.inline.hpp: New file.
+	* ports/hotspot/src/cpu/zero/vm/stack_zero.cpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp
+	(CppInterpreter::stack_overflow_imminent): Removed.
+	* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
+	(CppInterpreter::stack_overflow_imminent): Likewise.
+	(CppInterpreter::normal_entry): Use new stack overflow code.
+	(CppInterpreter::main_loop): Likewise.
+	(CppInterpreter::native_entry): Likewise.
+	(InterpreterFrame::build): Likewise.
+	* ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp
+	(EntryFrame::build): Likewise.
+	* ports/hotspot/src/cpu/zero/vm/fakeStubFrame_zero.hpp
+	(FakeStubFrame::build): Likewise.
+	* ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp
+	(InterpreterFrame::build): Likewise.
+	* ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
+	(InterpreterRuntime::slow_signature_handler): Likewise.
+	* ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp
+	(StubGenerator::call_stub): Likewise.
+	(EntryFrame::build): Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkRuntime.cpp
+	(SharkRuntime::uncommon_trap): Likewise.
+	(FakeStubFrame::build): Likewise.
+
+	* ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
+	(JavaThread::set_last_Java_frame): Refactored.
+	(JavaThread::reset_last_Java_frame): Likewise.
+
+	* ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp
+	(Disassembler::pd_instruction_alignment): Implemented.
+	(Disassembler::pd_cpu_opts): Likewise.
+
+	* ports/hotspot/src/cpu/zero/vm/globals_zero.hpp: Updated.
+	* ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp: Likewise.
+
+	* ports/hotspot/src/share/vm/includeDB_zero: Updated.
+	* ports/hotspot/src/share/vm/includeDB_shark: Likewise.
+
+	* ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp
+	(SharkDecacher::end_frame): Updated for newer HotSpot.
+
+2010-05-06  Deepak Bhole <dbhole at redhat.com>
+
+	* netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
+	(checkPermission): Allow Runtime and Security permission (for
+	putProvider.SunJCE) if initiated for an https connection.
+	(inTrustedCallChain): New method. Returns if given class/method is
+	in the call chain, and everything upto there is trusted.
+
 2010-05-05  Gary Benson  <gbenson at redhat.com>
 
 	PR icedtea/481
diff -r 540dc0858c17 -r d5ebbabd7488 netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java
--- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java	Wed May 05 11:28:27 2010 +0100
+++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java	Fri May 07 10:51:15 2010 +0100
@@ -23,10 +23,12 @@ import java.awt.event.WindowEvent;
 import java.awt.event.WindowEvent;
 import java.lang.ref.WeakReference;
 import java.net.SocketPermission;
+import java.security.AllPermission;
 import java.security.AccessControlException;
 import java.security.AccessController;
 import java.security.Permission;
 import java.security.PrivilegedAction;
+import java.security.SecurityPermission;;
 import java.util.PropertyPermission;
 
 import javax.swing.JWindow;
@@ -395,6 +397,24 @@ class JNLPSecurityManager extends Securi
 				    // Everything else is denied
 				    throw se;
 
+				} else if (perm instanceof SecurityPermission) {
+
+				    // JCE's initialization requires putProviderProperty permission
+				    if (perm.equals(new SecurityPermission("putProviderProperty.SunJCE"))) {
+				        if (inTrustedCallChain("com.sun.crypto.provider.SunJCE", "run")) {
+				            return;
+				        }
+				    }
+
+				} else if (perm instanceof RuntimePermission) {
+
+				    // KeyGenerator's init method requires internal spec access
+				    if (perm.equals(new SecurityPermission("accessClassInPackage.sun.security.internal.spec"))) {
+				        if (inTrustedCallChain("javax.crypto.KeyGenerator", "init")) {
+				            return;
+				        }
+				    }
+
 				} else {
 				    tmpPerm = perm;
 				}
@@ -419,6 +439,34 @@ class JNLPSecurityManager extends Securi
         }
     }
 
+    /** 
+     * Returns weather the given class and method are in the current stack, 
+     * and whether or not everything upto then is trusted
+     * 
+     * @param className The name of the class to look for in the stack
+     * @param methodName The name of the method for the given class to look for in the stack
+     * @return Weather or not class::method() are in the chain, and everything upto there is trusted
+     */
+    private boolean inTrustedCallChain(String className, String methodName) {
+        
+        StackTraceElement[] stack =  Thread.currentThread().getStackTrace();
+        
+        for (int i=0; i < stack.length; i++) {
+
+            // Everything up to the desired class/method must be trusted
+            if (!stack[i].getClass().getProtectionDomain().implies(new AllPermission())) {
+                return false;
+            }
+
+            if (stack[i].getClassName().equals(className) &&
+                stack[i].getMethodName().equals(methodName)) {
+                return true;
+            }
+        }
+        
+        return false;
+    }
+    
     /**
      * Asks the user whether or not to grant permission.
      * @param perm the permission to be granted
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri May 07 10:51:15 2010 +0100
@@ -39,21 +39,9 @@
 
 void CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) {
   JavaThread *thread = (JavaThread *) THREAD;
-  ZeroStack *stack = thread->zero_stack();
-
-  // Adjust the caller's stack frame to accomodate any additional
-  // local variables we have contiguously with our parameters.
-  int extra_locals = method->max_locals() - method->size_of_parameters();
-  if (extra_locals > 0) {
-    if (extra_locals > stack->available_words()) {
-      Unimplemented();
-    }
-    for (int i = 0; i < extra_locals; i++)
-      stack->push(0);
-  }
 
   // Allocate and initialize our frame.
-  InterpreterFrame *frame = InterpreterFrame::build(stack, method, thread);
+  InterpreterFrame *frame = InterpreterFrame::build(method, CHECK);
   thread->push_zero_frame(frame);
 
   // Execute those bytecodes!
@@ -75,12 +63,6 @@ void CppInterpreter::main_loop(int recur
 
   intptr_t *result = NULL;
   int result_slots = 0;
-
-  // Check we're not about to run out of stack
-  if (stack_overflow_imminent(thread)) {
-    CALL_VM_NOCHECK(InterpreterRuntime::throw_StackOverflowError(thread));
-    goto unwind_and_return;
-  }
 
   while (true) {
     // We can set up the frame anchor with everything we want at
@@ -123,9 +105,9 @@ void CppInterpreter::main_loop(int recur
       int monitor_words = frame::interpreter_frame_monitor_size();
 
       // Allocate the space
-      if (monitor_words > stack->available_words()) {
-        Unimplemented();
-      }
+      stack->overflow_check(monitor_words, THREAD);
+      if (HAS_PENDING_EXCEPTION)
+        break;
       stack->alloc(monitor_words * wordSize);
 
       // Move the expression stack contents
@@ -172,8 +154,6 @@ void CppInterpreter::main_loop(int recur
     }
   }
 
- unwind_and_return:
-
   // Unwind the current frame
   thread->pop_zero_frame();
 
@@ -193,16 +173,10 @@ void CppInterpreter::native_entry(method
   ZeroStack *stack = thread->zero_stack();
 
   // Allocate and initialize our frame
-  InterpreterFrame *frame = InterpreterFrame::build(stack, method, thread);
+  InterpreterFrame *frame = InterpreterFrame::build(method, CHECK);
   thread->push_zero_frame(frame);
   interpreterState istate = frame->interpreter_state();
   intptr_t *locals = istate->locals();
-
-  // Check we're not about to run out of stack
-  if (stack_overflow_imminent(thread)) {
-    CALL_VM_NOCHECK(InterpreterRuntime::throw_StackOverflowError(thread));
-    goto unwind_and_return;
-  }
 
   // Update the invocation counter
   if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) {
@@ -264,9 +238,10 @@ void CppInterpreter::native_entry(method
   assert(function != NULL, "should be set if signature handler is");
 
   // Build the argument list
-  if (handler->argument_count() * 2 > stack->available_words()) {
-    Unimplemented();
-  }
+  stack->overflow_check(handler->argument_count() * 2, THREAD);
+  if (HAS_PENDING_EXCEPTION)
+    goto unlock_unwind_and_return;
+
   void **arguments;
   void *mirror; {
     arguments =
@@ -503,9 +478,7 @@ void CppInterpreter::accessor_entry(meth
   switch (entry->flag_state()) {
   case ltos:
   case dtos:
-    if (stack->available_words() < 1) {
-      Unimplemented();
-    }
+    stack->overflow_check(1, CHECK);
     stack->alloc(wordSize);
     break;
   }
@@ -601,39 +574,30 @@ void CppInterpreter::empty_entry(methodO
   stack->set_sp(stack->sp() + method->size_of_parameters());
 }
 
-bool CppInterpreter::stack_overflow_imminent(JavaThread *thread) {
-  // How is the ABI stack?
-  address stack_top = thread->stack_base() - thread->stack_size();
-  int free_stack = os::current_stack_pointer() - stack_top;
-  if (free_stack < StackShadowPages * os::vm_page_size()) {
-    return true;
+InterpreterFrame *InterpreterFrame::build(const methodOop method, TRAPS) {
+  JavaThread *thread = (JavaThread *) THREAD;
+  ZeroStack *stack = thread->zero_stack();
+
+  // Calculate the size of the frame we'll build, including
+  // any adjustments to the caller's frame that we'll make.
+  int extra_locals  = 0;
+  int monitor_words = 0;
+  int stack_words   = 0;
+
+  if (!method->is_native()) {
+    extra_locals = method->max_locals() - method->size_of_parameters();
+    stack_words  = method->max_stack();
   }
+  if (method->is_synchronized()) {
+    monitor_words = frame::interpreter_frame_monitor_size();
+  }
+  stack->overflow_check(
+    extra_locals + header_words + monitor_words + stack_words, CHECK_NULL);
 
-  // How is the Zero stack?
-  // Throwing a StackOverflowError involves a VM call, which means
-  // we need a frame on the stack.  We should be checking here to
-  // ensure that methods we call have enough room to install the
-  // largest possible frame, but that's more than twice the size
-  // of the entire Zero stack we get by default, so we just check
-  // we have *some* space instead...
-  free_stack = thread->zero_stack()->available_words() * wordSize;
-  if (free_stack < StackShadowPages * os::vm_page_size()) {
-    return true;
-  }
-
-  return false;
-}
-
-InterpreterFrame *InterpreterFrame::build(ZeroStack*       stack,
-                                          const methodOop  method,
-                                          JavaThread*      thread) {
-  int monitor_words =
-    method->is_synchronized() ? frame::interpreter_frame_monitor_size() : 0;
-  int stack_words = method->is_native() ? 0 : method->max_stack();
-
-  if (header_words + monitor_words + stack_words > stack->available_words()) {
-    Unimplemented();
-  }
+  // Adjust the caller's stack frame to accomodate any additional
+  // local variables we have contiguously with our parameters.
+  for (int i = 0; i < extra_locals; i++)
+    stack->push(0);
 
   intptr_t *locals;
   if (method->is_native())
@@ -819,14 +783,13 @@ InterpreterGenerator::InterpreterGenerat
 
 // Deoptimization helpers
 
-InterpreterFrame *InterpreterFrame::build(ZeroStack* stack, int size) {
+InterpreterFrame *InterpreterFrame::build(int size, TRAPS) {
+  ZeroStack *stack = ((JavaThread *) THREAD)->zero_stack();
+
   int size_in_words = size >> LogBytesPerWord;
   assert(size_in_words * wordSize == size, "unaligned");
   assert(size_in_words >= header_words, "too small");
-
-  if (size_in_words > stack->available_words()) {
-    Unimplemented();
-  }
+  stack->overflow_check(size_in_words, CHECK_NULL);
 
   stack->push(0); // next_frame, filled in later
   intptr_t *fp = stack->sp();
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -39,9 +39,5 @@
   static void main_loop(int recurse, TRAPS);
 
  private:
-  // Stack overflow checks
-  static bool stack_overflow_imminent(JavaThread *thread);
-
- private:
   // Fast result type determination
   static BasicType result_type_of(methodOop method);
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright 2003 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2007, 2010 Red Hat, Inc.
+ * Copyright 2007 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,13 @@
  *
  */
 
+// The disassembler prints out zero code annotated
+// with Java specific information.
+
   static int pd_instruction_alignment() {
-    return 1;
+    ShouldNotCallThis();
   }
 
   static const char* pd_cpu_opts() {
-    return "";
+    ShouldNotCallThis();
   }
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2008 Red Hat, Inc.
+ * Copyright 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,10 +47,10 @@ class EntryFrame : public ZeroFrame {
   };
 
  public:
-  static EntryFrame *build(ZeroStack*       stack,
-                           const intptr_t*  parameters,
+  static EntryFrame *build(const intptr_t*  parameters,
                            int              parameter_words,
-                           JavaCallWrapper* call_wrapper);
+                           JavaCallWrapper* call_wrapper,
+                           TRAPS);
  public:
   JavaCallWrapper *call_wrapper() const {
     return (JavaCallWrapper *) value_of_word(call_wrapper_off);
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/fakeStubFrame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/fakeStubFrame_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/fakeStubFrame_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2008 Red Hat, Inc.
+ * Copyright 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,7 +42,7 @@ class FakeStubFrame : public ZeroFrame {
   };
 
  public:
-  static FakeStubFrame *build(ZeroStack* stack);
+  static FakeStubFrame *build(TRAPS);
 
  public:
   void identify_word(int   frame_index,
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/globals_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/globals_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/globals_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -35,17 +35,8 @@ define_pd_global(bool,  UncommonNullCast
 define_pd_global(bool,  UncommonNullCast,     true);
 
 define_pd_global(intx,  CodeEntryAlignment,   32);
-define_pd_global(uintx, TLABSize,             0);
-#ifdef _LP64
-define_pd_global(uintx, NewSize,              ScaleForWordSize(2048 * K));
-#else
-define_pd_global(uintx, NewSize,              ScaleForWordSize(1024 * K));
-#endif // _LP64
+define_pd_global(intx,  OptoLoopAlignment,    16);
 define_pd_global(intx,  InlineFrequencyCount, 100);
-#ifdef SHARK
-// Only required for older HotSpot versions
-define_pd_global(intx,  InlineSmallCode,      1000);
-#endif // SHARK
 define_pd_global(intx,  PreInflateSpin,       10);
 
 define_pd_global(intx,  StackYellowPages,     2);
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2008 Red Hat, Inc.
+ * Copyright 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,10 +55,8 @@ class InterpreterFrame : public ZeroFram
   };
 
  public:
-  static InterpreterFrame *build(ZeroStack*      stack,
-                                 const methodOop method,
-                                 JavaThread*     thread);
-  static InterpreterFrame *build(ZeroStack* stack, int size);
+  static InterpreterFrame *build(const methodOop method, TRAPS);
+  static InterpreterFrame *build(int size, TRAPS);
 
  public:
   interpreterState interpreter_state() const {
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp	Fri May 07 10:51:15 2010 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2007, 2008 Red Hat, Inc.
+ * Copyright 2007, 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -140,9 +140,8 @@ IRT_ENTRY(address,
   int required_words =
     (align_size_up(sizeof(ffi_cif), wordSize) >> LogBytesPerWord) +
     (method->is_static() ? 2 : 1) + method->size_of_parameters() + 1;
-  if (required_words > stack->available_words()) {
-    Unimplemented();
-  }
+
+  stack->overflow_check(required_words, CHECK_NULL);
 
   intptr_t *buf = (intptr_t *) stack->alloc(required_words * wordSize);
   SlowSignatureHandlerGenerator sshg(methodHandle(thread, method), buf);
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	Wed May 05 11:28:27 2010 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	Fri May 07 10:51:15 2010 +0100
@@ -47,6 +47,7 @@ define_pd_global(intx,     Tier4BackEdge
 
 define_pd_global(intx,     OnStackReplacePercentage,     933  );
 define_pd_global(intx,     FreqInlineSize,               325  );
+define_pd_global(intx,     InlineSmallCode,              1000 );
 define_pd_global(intx,     NewRatio,                     12   );
 define_pd_global(intx,     NewSizeThreadIncrease,        4*K  );
 define_pd_global(intx,     InitialCodeCacheSize,         160*K);
diff -r 540dc0858c17 -r d5ebbabd7488 ports/hotspot/src/cpu/zero/vm/stack_zero.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ports/hotspot/src/cpu/zero/vm/stack_zero.cpp	Fri May 07 10:51:15 2010 +0100
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2003-2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2010 Red Hat, Inc.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *



More information about the distro-pkg-dev mailing list