1.1 --- a/src/share/vm/services/serviceUtil.hpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/services/serviceUtil.hpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -43,11 +43,6 @@ 1.11 return false; 1.12 } 1.13 1.14 - // ignore KlassKlass 1.15 - if (o->is_klass()) { 1.16 - return false; 1.17 - } 1.18 - 1.19 // instance 1.20 if (o->is_instance()) { 1.21 // instance objects are visible 1.22 @@ -58,11 +53,11 @@ 1.23 return true; 1.24 } 1.25 // java.lang.Classes are visible 1.26 - o = java_lang_Class::as_klassOop(o); 1.27 - if (o->is_klass()) { 1.28 + Klass* k = java_lang_Class::as_Klass(o); 1.29 + if (k->is_klass()) { 1.30 // if it's a class for an object, an object array, or 1.31 // primitive (type) array then it's visible. 1.32 - klassOop klass = (klassOop)o; 1.33 + Klass* klass = k; 1.34 if (Klass::cast(klass)->oop_is_instance()) { 1.35 return true; 1.36 } 1.37 @@ -77,18 +72,13 @@ 1.38 } 1.39 // object arrays are visible if they aren't system object arrays 1.40 if (o->is_objArray()) { 1.41 - objArrayOop array = (objArrayOop)o; 1.42 - if (array->klass() != Universe::systemObjArrayKlassObj()) { 1.43 return true; 1.44 - } else { 1.45 - return false; 1.46 - } 1.47 } 1.48 // type arrays are visible 1.49 if (o->is_typeArray()) { 1.50 return true; 1.51 } 1.52 - // everything else (methodOops, ...) aren't visible 1.53 + // everything else (Method*s, ...) aren't visible 1.54 return false; 1.55 }; // end of visible_oop() 1.56