Mercurial > hg > truffle
comparison src/share/vm/compiler/disassembler.cpp @ 1339:09ac706c2623
Merge
author | asaha |
---|---|
date | Wed, 24 Mar 2010 17:16:33 -0700 |
parents | 4e6abf09f540 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
1338:f5dd08ad65df | 1339:09ac706c2623 |
---|---|
149 void end_insn(address pc) { | 149 void end_insn(address pc) { |
150 address pc0 = cur_insn(); | 150 address pc0 = cur_insn(); |
151 outputStream* st = output(); | 151 outputStream* st = output(); |
152 if (_print_bytes && pc > pc0) | 152 if (_print_bytes && pc > pc0) |
153 print_insn_bytes(pc0, pc); | 153 print_insn_bytes(pc0, pc); |
154 if (_nm != NULL) | 154 if (_nm != NULL) { |
155 _nm->print_code_comment_on(st, COMMENT_COLUMN, pc0, pc); | 155 _nm->print_code_comment_on(st, COMMENT_COLUMN, pc0, pc); |
156 // this calls reloc_string_for which calls oop::print_value_on | |
157 } | |
156 | 158 |
157 // Output pc bucket ticks if we have any | 159 // Output pc bucket ticks if we have any |
158 if (total_ticks() != 0) { | 160 if (total_ticks() != 0) { |
159 address bucket_pc = FlatProfiler::bucket_start_for(pc); | 161 address bucket_pc = FlatProfiler::bucket_start_for(pc); |
160 if (bucket_pc != NULL && bucket_pc > pc0 && bucket_pc <= pc) { | 162 if (bucket_pc != NULL && bucket_pc > pc0 && bucket_pc <= pc) { |
271 } | 273 } |
272 | 274 |
273 oop obj; | 275 oop obj; |
274 if (_nm != NULL | 276 if (_nm != NULL |
275 && (obj = _nm->embeddedOop_at(cur_insn())) != NULL | 277 && (obj = _nm->embeddedOop_at(cur_insn())) != NULL |
276 && (address) obj == adr) { | 278 && (address) obj == adr |
279 && Universe::heap()->is_in(obj) | |
280 && Universe::heap()->is_in(obj->klass())) { | |
281 julong c = st->count(); | |
277 obj->print_value_on(st); | 282 obj->print_value_on(st); |
283 if (st->count() == c) { | |
284 // No output. (Can happen in product builds.) | |
285 st->print("(a %s)", Klass::cast(obj->klass())->external_name()); | |
286 } | |
278 return; | 287 return; |
279 } | 288 } |
280 } | 289 } |
281 | 290 |
282 // Fall through to a simple numeral. | 291 // Fall through to a simple numeral. |
284 } | 293 } |
285 | 294 |
286 void decode_env::print_insn_labels() { | 295 void decode_env::print_insn_labels() { |
287 address p = cur_insn(); | 296 address p = cur_insn(); |
288 outputStream* st = output(); | 297 outputStream* st = output(); |
289 nmethod* nm = _nm; | |
290 if (nm != NULL) { | |
291 if (p == nm->entry_point()) st->print_cr("[Entry Point]"); | |
292 if (p == nm->verified_entry_point()) st->print_cr("[Verified Entry Point]"); | |
293 if (p == nm->exception_begin()) st->print_cr("[Exception Handler]"); | |
294 if (p == nm->stub_begin()) st->print_cr("[Stub Code]"); | |
295 if (p == nm->consts_begin()) st->print_cr("[Constants]"); | |
296 } | |
297 CodeBlob* cb = _code; | 298 CodeBlob* cb = _code; |
298 if (cb != NULL) { | 299 if (cb != NULL) { |
299 cb->print_block_comment(st, (intptr_t)(p - cb->instructions_begin())); | 300 cb->print_block_comment(st, p); |
300 } | 301 } |
301 if (_print_pc) { | 302 if (_print_pc) { |
302 st->print(" " INTPTR_FORMAT ": ", (intptr_t) p); | 303 st->print(" " INTPTR_FORMAT ": ", (intptr_t) p); |
303 } | 304 } |
304 } | 305 } |