src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/compile.cpp	Tue Mar 25 14:56:09 2014
--- new/src/share/vm/opto/compile.cpp	Tue Mar 25 14:56:09 2014

*** 3829,3858 **** --- 3829,3901 ---- assert(!_print_inlining || _print_inlining_stream->size() == 0, "loosing data"); } void Compile::dump_inlining() { bool do_print_inlining = print_inlining() || print_intrinsics(); ! if (do_print_inlining || log() != NULL) { // Print inlining message for candidates that we couldn't inline // for lack of space for (int i = 0; i < _late_inlines.length(); i++) { CallGenerator* cg = _late_inlines.at(i); if (!cg->is_mh_late_inline()) { const char* msg = "live nodes > LiveNodeCountInliningCutoff"; if (do_print_inlining) { cg->print_inlining_late(msg); } + log_late_inline_failure(cg, msg); } } } if (do_print_inlining) { for (int i = 0; i < _print_inlining_list->length(); i++) { tty->print(_print_inlining_list->adr_at(i)->ss()->as_string()); } } } + void Compile::log_late_inline(CallGenerator* cg) { + if (log() != NULL) { + log()->head("late_inline method='%d' inline_id='" JLONG_FORMAT "'", log()->identify(cg->method()), + cg->unique_id()); + JVMState* p = cg->call_node()->jvms(); + while (p != NULL) { + log()->elem("jvms bci='%d' method='%d'", p->bci(), log()->identify(p->method())); + p = p->caller(); + } + log()->tail("late_inline"); + } + } + + void Compile::log_late_inline_failure(CallGenerator* cg, const char* msg) { + log_late_inline(cg); + if (log() != NULL) { + log()->inline_fail(msg); + } + } + + void Compile::log_inline_id(CallGenerator* cg) { + if (log() != NULL) { + // The LogCompilation tool needs a unique way to identify late + // inline call sites. This id must be unique for this call site in + // this compilation. Try to have it unique across compilations as + // well because it can be convenient when grepping through the log + // file. + // Distinguish OSR compilations from others in case CICountOSR is + // on. + jlong id = ((jlong)unique()) + (((jlong)compile_id()) << (is_osr_compilation() ? 33 : 32)); + cg->set_unique_id(id); + log()->elem("inline_id id='" JLONG_FORMAT "'", id); + } + } + + void Compile::log_inline_failure(const char* msg) { + if (C->log() != NULL) { + C->log()->inline_fail(msg); + } + } + + // Dump inlining replay data to the stream. // Don't change thread state and acquire any locks. void Compile::dump_inline_data(outputStream* out) { InlineTree* inl_tree = ilt(); if (inl_tree != NULL) {

src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File