Mercurial > hg > truffle
diff agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java @ 218:a5838065ab24
6620329: jstack prints double native methods on Solaris/sparc
Summary: Fixed stack walking code in sparc to start frame walk from last_java_sp.
Reviewed-by: sgoldman
author | swamyv |
---|---|
date | Tue, 24 Jun 2008 21:37:10 -0700 |
parents | ba764ed4b6f2 |
children | 9c2ecc2ffb12 |
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java Sat Jun 21 10:03:31 2008 -0700 +++ b/agent/src/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java Tue Jun 24 21:37:10 2008 -0700 @@ -316,6 +316,14 @@ iterateLiveRegions(liveRegions, visitor, null); } + public boolean isValidMethod(OopHandle handle) { + OopHandle klass = Oop.getKlassForOopHandle(handle); + if (klass != null && klass.equals(methodKlassHandle)) { + return true; + } + return false; + } + // Creates an instance from the Oop hierarchy based based on the handle public Oop newOop(OopHandle handle) { // The only known way to detect the right type of an oop is @@ -375,8 +383,10 @@ } } - System.err.println("Unknown oop at " + handle); - System.err.println("Oop's klass is " + klass); + if (DEBUG) { + System.err.println("Unknown oop at " + handle); + System.err.println("Oop's klass is " + klass); + } throw new UnknownOopException(); }