< prev index next >
src/share/vm/opto/compile.hpp
Print this page
@@ -29,11 +29,13 @@
#include "ci/compilerInterface.hpp"
#include "code/debugInfoRec.hpp"
#include "code/exceptionHandlerTable.hpp"
#include "compiler/compilerOracle.hpp"
#include "compiler/compileBroker.hpp"
+#if INCLUDE_JFR
#include "jfr/jfrEvents.hpp"
+#endif
#include "libadt/dict.hpp"
#include "libadt/port.hpp"
#include "libadt/vectset.hpp"
#include "memory/resourceArea.hpp"
#include "opto/idealGraphPrinter.hpp"
@@ -631,35 +633,39 @@
#endif
C->_latest_stage_start_counter.stamp();
}
void print_method(CompilerPhaseType cpt, int level = 1) {
+#if INCLUDE_JFR
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();
}
+#endif
#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) {
+#if INCLUDE_JFR
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();
}
+#endif
#ifndef PRODUCT
if (_printer) _printer->end_method();
#endif
}
< prev index next >