< prev index next >

src/share/vm/c1/c1_GraphBuilder.cpp

Print this page

        

*** 32,41 **** --- 32,42 ---- #include "ci/ciField.hpp" #include "ci/ciKlass.hpp" #include "ci/ciMemberName.hpp" #include "compiler/compileBroker.hpp" #include "interpreter/bytecode.hpp" + #include "jfr/jfrEvents.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/compilationPolicy.hpp" #include "utilities/bitMap.inline.hpp" class BlockListBuilder VALUE_OBJ_CLASS_SPEC {
*** 3458,3471 **** switch (id) { case vmIntrinsics::_arraycopy: if (!InlineArrayCopy) return false; break; ! #ifdef TRACE_HAVE_INTRINSICS ! case vmIntrinsics::_classID: ! case vmIntrinsics::_threadID: ! preserves_state = true; cantrap = true; break; case vmIntrinsics::_counterTime: preserves_state = true; --- 3459,3478 ---- switch (id) { case vmIntrinsics::_arraycopy: if (!InlineArrayCopy) return false; break; ! #ifdef JFR_HAVE_INTRINSICS ! #if defined(_LP64) || !defined(TRACE_ID_CLASS_SHIFT) ! case vmIntrinsics::_getClassId: ! preserves_state = false; ! cantrap = false; ! break; ! #endif ! ! case vmIntrinsics::_getEventWriter: ! preserves_state = false; cantrap = true; break; case vmIntrinsics::_counterTime: preserves_state = true;
*** 4394,4403 **** --- 4401,4434 ---- push(result_type, result); compilation()->set_has_unsafe_access(true); } + static void post_inlining_event(EventCompilerInlining* event, + int compile_id, + const char* msg, + bool success, + int bci, + ciMethod* caller, + ciMethod* callee) { + assert(caller != NULL, "invariant"); + assert(callee != NULL, "invariant"); + assert(event != NULL, "invariant"); + assert(event->should_commit(), "invariant"); + JfrStructCalleeMethod callee_struct; + callee_struct.set_type(callee->holder()->name()->as_utf8()); + callee_struct.set_name(callee->name()->as_utf8()); + callee_struct.set_descriptor(callee->signature()->as_symbol()->as_utf8()); + event->set_compileId(compile_id); + event->set_message(msg); + event->set_succeeded(success); + event->set_bci(bci); + event->set_caller(caller->get_Method()); + event->set_callee(callee_struct); + event->commit(); + } + void GraphBuilder::print_inlining(ciMethod* callee, const char* msg, bool success) { CompileLog* log = compilation()->log(); if (log != NULL) { if (success) { if (msg != NULL)
*** 4410,4419 **** --- 4441,4455 ---- else log->inline_fail("reason unknown"); } } + EventCompilerInlining event; + if (event.should_commit()) { + post_inlining_event(&event, compilation()->env()->task()->compile_id(), msg, success, bci(), method(), callee); + } + if (!PrintInlining && !compilation()->method()->has_option("PrintInlining")) { return; } CompileTask::print_inlining(callee, scope()->level(), bci(), msg); if (success && CIPrintMethodCodes) {
< prev index next >