--- old/src/share/vm/compiler/compileBroker.cpp 2020-01-16 16:56:29.523497158 +0300 +++ new/src/share/vm/compiler/compileBroker.cpp 2020-01-16 16:56:29.475498707 +0300 @@ -30,7 +30,9 @@ #include "compiler/compileLog.hpp" #include "compiler/compilerOracle.hpp" #include "interpreter/linkResolver.hpp" +#if INCLUDE_JFR #include "jfr/jfrEvents.hpp" +#endif #include "memory/allocation.inline.hpp" #include "oops/methodData.hpp" #include "oops/method.hpp" @@ -1913,6 +1915,7 @@ tty->print("%s", s.as_string()); } +#if INCLUDE_JFR static void post_compilation_event(EventCompilation* event, CompileTask* task) { assert(event != NULL, "invariant"); assert(event->should_commit(), "invariant"); @@ -1925,6 +1928,7 @@ event->set_inlinedBytes(task->num_inlined_bytecodes()); event->commit(); } +#endif // ------------------------------------------------------------------ // CompileBroker::invoke_compiler_on_method @@ -2003,7 +2007,9 @@ ciMethod* target = ci_env.get_method_from_handle(target_handle); TraceTime t1("compilation", &time); +#if INCLUDE_JFR EventCompilation event; +#endif AbstractCompiler *comp = compiler(task_level); if (comp == NULL) { @@ -2036,12 +2042,14 @@ task->print_compilation(tty, msg); } +#if INCLUDE_JFR EventCompilationFailure event; if (event.should_commit()) { event.set_compileId(compile_id); event.set_failureMessage(failure_reason); event.commit(); } +#endif } else { task->mark_success(); task->set_num_inlined_bytecodes(ci_env.num_inlined_bytecodes()); @@ -2054,9 +2062,11 @@ } // simulate crash during compilation assert(task->compile_id() != CICrashAt, "just as planned"); +#if INCLUDE_JFR if (event.should_commit()) { post_compilation_event(&event, task); } +#endif } pop_jni_handle_block();