Mercurial > hg > graal-compiler
diff src/share/vm/runtime/os.cpp @ 17935:7384f6a12fc1
8038212: Method::is_valid_method() check has performance regression impact for stackwalking
Summary: Only prune metaspace virtual spaces at safepoint so walking them is safe outside a safepoint.
Reviewed-by: mgerdin, mgronlun, hseigel, stefank
author | coleenp |
---|---|
date | Thu, 15 May 2014 18:23:26 -0400 |
parents | 5cf196cc5405 |
children | 78bbf4d43a14 |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.cpp Thu May 15 09:25:27 2014 -0400 +++ b/src/share/vm/runtime/os.cpp Thu May 15 18:23:26 2014 -0400 @@ -1095,11 +1095,15 @@ } - // Check if in metaspace. - if (ClassLoaderDataGraph::contains((address)addr)) { - // Use addr->print() from the debugger instead (not here) - st->print_cr(INTPTR_FORMAT - " is pointing into metadata", addr); + // Check if in metaspace and print types that have vptrs (only method now) + if (Metaspace::contains(addr)) { + if (Method::has_method_vptr((const void*)addr)) { + ((Method*)addr)->print_value_on(st); + st->cr(); + } else { + // Use addr->print() from the debugger instead (not here) + st->print_cr(INTPTR_FORMAT " is pointing into metadata", addr); + } return; }