mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8038212: Method::is_valid_method() check has performance regression impact for stackwalking
Only prune metaspace virtual spaces at safepoint so walking them is safe outside a safepoint. Reviewed-by: mgerdin, mgronlun, hseigel, stefank
This commit is contained in:
parent
cc3c656cf1
commit
c336175c94
13 changed files with 84 additions and 72 deletions
|
@ -1097,11 +1097,15 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) {
|
|||
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue