src/share/vm/runtime/os.cpp

changeset 6678
7384f6a12fc1
parent 6547
5cf196cc5405
child 6680
78bbf4d43a14
     1.1 --- a/src/share/vm/runtime/os.cpp	Thu May 15 09:25:27 2014 -0400
     1.2 +++ b/src/share/vm/runtime/os.cpp	Thu May 15 18:23:26 2014 -0400
     1.3 @@ -1095,11 +1095,15 @@
     1.4  
     1.5    }
     1.6  
     1.7 -  // Check if in metaspace.
     1.8 -  if (ClassLoaderDataGraph::contains((address)addr)) {
     1.9 -    // Use addr->print() from the debugger instead (not here)
    1.10 -    st->print_cr(INTPTR_FORMAT
    1.11 -                 " is pointing into metadata", addr);
    1.12 +  // Check if in metaspace and print types that have vptrs (only method now)
    1.13 +  if (Metaspace::contains(addr)) {
    1.14 +    if (Method::has_method_vptr((const void*)addr)) {
    1.15 +      ((Method*)addr)->print_value_on(st);
    1.16 +      st->cr();
    1.17 +    } else {
    1.18 +      // Use addr->print() from the debugger instead (not here)
    1.19 +      st->print_cr(INTPTR_FORMAT " is pointing into metadata", addr);
    1.20 +    }
    1.21      return;
    1.22    }
    1.23  

mercurial