src/share/vm/compiler/disassembler.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6961690 Sdiff src/share/vm/compiler

src/share/vm/compiler/disassembler.cpp

Print this page
rev 1839 : 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:


 429   unsigned char* end = entry->code_limit();
 430 #else
 431   unsigned char* p   = nm->code_begin();
 432   unsigned char* end = nm->code_end();
 433 #endif // SHARK
 434 
 435   // If there has been profiling, print the buckets.
 436   if (FlatProfiler::bucket_start_for(p) != NULL) {
 437     unsigned char* p1 = p;
 438     int total_bucket_count = 0;
 439     while (p1 < end) {
 440       unsigned char* p0 = p1;
 441       p1 += pd_instruction_alignment();
 442       address bucket_pc = FlatProfiler::bucket_start_for(p1);
 443       if (bucket_pc != NULL && bucket_pc > p0 && bucket_pc <= p1)
 444         total_bucket_count += FlatProfiler::bucket_count_for(p0);
 445     }
 446     env.set_total_ticks(total_bucket_count);
 447   }
 448 













 449   env.decode_instructions(p, end);
 450 }


 429   unsigned char* end = entry->code_limit();
 430 #else
 431   unsigned char* p   = nm->code_begin();
 432   unsigned char* end = nm->code_end();
 433 #endif // SHARK
 434 
 435   // If there has been profiling, print the buckets.
 436   if (FlatProfiler::bucket_start_for(p) != NULL) {
 437     unsigned char* p1 = p;
 438     int total_bucket_count = 0;
 439     while (p1 < end) {
 440       unsigned char* p0 = p1;
 441       p1 += pd_instruction_alignment();
 442       address bucket_pc = FlatProfiler::bucket_start_for(p1);
 443       if (bucket_pc != NULL && bucket_pc > p0 && bucket_pc <= p1)
 444         total_bucket_count += FlatProfiler::bucket_count_for(p0);
 445     }
 446     env.set_total_ticks(total_bucket_count);
 447   }
 448 
 449   // Print constant table.
 450   if (nm->consts_size() > 0) {
 451     nm->print_nmethod_labels(env.output(), nm->consts_begin());
 452     int offset = 0;
 453     for (address p = nm->consts_begin(); p < nm->consts_end(); p += 4, offset += 4) {
 454       if ((offset % 8) == 0) {
 455         env.output()->print_cr("  " INTPTR_FORMAT " (offset: %4d): " PTR32_FORMAT "   " PTR64_FORMAT, (intptr_t) p, offset, *((int32_t*) p), *((int64_t*) p));
 456       } else {
 457         env.output()->print_cr("  " INTPTR_FORMAT " (offset: %4d): " PTR32_FORMAT,                    (intptr_t) p, offset, *((int32_t*) p));
 458       }
 459     }
 460   }
 461 
 462   env.decode_instructions(p, end);
 463 }
src/share/vm/compiler/disassembler.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File