changeset in /hg/icedtea: 2009-05-27 Gary Benson <gbenson at redh...

Gary Benson gbenson at redhat.com
Wed Jun 10 13:45:31 PDT 2009


changeset 57f11ade2a35 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=57f11ade2a35
description:
	2009-05-27  Gary Benson  <gbenson at redhat.com>

		* ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
		(SharkDecacher::location_type): New method.
		(SharkDecacher::stack_location_type): Use the above.
		(SharkDecacher::local_location_type): Use the above.

diffstat:

2 files changed, 49 insertions(+), 10 deletions(-)
ChangeLog                                              |    7 ++
ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp |   52 ++++++++++++----

diffs (90 lines):

diff -r 49646e89d0ce -r 57f11ade2a35 ChangeLog
--- a/ChangeLog	Fri May 22 15:18:17 2009 +0100
+++ b/ChangeLog	Wed May 27 13:47:05 2009 +0100
@@ -1,3 +1,10 @@ 2009-05-22  Gary Benson  <gbenson at redhat
+2009-05-27  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
+	(SharkDecacher::location_type): New method.
+	(SharkDecacher::stack_location_type): Use the above.
+	(SharkDecacher::local_location_type): Use the above.
+
 2009-05-22  Gary Benson  <gbenson at redhat.com>
 
 	* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp
diff -r 49646e89d0ce -r 57f11ade2a35 ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp	Fri May 22 15:18:17 2009 +0100
+++ b/ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp	Wed May 27 13:47:05 2009 +0100
@@ -151,6 +151,46 @@ class SharkDecacher : public SharkCacher
   {
     return new LocationValue(slot2loc(offset, type));
   }
+  static Location::Type location_type(SharkValue** addr, bool maybe_two_word)
+  {
+    // low addresses this end
+    //                           Type       32-bit    64-bit
+    //   ----------------------------------------------------
+    //   stack[0]    local[3]    jobject    oop       oop
+    //   stack[1]    local[2]    NULL       normal    lng
+    //   stack[2]    local[1]    jlong      normal    invalid
+    //   stack[3]    local[0]    jint       normal    normal
+    //
+    // high addresses this end
+    
+    SharkValue *value = *addr;
+    if (value) {
+      if (value->is_jobject())
+        return Location::oop;
+#ifdef _LP64
+      if (value->is_two_word())
+        return Location::invalid;
+#endif // _LP64
+      return Location::normal;
+    }
+    else {
+      if (maybe_two_word) {
+        value = *(addr - 1);
+        if (value && value->is_two_word()) {
+#ifdef _LP64
+          if (value->is_jlong())
+            return Location::lng;
+          if (value->is_jdouble())
+            return Location::dbl;
+          ShouldNotReachHere();
+#else
+          return Location::normal;
+#endif // _LP64
+        }
+      }
+      return Location::invalid;
+    }
+  }
 
   // Stack slot helpers
  protected:
@@ -160,9 +200,7 @@ class SharkDecacher : public SharkCacher
 
   static Location::Type stack_location_type(int index, SharkValue** addr)
   {
-    if (addr[0] && addr[0]->is_jobject())
-      return Location::oop;
-    return Location::normal;
+    return location_type(addr, *addr == NULL);
   }
 
   // Local slot helpers
@@ -173,13 +211,7 @@ class SharkDecacher : public SharkCacher
 
   static Location::Type local_location_type(int index, SharkValue** addr)
   {
-    if (addr[0] && addr[0]->is_jobject())
-      return Location::oop;
-    if (addr[0])
-      return Location::normal;
-    if (index > 0 && addr[-1] && addr[-1]->is_two_word())
-      return Location::normal;
-    return Location::invalid;
+    return location_type(addr, index > 0);
   }
 
   // Writer helper



More information about the distro-pkg-dev mailing list