src/share/vm/opto/phase.cpp

changeset 2556
3763ca6579b7
parent 2314
f95d63e2154a
child 3651
ee138854b3a6
equal deleted inserted replaced
2555:194c9fdee631 2556:3763ca6579b7
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
97 tty->print ("/%d bytes",_total_bytes_compiled); 97 tty->print ("/%d bytes",_total_bytes_compiled);
98 tty->print_cr (" (%3.0f bytes per sec) ", Phase::_total_bytes_compiled / Phase::_t_methodCompilation.seconds()); 98 tty->print_cr (" (%3.0f bytes per sec) ", Phase::_total_bytes_compiled / Phase::_t_methodCompilation.seconds());
99 tty->print_cr (" stub compilation : %3.3f sec.", Phase::_t_stubCompilation.seconds()); 99 tty->print_cr (" stub compilation : %3.3f sec.", Phase::_t_stubCompilation.seconds());
100 tty->print_cr (" Phases:"); 100 tty->print_cr (" Phases:");
101 tty->print_cr (" parse : %3.3f sec", Phase::_t_parser.seconds()); 101 tty->print_cr (" parse : %3.3f sec", Phase::_t_parser.seconds());
102 if (DoEscapeAnalysis) {
103 tty->print_cr (" escape analysis : %3.3f sec", Phase::_t_escapeAnalysis.seconds());
104 }
105 tty->print_cr (" optimizer : %3.3f sec", Phase::_t_optimizer.seconds()); 102 tty->print_cr (" optimizer : %3.3f sec", Phase::_t_optimizer.seconds());
106 if( Verbose || WizardMode ) { 103 if( Verbose || WizardMode ) {
104 if (DoEscapeAnalysis) {
105 // EA is part of Optimizer.
106 tty->print_cr (" escape analysis: %3.3f sec", Phase::_t_escapeAnalysis.seconds());
107 }
107 tty->print_cr (" iterGVN : %3.3f sec", Phase::_t_iterGVN.seconds()); 108 tty->print_cr (" iterGVN : %3.3f sec", Phase::_t_iterGVN.seconds());
108 tty->print_cr (" idealLoop : %3.3f sec", Phase::_t_idealLoop.seconds()); 109 tty->print_cr (" idealLoop : %3.3f sec", Phase::_t_idealLoop.seconds());
109 tty->print_cr (" idealLoopVerify: %3.3f sec", Phase::_t_idealLoopVerify.seconds()); 110 tty->print_cr (" idealLoopVerify: %3.3f sec", Phase::_t_idealLoopVerify.seconds());
110 tty->print_cr (" ccp : %3.3f sec", Phase::_t_ccp.seconds()); 111 tty->print_cr (" ccp : %3.3f sec", Phase::_t_ccp.seconds());
111 tty->print_cr (" iterGVN2 : %3.3f sec", Phase::_t_iterGVN2.seconds()); 112 tty->print_cr (" iterGVN2 : %3.3f sec", Phase::_t_iterGVN2.seconds());
113 tty->print_cr (" macroExpand : %3.3f sec", Phase::_t_macroExpand.seconds());
112 tty->print_cr (" graphReshape : %3.3f sec", Phase::_t_graphReshaping.seconds()); 114 tty->print_cr (" graphReshape : %3.3f sec", Phase::_t_graphReshaping.seconds());
113 double optimizer_subtotal = Phase::_t_iterGVN.seconds() + 115 double optimizer_subtotal = Phase::_t_iterGVN.seconds() +
114 Phase::_t_idealLoop.seconds() + Phase::_t_ccp.seconds() + 116 Phase::_t_idealLoop.seconds() + Phase::_t_ccp.seconds() +
115 Phase::_t_graphReshaping.seconds(); 117 Phase::_t_graphReshaping.seconds();
116 double percent_of_optimizer = ((optimizer_subtotal == 0.0) ? 0.0 : (optimizer_subtotal / Phase::_t_optimizer.seconds() * 100.0)); 118 double percent_of_optimizer = ((optimizer_subtotal == 0.0) ? 0.0 : (optimizer_subtotal / Phase::_t_optimizer.seconds() * 100.0));
131 Phase::_t_regAllocSplit.seconds() + Phase::_t_fixupSpills.seconds() + 133 Phase::_t_regAllocSplit.seconds() + Phase::_t_fixupSpills.seconds() +
132 Phase::_t_postAllocCopyRemoval.seconds(); 134 Phase::_t_postAllocCopyRemoval.seconds();
133 double percent_of_regalloc = ((regalloc_subtotal == 0.0) ? 0.0 : (regalloc_subtotal / Phase::_t_registerAllocation.seconds() * 100.0)); 135 double percent_of_regalloc = ((regalloc_subtotal == 0.0) ? 0.0 : (regalloc_subtotal / Phase::_t_registerAllocation.seconds() * 100.0));
134 tty->print_cr (" subtotal : %3.3f sec, %3.2f %%", regalloc_subtotal, percent_of_regalloc); 136 tty->print_cr (" subtotal : %3.3f sec, %3.2f %%", regalloc_subtotal, percent_of_regalloc);
135 } 137 }
136 tty->print_cr (" macroExpand : %3.3f sec", Phase::_t_macroExpand.seconds());
137 tty->print_cr (" blockOrdering : %3.3f sec", Phase::_t_blockOrdering.seconds()); 138 tty->print_cr (" blockOrdering : %3.3f sec", Phase::_t_blockOrdering.seconds());
138 tty->print_cr (" peephole : %3.3f sec", Phase::_t_peephole.seconds()); 139 tty->print_cr (" peephole : %3.3f sec", Phase::_t_peephole.seconds());
139 tty->print_cr (" codeGen : %3.3f sec", Phase::_t_codeGeneration.seconds()); 140 tty->print_cr (" codeGen : %3.3f sec", Phase::_t_codeGeneration.seconds());
140 tty->print_cr (" install_code : %3.3f sec", Phase::_t_registerMethod.seconds()); 141 tty->print_cr (" install_code : %3.3f sec", Phase::_t_registerMethod.seconds());
141 tty->print_cr (" -------------- : ----------"); 142 tty->print_cr (" -------------- : ----------");
142 double phase_subtotal = Phase::_t_parser.seconds() + 143 double phase_subtotal = Phase::_t_parser.seconds() +
143 (DoEscapeAnalysis ? Phase::_t_escapeAnalysis.seconds() : 0.0) +
144 Phase::_t_optimizer.seconds() + Phase::_t_graphReshaping.seconds() + 144 Phase::_t_optimizer.seconds() + Phase::_t_graphReshaping.seconds() +
145 Phase::_t_matcher.seconds() + Phase::_t_scheduler.seconds() + 145 Phase::_t_matcher.seconds() + Phase::_t_scheduler.seconds() +
146 Phase::_t_registerAllocation.seconds() + Phase::_t_blockOrdering.seconds() + 146 Phase::_t_registerAllocation.seconds() + Phase::_t_blockOrdering.seconds() +
147 Phase::_t_macroExpand.seconds() + Phase::_t_peephole.seconds() +
148 Phase::_t_codeGeneration.seconds() + Phase::_t_registerMethod.seconds(); 147 Phase::_t_codeGeneration.seconds() + Phase::_t_registerMethod.seconds();
149 double percent_of_method_compile = ((phase_subtotal == 0.0) ? 0.0 : phase_subtotal / Phase::_t_methodCompilation.seconds()) * 100.0; 148 double percent_of_method_compile = ((phase_subtotal == 0.0) ? 0.0 : phase_subtotal / Phase::_t_methodCompilation.seconds()) * 100.0;
150 // counters inside Compile::CodeGen include time for adapters and stubs 149 // counters inside Compile::CodeGen include time for adapters and stubs
151 // so phase-total can be greater than 100% 150 // so phase-total can be greater than 100%
152 tty->print_cr (" total : %3.3f sec, %3.2f %%", phase_subtotal, percent_of_method_compile); 151 tty->print_cr (" total : %3.3f sec, %3.2f %%", phase_subtotal, percent_of_method_compile);

mercurial