Mercurial > hg > graal-compiler
diff src/share/vm/memory/dump.cpp @ 5967:f7c4174b33ba
7109878: The instanceKlass EnclosingMethhod attribute fields can be folded into the _inner_class field.
Summary: Fold instanceKlass::_enclosing_method_class_index and instanceKlass::_enclosing_method_method_index into the instanceKlass::_inner_classes array.
Reviewed-by: never, coleenp
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | jiangli |
---|---|
date | Tue, 13 Mar 2012 13:50:48 -0400 |
parents | 52b5d32fbfaf |
children | 749b1464aa81 |
line wrap: on
line diff
--- a/src/share/vm/memory/dump.cpp Fri Mar 09 13:34:45 2012 -0800 +++ b/src/share/vm/memory/dump.cpp Tue Mar 13 13:50:48 2012 -0400 @@ -297,16 +297,14 @@ if (obj->blueprint()->oop_is_instanceKlass()) { instanceKlass* ik = instanceKlass::cast((klassOop)obj); - typeArrayOop inner_classes = ik->inner_classes(); - if (inner_classes != NULL) { - constantPoolOop constants = ik->constants(); - int n = inner_classes->length(); - for (int i = 0; i < n; i += instanceKlass::inner_class_next_offset) { - int ioff = i + instanceKlass::inner_class_inner_name_offset; - int index = inner_classes->ushort_at(ioff); - if (index != 0) { - _closure->do_symbol(constants->symbol_at_addr(index)); - } + instanceKlassHandle ik_h((klassOop)obj); + InnerClassesIterator iter(ik_h); + constantPoolOop constants = ik->constants(); + for (; !iter.done(); iter.next()) { + int index = iter.inner_name_index(); + + if (index != 0) { + _closure->do_symbol(constants->symbol_at_addr(index)); } } }