src/share/vm/code/nmethod.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/code

src/share/vm/code/nmethod.cpp

Print this page




2970         sig_index += type2size[t];
2971         arg_index += 1;
2972         if (!at_this)  ss.next();
2973       }
2974       if (!did_old_sp) {
2975         stream->print("  # ");
2976         stream->move_to(tab1);
2977         stream->print("[%s+0x%x]", spname, stack_slot_offset);
2978         stream->print("  (%s of caller)", spname);
2979         stream->cr();
2980       }
2981     }
2982   }
2983 }
2984 
2985 void nmethod::print_code_comment_on(outputStream* st, int column, u_char* begin, u_char* end) {
2986   // First, find an oopmap in (begin, end].
2987   // We use the odd half-closed interval so that oop maps and scope descs
2988   // which are tied to the byte after a call are printed with the call itself.
2989   address base = code_begin();
2990   OopMapSet* oms = oop_maps();
2991   if (oms != NULL) {
2992     for (int i = 0, imax = oms->size(); i < imax; i++) {
2993       OopMap* om = oms->at(i);
2994       address pc = base + om->offset();

2995       if (pc > begin) {
2996         if (pc <= end) {
2997           st->move_to(column);
2998           st->print("; ");
2999           om->print_on(st);
3000         }
3001         break;
3002       }
3003     }
3004   }
3005 
3006   // Print any debug info present at this pc.
3007   ScopeDesc* sd  = scope_desc_in(begin, end);
3008   if (sd != NULL) {
3009     st->move_to(column);
3010     if (sd->bci() == SynchronizationEntryBCI) {
3011       st->print(";*synchronization entry");
3012     } else {
3013       if (sd->method() == NULL) {
3014         st->print("method is NULL");




2970         sig_index += type2size[t];
2971         arg_index += 1;
2972         if (!at_this)  ss.next();
2973       }
2974       if (!did_old_sp) {
2975         stream->print("  # ");
2976         stream->move_to(tab1);
2977         stream->print("[%s+0x%x]", spname, stack_slot_offset);
2978         stream->print("  (%s of caller)", spname);
2979         stream->cr();
2980       }
2981     }
2982   }
2983 }
2984 
2985 void nmethod::print_code_comment_on(outputStream* st, int column, u_char* begin, u_char* end) {
2986   // First, find an oopmap in (begin, end].
2987   // We use the odd half-closed interval so that oop maps and scope descs
2988   // which are tied to the byte after a call are printed with the call itself.
2989   address base = code_begin();
2990   ImmutableOopMapSet* oms = oop_maps();
2991   if (oms != NULL) {
2992     for (int i = 0, imax = oms->size(); i < imax; i++) {
2993       const ImmutableOopMapPair* pair = oms->pair_at(i);
2994       const ImmutableOopMap* om = pair->get_from(oms);
2995       address pc = base + pair->pc();
2996       if (pc > begin) {
2997         if (pc <= end) {
2998           st->move_to(column);
2999           st->print("; ");
3000           om->print_on(st);
3001         }
3002         break;
3003       }
3004     }
3005   }
3006 
3007   // Print any debug info present at this pc.
3008   ScopeDesc* sd  = scope_desc_in(begin, end);
3009   if (sd != NULL) {
3010     st->move_to(column);
3011     if (sd->bci() == SynchronizationEntryBCI) {
3012       st->print(";*synchronization entry");
3013     } else {
3014       if (sd->method() == NULL) {
3015         st->print("method is NULL");


src/share/vm/code/nmethod.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File