src/hotspot/cpu/ppc/vm_version_ppc.cpp
changeset 54960 e46fe26d7f77
parent 54899 e4cff3cf0234
child 54983 81becad91321
equal deleted inserted replaced
54959:00425a850a2f 54960:e46fe26d7f77
   706 
   706 
   707   a->blr();
   707   a->blr();
   708   uint32_t *code_end = (uint32_t *)a->pc();
   708   uint32_t *code_end = (uint32_t *)a->pc();
   709   a->flush();
   709   a->flush();
   710 
   710 
       
   711   cb.insts()->set_end((u_char*)code_end);
       
   712 
   711   double loop1_seconds,loop2_seconds, rel_diff;
   713   double loop1_seconds,loop2_seconds, rel_diff;
   712   uint64_t start1, stop1;
   714   uint64_t start1, stop1;
   713 
   715 
   714   start1 = os::current_thread_cpu_time(false);
   716   start1 = os::current_thread_cpu_time(false);
   715   (*test1)();
   717   (*test1)();
   723 
   725 
   724   loop2_seconds = (stop1 - start1) / (1000 *1000 *1000.0);
   726   loop2_seconds = (stop1 - start1) / (1000 *1000 *1000.0);
   725 
   727 
   726   rel_diff = (loop2_seconds - loop1_seconds) / loop1_seconds *100;
   728   rel_diff = (loop2_seconds - loop1_seconds) / loop1_seconds *100;
   727 
   729 
   728   if (PrintAssembly) {
   730   if (PrintAssembly || PrintStubCode) {
   729     ttyLocker ttyl;
   731     ttyLocker ttyl;
   730     tty->print_cr("Decoding section size detection stub at " INTPTR_FORMAT " before execution:", p2i(code));
   732     tty->print_cr("Decoding section size detection stub at " INTPTR_FORMAT " before execution:", p2i(code));
   731     Disassembler::decode((u_char*)code, (u_char*)code_end, tty);
   733     // Use existing decode function. This enables the [MachCode] format which is needed to DecodeErrorFile.
       
   734     Disassembler::decode(&cb, (u_char*)code, (u_char*)code_end, tty);
   732     tty->print_cr("Time loop1 :%f", loop1_seconds);
   735     tty->print_cr("Time loop1 :%f", loop1_seconds);
   733     tty->print_cr("Time loop2 :%f", loop2_seconds);
   736     tty->print_cr("Time loop2 :%f", loop2_seconds);
   734     tty->print_cr("(time2 - time1) / time1 = %f %%", rel_diff);
   737     tty->print_cr("(time2 - time1) / time1 = %f %%", rel_diff);
   735 
   738 
   736     if (rel_diff > 12.0) {
   739     if (rel_diff > 12.0) {