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

Gary Benson gbenson at redhat.com
Wed Aug 13 07:46:26 PDT 2008


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

		* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp
		(print_word): Recognise non-header parts of Shark frames.

diffstat:

2 files changed, 36 insertions(+)
ChangeLog                                           |    5 +++
ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp |   31 +++++++++++++++++++

diffs (53 lines):

diff -r c7c621c16a15 -r a469b20018d9 ChangeLog
--- a/ChangeLog	Wed Aug 13 08:53:38 2008 +0100
+++ b/ChangeLog	Wed Aug 13 15:46:18 2008 +0100
@@ -1,3 +1,8 @@ 2008-08-13  Gary Benson  <gbenson at redhat
+2008-08-13  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp
+	(print_word): Recognise non-header parts of Shark frames.
+
 2008-08-13  Gary Benson  <gbenson at redhat.com>
 
 	PR icedtea/184:
diff -r c7c621c16a15 -r a469b20018d9 ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp
--- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp	Wed Aug 13 08:53:38 2008 +0100
+++ b/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp	Wed Aug 13 15:46:18 2008 +0100
@@ -195,6 +195,37 @@ class ZeroStackPrinter {
           if (method->is_oop())
             value = method->name_and_sig_as_C_string(_buf, _buflen);
         }
+        else {
+          SharkFrame *sf = (SharkFrame *) frame;
+          intptr_t *monitor_base =
+            (intptr_t *) frame - SharkFrame::header_words + 1;
+          intptr_t *stack_base =
+            sf->unextended_sp() + sf->method()->max_stack();
+
+          if (addr >= stack_base && addr < monitor_base) {
+            int monitor_size = frame::interpreter_frame_monitor_size();
+            int last_index = (monitor_base - stack_base) / monitor_size - 1;
+            int index = last_index - (addr - stack_base) / monitor_size;
+            intptr_t monitor =
+              (intptr_t) ((BasicObjectLock *) 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 {
+            snprintf(_buf, _buflen, "%s[%d]",
+                     top_frame ? "stack_word" : "local",
+                     stack_base - addr - 1);
+            field = _buf;
+          }
+        }
       }
     }
       



More information about the distro-pkg-dev mailing list