< prev index next >
src/share/vm/compiler/compileBroker.cpp
Print this page
*** 28,38 ****
--- 28,40 ----
#include "code/codeCache.hpp"
#include "compiler/compileBroker.hpp"
#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"
#include "oops/oop.inline.hpp"
#include "prims/nativeLookup.hpp"
*** 1911,1920 ****
--- 1913,1923 ----
}
ttyLocker ttyl;
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");
event->set_method(task->method());
event->set_compileId(task->compile_id());
*** 1923,1932 ****
--- 1926,1936 ----
event->set_isOsr(task->osr_bci() != CompileBroker::standard_entry_bci);
event->set_codeSize((task->code() == NULL) ? 0 : task->code()->total_size());
event->set_inlinedBytes(task->num_inlined_bytecodes());
event->commit();
}
+ #endif
// ------------------------------------------------------------------
// CompileBroker::invoke_compiler_on_method
//
// Compile a method.
*** 2001,2011 ****
--- 2005,2017 ----
ci_env.cache_dtrace_flags();
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) {
ci_env.record_method_not_compilable("no compiler", !TieredCompilation);
} else {
*** 2034,2049 ****
--- 2040,2057 ----
err_msg_res("COMPILE SKIPPED: %s (%s)", ci_env.failure_reason(), retry_message) :
err_msg_res("COMPILE SKIPPED: %s", ci_env.failure_reason());
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());
if (_compilation_log != NULL) {
nmethod* code = task->code();
*** 2052,2064 ****
--- 2060,2074 ----
}
}
}
// 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();
methodHandle method(thread, task->method());
< prev index next >