< prev index next >
src/hotspot/cpu/ppc/vm_version_ppc.cpp
Print this page
rev 54960 : 8213084: Rework and enhance Print[Opto]Assembly output
Reviewed-by: kvn, thartmann
@@ -706,10 +706,12 @@
a->blr();
uint32_t *code_end = (uint32_t *)a->pc();
a->flush();
+ cb.insts()->set_end((u_char*)code_end);
+
double loop1_seconds,loop2_seconds, rel_diff;
uint64_t start1, stop1;
start1 = os::current_thread_cpu_time(false);
(*test1)();
@@ -723,14 +725,15 @@
loop2_seconds = (stop1 - start1) / (1000 *1000 *1000.0);
rel_diff = (loop2_seconds - loop1_seconds) / loop1_seconds *100;
- if (PrintAssembly) {
+ if (PrintAssembly || PrintStubCode) {
ttyLocker ttyl;
tty->print_cr("Decoding section size detection stub at " INTPTR_FORMAT " before execution:", p2i(code));
- Disassembler::decode((u_char*)code, (u_char*)code_end, tty);
+ // Use existing decode function. This enables the [MachCode] format which is needed to DecodeErrorFile.
+ Disassembler::decode(&cb, (u_char*)code, (u_char*)code_end, tty);
tty->print_cr("Time loop1 :%f", loop1_seconds);
tty->print_cr("Time loop2 :%f", loop2_seconds);
tty->print_cr("(time2 - time1) / time1 = %f %%", rel_diff);
if (rel_diff > 12.0) {
< prev index next >