< prev index next >
src/hotspot/cpu/ppc/vm_version_ppc.cpp
Print this page
rev 54763 : 8213084: Rework and enhance Print[Opto]Assembly output
Reviewed-by:
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2018, SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -662,10 +662,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)();
@@ -679,14 +681,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 >