changeset in /hg/icedtea6: 2008-08-12 Gary Benson <gbenson at red...

Gary Benson gbenson at redhat.com
Tue Aug 12 02:35:28 PDT 2008


changeset e8c5220a41f5 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e8c5220a41f5
description:
	2008-08-12  Gary Benson  <gbenson at redhat.com>

		* patches/icedtea-shark.patch: Updated to latest Shark.
		* ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Likewise.
		* ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise.
		* ports/hotspot/src/share/vm/includeDB_shark: Likewise.
		* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkType.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/shark_globals.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: New file.
		* ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkMethod.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise.
		* ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise.

diffstat:

35 files changed, 2671 insertions(+), 598 deletions(-)
ChangeLog                                              |   37 
patches/icedtea-shark.patch                            |   30 
ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp       |   12 
ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp  |   21 
ports/hotspot/src/cpu/zero/vm/frame_zero.cpp           |   15 
ports/hotspot/src/cpu/zero/vm/frame_zero.hpp           |    4 
ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp    |   32 
ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp     |   11 
ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp      |   21 
ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp    |   27 
ports/hotspot/src/cpu/zero/vm/stack_zero.hpp           |    3 
ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp   |    2 
ports/hotspot/src/share/vm/includeDB_shark             |   58 +
ports/hotspot/src/share/vm/shark/llvmHeaders.hpp       |   20 
ports/hotspot/src/share/vm/shark/sharkBlock.cpp        |  815 ++++++++++++----
ports/hotspot/src/share/vm/shark/sharkBlock.hpp        |   74 -
ports/hotspot/src/share/vm/shark/sharkBuilder.cpp      |  162 +--
ports/hotspot/src/share/vm/shark/sharkBuilder.hpp      |  185 ++-
ports/hotspot/src/share/vm/shark/sharkCompiler.cpp     |  172 ++-
ports/hotspot/src/share/vm/shark/sharkCompiler.hpp     |   30 
ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp |  156 +++
ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp |   70 +
ports/hotspot/src/share/vm/shark/sharkFunction.cpp     |  136 ++
ports/hotspot/src/share/vm/shark/sharkFunction.hpp     |  152 ++
ports/hotspot/src/share/vm/shark/sharkMethod.hpp       |   91 +
ports/hotspot/src/share/vm/shark/sharkMonitor.cpp      |  154 +++
ports/hotspot/src/share/vm/shark/sharkMonitor.hpp      |   92 +
ports/hotspot/src/share/vm/shark/sharkRuntime.cpp      |  209 ++++
ports/hotspot/src/share/vm/shark/sharkRuntime.hpp      |  112 ++
ports/hotspot/src/share/vm/shark/sharkState.cpp        |  194 +++
ports/hotspot/src/share/vm/shark/sharkState.hpp        |   32 
ports/hotspot/src/share/vm/shark/sharkType.cpp         |   41 
ports/hotspot/src/share/vm/shark/sharkType.hpp         |   30 
ports/hotspot/src/share/vm/shark/sharkValue.hpp        |   43 
ports/hotspot/src/share/vm/shark/shark_globals.hpp     |   26 

diffs (truncated from 4551 to 500 lines):

diff -r 7cd4d87f69f2 -r e8c5220a41f5 ChangeLog
--- a/ChangeLog	Tue Aug 12 09:37:13 2008 +0200
+++ b/ChangeLog	Tue Aug 12 05:35:18 2008 -0400
@@ -1,3 +1,40 @@ 2008-08-12  Christian Thalinger  <twisti
+2008-08-12  Gary Benson  <gbenson at redhat.com>
+
+	* patches/icedtea-shark.patch: Updated to latest Shark.
+	* ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/frame_zero.cpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/frame_zero.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp: Likewise.
+	* ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp: Likewise.
+	* ports/hotspot/src/share/vm/includeDB_shark: Likewise.
+	* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkType.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/shark_globals.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp: New file.
+	* ports/hotspot/src/share/vm/shark/sharkConstantPool.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkMethod.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkMonitor.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkMonitor.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise.
+
 2008-08-12  Christian Thalinger  <twisti at complang.tuwien.ac.at>
 
 	* Makefile.am (ICEDTEA_PATCHES): Fixed typo.
diff -r 7cd4d87f69f2 -r e8c5220a41f5 patches/icedtea-shark.patch
--- a/patches/icedtea-shark.patch	Tue Aug 12 09:37:13 2008 +0200
+++ b/patches/icedtea-shark.patch	Tue Aug 12 05:35:18 2008 -0400
@@ -176,13 +176,16 @@ diff -ru openjdk/hotspot/src/share/vm/oo
 diff -ru openjdk/hotspot/src/share/vm/oops/methodOop.cpp openjdk/hotspot/src/share/vm/oops/methodOop.cpp
 --- openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-06-20 10:22:11.000000000 +0100
 +++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-04-15 10:52:44.000000000 +0100
-@@ -733,7 +733,11 @@
+@@ -730,10 +730,14 @@ void methodOopDesc::set_code(methodHandl
+   }
+ 
+   OrderAccess::storestore();
++#ifdef SHARK
++  mh->_from_interpreted_entry = SharkMethod::mark(code->instructions_begin());
++#else
    mh->_from_compiled_entry = code->verified_entry_point();
    OrderAccess::storestore();
    // Instantly compiled code can execute.
-+#ifdef SHARK
-+  mh->_from_interpreted_entry = *(address *) code->instructions_begin();
-+#else
    mh->_from_interpreted_entry = mh->get_i2c_entry();
 +#endif // SHARK
  
@@ -281,3 +284,22 @@ diff -ru openjdk/hotspot/src/share/vm/ru
  #endif // TIERED
  
  #ifndef HOTSPOT_VM_DISTRO
+diff -r ef3bb05d21d5 openjdk/hotspot/src/share/vm/code/nmethod.cpp
+--- openjdk/hotspot/src/share/vm/code/nmethod.cpp	Fri Aug 08 11:17:59 2008 +0100
++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	Fri Aug 08 11:35:04 2008 +0100
+@@ -1453,6 +1453,7 @@ void nmethod::oops_do(OopClosure* f) {
+ // Method that knows how to preserve outgoing arguments at call. This method must be
+ // called with a frame corresponding to a Java invoke
+ void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
++#ifndef SHARK
+   if (!method()->is_native()) {
+     SimpleScopeDesc ssd(this, fr.pc());
+     Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci());
+@@ -1460,6 +1461,7 @@ void nmethod::preserve_callee_argument_o
+     symbolOop signature = call->signature();
+     fr.oops_compiled_arguments_do(signature, is_static, reg_map, f);
+   }
++#endif // !SHARK
+ }
+ 
+ 
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -51,6 +51,18 @@ class MacroAssembler : public Assembler 
 
   void align(int modulus);
   void bang_stack_with_offset(int offset);
+
+#ifdef SHARK
+ public:
+  void emit_zero_byte()
+  {
+    emit_byte(0);
+  }
+  void emit_intptr(intptr_t x)
+  {
+    emit_address((address) x);
+  }
+#endif // SHARK
 };
 
 #ifdef ASSERT
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue Aug 12 05:35:18 2008 -0400
@@ -85,8 +85,7 @@ void CppInterpreter::normal_entry(method
       stack->set_sp(istate->stack() + 1);
     
       // Make the call
-      address entry_point = istate->callee_entry_point();
-      ((Interpreter::method_entry_t) entry_point) (method, THREAD);
+      Interpreter::invoke_method(method, istate->callee_entry_point(), THREAD);
       fixup_after_potential_safepoint();
 
       // Convert the result
@@ -623,11 +622,13 @@ address InterpreterGenerator::generate_a
 
 address InterpreterGenerator::generate_native_entry(bool synchronized)
 {
+  assert (synchronized == false, "should be");
   return (address) CppInterpreter::native_entry;
 }
 
 address InterpreterGenerator::generate_normal_entry(bool synchronized)
 {
+  assert (synchronized == false, "should be");
   return (address) CppInterpreter::normal_entry;
 }
 
@@ -635,14 +636,10 @@ address AbstractInterpreterGenerator::ge
     AbstractInterpreter::MethodKind kind) {
 
   address entry_point = NULL;
-  bool synchronized = false;
 
   switch (kind) {
   case Interpreter::zerolocals:
-    break;
-
   case Interpreter::zerolocals_synchronized:
-    synchronized = true;
     break;
 
   case Interpreter::native:
@@ -679,10 +676,14 @@ address AbstractInterpreterGenerator::ge
     ShouldNotReachHere();
   }
 
-  if (entry_point)
-    return entry_point;
-
-  return ((InterpreterGenerator*)this)->generate_normal_entry(false);
+  if (entry_point == NULL)
+    entry_point = ((InterpreterGenerator*)this)->generate_normal_entry(false);
+
+#ifdef SHARK
+  assert(!SharkMethod::is_shark_method(entry_point), "shouldn't be");
+#endif // SHARK
+  
+  return entry_point;
 }
 
 InterpreterGenerator::InterpreterGenerator(StubQueue* code)
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp	Tue Aug 12 05:35:18 2008 -0400
@@ -26,8 +26,6 @@
 #include "incls/_precompiled.incl"
 #include "incls/_frame_zero.cpp.incl"
 
-intptr_t frame::shark_dummy_bcx = 0;
-
 #ifdef ASSERT
 void RegisterMap::check_location_valid()
 {
@@ -37,8 +35,7 @@ void RegisterMap::check_location_valid()
 
 bool frame::is_interpreted_frame() const
 {
-  return zeroframe()->is_interpreter_frame() ||
-         zeroframe()->is_shark_frame();
+  return zeroframe()->is_interpreter_frame();
 }
 
 frame frame::sender_for_entry_frame(RegisterMap *map) const
@@ -57,6 +54,11 @@ frame frame::sender_for_interpreter_fram
   return frame(sender_sp());
 }
 
+frame frame::sender_for_compiled_frame(RegisterMap *map) const
+{
+  return frame(sender_sp());
+}
+
 frame frame::sender(RegisterMap* map) const
 {
   // Default is not to follow arguments; the various
@@ -68,6 +70,11 @@ frame frame::sender(RegisterMap* map) co
 
   if (is_interpreted_frame())
     return sender_for_interpreter_frame(map);
+
+  assert(_cb == CodeCache::find_blob(pc()),"Must be the same");
+  if (_cb != NULL) {
+    return sender_for_compiled_frame(map);
+  }
 
   Unimplemented();
 }
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/frame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -37,7 +37,6 @@
  public:
   // Constructors
   frame(intptr_t* sp);
-  frame(intptr_t* sp, address pc);
 
   // accessors for the instance variables
   intptr_t* fp() const
@@ -70,6 +69,3 @@
     assert(zeroframe()->is_shark_frame(), "must be");
     return (SharkFrame *) zeroframe();
   }
-
- private:
-  static intptr_t shark_dummy_bcx;
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -40,11 +40,25 @@ inline frame::frame(intptr_t* sp)
 inline frame::frame(intptr_t* sp)
 {
   _sp = sp;
-  if (zeroframe()->is_entry_frame())
+  switch (zeroframe()->type()) {
+  case ZeroFrame::ENTRY_FRAME:
     _pc = StubRoutines::call_stub_return_pc();
-  else
+    _cb = NULL;
+    break;
+
+  case ZeroFrame::INTERPRETER_FRAME:
     _pc = NULL;
-  _cb = NULL;
+    _cb = NULL;
+    break;
+
+  case ZeroFrame::SHARK_FRAME:
+    _pc = zero_sharkframe()->pc();
+    _cb = CodeCache::find_blob(pc());
+    break;
+
+  default:
+    ShouldNotReachHere();
+  }
   _deopt_state = not_deoptimized;
 }
 
@@ -73,10 +87,7 @@ inline intptr_t** frame::interpreter_fra
 
 inline intptr_t* frame::interpreter_frame_bcx_addr() const
 {
-  if (zeroframe()->is_shark_frame())
-    return &shark_dummy_bcx;
-  else
-    return (intptr_t*) &(get_interpreterState()->_bcp);
+  return (intptr_t*) &(get_interpreterState()->_bcp);
 }
 
 inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const
@@ -86,10 +97,7 @@ inline constantPoolCacheOop* frame::inte
 
 inline methodOop* frame::interpreter_frame_method_addr() const
 {
-  if (zeroframe()->is_shark_frame())
-    return zero_sharkframe()->method_addr();
-  else
-    return &(get_interpreterState()->_method);
+  return &(get_interpreterState()->_method);
 }
 
 inline intptr_t* frame::interpreter_frame_mdx_addr() const
@@ -154,5 +162,5 @@ inline intptr_t* frame::entry_frame_argu
 
 inline intptr_t* frame::unextended_sp() const
 {
-  Unimplemented();
+  return zero_sharkframe()->unextended_sp();
 }
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -25,6 +25,17 @@
 
  public:
   typedef void (*method_entry_t)(methodOop method, TRAPS);
+
+  static void invoke_method(methodOop method, address entry_point, TRAPS)
+  {
+#ifdef SHARK
+    if (SharkMethod::is_shark_method(entry_point)) {
+      SharkMethod::get(entry_point)->invoke(method, THREAD);
+      return;
+    }
+#endif // SHARK
+    ((method_entry_t) entry_point) (method, THREAD);
+  }
 
  public:
   static int expr_index_at(int i)
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/sharkFrame_zero.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -28,9 +28,12 @@
 // | stack slot n-1     |       low addresses
 // |  ...               |
 // | stack slot 0       |
-// | monitor 0 (maybe)  |
+// | monitor m-1        |
 // |  ...               |
+// | monitor 0          |
 // | method             |
+// | unextended_sp      |
+// | pc                 |
 // | frame_type         |
 // | next_frame         |      high addresses
 // +--------------------+  ------------------
@@ -48,17 +51,25 @@ class SharkFrame : public ZeroFrame {
 
  protected:
   enum Layout {
-    method_off = jf_header_words,
+    pc_off = jf_header_words,
+    unextended_sp_off,
+    method_off,
     header_words
   };
 
  public:
-  methodOop* method_addr() const
+  address pc() const
   {
-    return (methodOop *) addr_of_word(method_off);
+    return (address) value_of_word(pc_off);
   }
+
+  intptr_t* unextended_sp() const
+  {
+    return (intptr_t *) value_of_word(unextended_sp_off);
+  }
+
   methodOop method() const
   {
-    return *method_addr();
+    return (methodOop) value_of_word(method_off);
   }
 };
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -101,6 +101,7 @@ class ZeroStackPrinter {
       if (frame->is_interpreter_frame()) {
         interpreterState istate =
           ((InterpreterFrame *) frame)->interpreter_state();
+        intptr_t *monitor_base = (intptr_t *) istate->monitor_base();
         if (addr >= (intptr_t *) istate) {
           field = istate->name_of_field_at_address((address) addr);
           if (field) {
@@ -116,6 +117,24 @@ class ZeroStackPrinter {
           }
           else if (addr == (intptr_t *) istate) {
             field = "(vtable for istate)";
+          }
+        }
+        else if (addr >= istate->stack_base() && addr < monitor_base) {
+          int monitor_size = frame::interpreter_frame_monitor_size();
+          int last_index =
+            (monitor_base - istate->stack_base()) / monitor_size - 1;
+          int index =
+            last_index - (addr - istate->stack_base()) / monitor_size;
+          intptr_t monitor = (intptr_t) (istate->monitor_base() - 1 - index);
+          intptr_t offset = (intptr_t) addr - monitor;
+          
+          if (offset == BasicObjectLock::obj_offset_in_bytes()) {
+            snprintf(_buf, _buflen, "monitor[%d]->_obj", index);
+            field = _buf;
+          }
+          else if (offset ==  BasicObjectLock::lock_offset_in_bytes()) {
+            snprintf(_buf, _buflen, "monitor[%d]->_lock", index);
+            field = _buf;
           }
         }
         else if (addr < istate->stack_base()) {
@@ -164,7 +183,13 @@ class ZeroStackPrinter {
         }
       }
       if (frame->is_shark_frame()) {
-        if (word == SharkFrame::method_off) {
+        if (word == SharkFrame::pc_off) {
+          field = "pc";
+        }
+        else if (word == SharkFrame::unextended_sp_off) {
+          field = "unextended_sp";
+        }
+        else if (word == SharkFrame::method_off) {
           field = "method";
           methodOop method = ((SharkFrame *) frame)->method();
           if (method->is_oop())
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/stack_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp	Tue Aug 12 05:35:18 2008 -0400
@@ -98,10 +98,12 @@ class ZeroStack {
   {
     return byte_offset_of(ZeroStack, _base);
   }
+
   static ByteSize top_offset()
   {
     return byte_offset_of(ZeroStack, _top);
   }
+
   static ByteSize sp_offset()
   {
     return byte_offset_of(ZeroStack, _sp);
@@ -118,6 +120,7 @@ class ZeroStack {
 // |  ...               |
 
 class ZeroFrame {
+  friend class frame;
   friend class ZeroStackPrinter;
 
  protected:
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp
--- a/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp	Tue Aug 12 05:35:18 2008 -0400
@@ -66,7 +66,7 @@ class StubGenerator: public StubCodeGene
       EntryFrame::build(stack, parameters, parameter_words, call_wrapper));
 
     // Make the call
-    ((Interpreter::method_entry_t) entry_point) (method, THREAD);
+    Interpreter::invoke_method(method, entry_point, THREAD);
 
     // Store result depending on type
     if (!HAS_PENDING_EXCEPTION) {
diff -r 7cd4d87f69f2 -r e8c5220a41f5 ports/hotspot/src/share/vm/includeDB_shark
--- a/ports/hotspot/src/share/vm/includeDB_shark	Tue Aug 12 09:37:13 2008 +0200
+++ b/ports/hotspot/src/share/vm/includeDB_shark	Tue Aug 12 05:35:18 2008 -0400
@@ -56,6 +56,10 @@ globals.hpp                             
 
 globals.cpp                             shark_globals.hpp
 
+interpreter.hpp                         sharkMethod.hpp
+
+methodOop.cpp                           sharkMethod.hpp
+
 shark_globals.cpp                       shark_globals.hpp
 
 shark_globals.hpp                       shark_globals_<arch>.hpp
@@ -72,6 +76,8 @@ sharkBlock.cpp                          
 sharkBlock.cpp                          shark_globals.hpp
 sharkBlock.cpp                          sharkBlock.hpp
 sharkBlock.cpp                          sharkBuilder.hpp
+sharkBlock.cpp                          sharkConstantPool.hpp
+sharkBlock.cpp                          sharkRuntime.hpp
 sharkBlock.cpp                          sharkState.inline.hpp
 sharkBlock.cpp                          sharkValue.hpp
 
@@ -81,8 +87,9 @@ sharkBlock.hpp                          
 sharkBlock.hpp                          ciType.hpp
 sharkBlock.hpp                          ciTypeFlow.hpp
 sharkBlock.hpp                          llvmHeaders.hpp
+sharkBlock.hpp                          sharkBuilder.hpp
 sharkBlock.hpp                          sharkFunction.hpp
-sharkBlock.hpp                          sharkBuilder.hpp
+sharkBlock.hpp                          sharkMonitor.hpp
 sharkBlock.hpp                          sharkState.hpp
 sharkBlock.hpp                          sharkValue.hpp
 
@@ -94,8 +101,9 @@ sharkBuilder.cpp                        
 sharkBuilder.cpp                        resourceArea.hpp
 sharkBuilder.cpp                        llvmHeaders.hpp
 sharkBuilder.cpp                        sharkBuilder.hpp
+sharkBuilder.cpp                        sharkRuntime.hpp
+sharkBuilder.cpp                        synchronizer.hpp
 sharkBuilder.cpp                        thread.hpp
-sharkBuilder.cpp                        synchronizer.hpp
 
 sharkBuilder.hpp                        barrierSet.hpp



More information about the distro-pkg-dev mailing list