Print this page
rev 1838 : 6961690: load oops from constant table on SPARC
Summary: oops should be loaded from the constant table of an nmethod instead of materializing them with a long code sequence.
Reviewed-by:

Split Close
Expand all
Collapse all
          --- old/src/share/vm/utilities/debug.cpp
          +++ new/src/share/vm/utilities/debug.cpp
↓ open down ↓ 353 lines elided ↑ open up ↑
 354  354      tty->print_cr("NULL");
 355  355    } else {
 356  356      cb->print();
 357  357    }
 358  358  }
 359  359  
 360  360  
 361  361  extern "C" void disnm(intptr_t p) {
 362  362    Command c("disnm");
 363  363    CodeBlob* cb = CodeCache::find_blob((address) p);
 364      -  cb->print();
 365      -  Disassembler::decode(cb);
      364 +  nmethod* nm = cb->as_nmethod_or_null();
      365 +  if (nm) {
      366 +    nm->print();
      367 +    Disassembler::decode(nm);
      368 +  } else {
      369 +    cb->print();
      370 +    Disassembler::decode(cb);
      371 +  }
 366  372  }
 367  373  
 368  374  
 369  375  extern "C" void printnm(intptr_t p) {
 370  376    char buffer[256];
 371  377    sprintf(buffer, "printnm: " INTPTR_FORMAT, p);
 372  378    Command c(buffer);
 373  379    CodeBlob* cb = CodeCache::find_blob((address) p);
 374  380    if (cb->is_nmethod()) {
 375  381      nmethod* nm = (nmethod*)cb;
↓ open down ↓ 458 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX