src/share/vm/opto/compile.hpp
Print this page
*** 40,49 ****
--- 40,50 ----
#include "opto/phase.hpp"
#include "opto/regmask.hpp"
#include "runtime/deoptimization.hpp"
#include "runtime/vmThread.hpp"
#include "trace/tracing.hpp"
+ #include "utilities/ticks.hpp"
class Block;
class Bundle;
class C2Compiler;
class CallGenerator;
*** 595,636 ****
// JSR 292
bool has_method_handle_invokes() const { return _has_method_handle_invokes; }
void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; }
! jlong _latest_stage_start_counter;
void begin_method() {
#ifndef PRODUCT
if (_printer) _printer->begin_method(this);
#endif
! C->_latest_stage_start_counter = os::elapsed_counter();
}
void print_method(CompilerPhaseType cpt, int level = 1) {
! EventCompilerPhase event(UNTIMED);
if (event.should_commit()) {
event.set_starttime(C->_latest_stage_start_counter);
- event.set_endtime(os::elapsed_counter());
event.set_phase((u1) cpt);
event.set_compileID(C->_compile_id);
event.set_phaseLevel(level);
event.commit();
}
#ifndef PRODUCT
if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
#endif
! C->_latest_stage_start_counter = os::elapsed_counter();
}
void end_method(int level = 1) {
! EventCompilerPhase event(UNTIMED);
if (event.should_commit()) {
event.set_starttime(C->_latest_stage_start_counter);
- event.set_endtime(os::elapsed_counter());
event.set_phase((u1) PHASE_END);
event.set_compileID(C->_compile_id);
event.set_phaseLevel(level);
event.commit();
}
--- 596,635 ----
// JSR 292
bool has_method_handle_invokes() const { return _has_method_handle_invokes; }
void set_has_method_handle_invokes(bool z) { _has_method_handle_invokes = z; }
! Ticks _latest_stage_start_counter;
void begin_method() {
#ifndef PRODUCT
if (_printer) _printer->begin_method(this);
#endif
! C->_latest_stage_start_counter.stamp();
}
void print_method(CompilerPhaseType cpt, int level = 1) {
! EventCompilerPhase event;
if (event.should_commit()) {
event.set_starttime(C->_latest_stage_start_counter);
event.set_phase((u1) cpt);
event.set_compileID(C->_compile_id);
event.set_phaseLevel(level);
event.commit();
}
#ifndef PRODUCT
if (_printer) _printer->print_method(this, CompilerPhaseTypeHelper::to_string(cpt), level);
#endif
! C->_latest_stage_start_counter.stamp();
}
void end_method(int level = 1) {
! EventCompilerPhase event;
if (event.should_commit()) {
event.set_starttime(C->_latest_stage_start_counter);
event.set_phase((u1) PHASE_END);
event.set_compileID(C->_compile_id);
event.set_phaseLevel(level);
event.commit();
}