--- old/src/share/vm/opto/callGenerator.cpp 2014-03-25 14:56:09.514440831 +0100 +++ new/src/share/vm/opto/callGenerator.cpp 2014-03-25 14:56:09.153631559 +0100 @@ -266,14 +266,17 @@ // Allow inlining decisions to be delayed class LateInlineCallGenerator : public DirectCallGenerator { + private: + // unique id for log compilation + jlong _unique_id; + protected: CallGenerator* _inline_cg; - virtual bool do_late_inline_check(JVMState* jvms) { return true; } public: LateInlineCallGenerator(ciMethod* method, CallGenerator* inline_cg) : - DirectCallGenerator(method, true), _inline_cg(inline_cg) {} + DirectCallGenerator(method, true), _inline_cg(inline_cg), _unique_id(0) {} virtual bool is_late_inline() const { return true; } @@ -283,6 +286,8 @@ virtual JVMState* generate(JVMState* jvms, Parse* parent_parser) { Compile *C = Compile::current(); + C->log_inline_id(this); + // Record that this call site should be revisited once the main // parse is finished. if (!is_mh_late_inline()) { @@ -304,6 +309,14 @@ C->print_inlining_move_to(this); C->print_inlining_update_delayed(this); } + + virtual void set_unique_id(jlong id) { + _unique_id = id; + } + + virtual jlong unique_id() const { + return _unique_id; + } }; void LateInlineCallGenerator::do_late_inline() { @@ -368,6 +381,8 @@ C->print_inlining_move_to(this); + C->log_late_inline(this); + // This check is done here because for_method_handle_inline() method // needs jvms for inlined state. if (!do_late_inline_check(jvms)) { @@ -375,17 +390,6 @@ return; } - CompileLog* log = C->log(); - if (log != NULL) { - log->head("late_inline method='%d'", log->identify(method())); - JVMState* p = jvms; - while (p != NULL) { - log->elem("jvms bci='%d' method='%d'", p->bci(), log->identify(p->method())); - p = p->caller(); - } - log->tail("late_inline"); - } - // Setup default node notes to be picked up by the inlining Node_Notes* old_nn = C->default_node_notes(); if (old_nn != NULL) { @@ -438,11 +442,12 @@ virtual JVMState* generate(JVMState* jvms, Parse* parent_parser) { JVMState* new_jvms = LateInlineCallGenerator::generate(jvms, parent_parser); + Compile* C = Compile::current(); if (_input_not_const) { // inlining won't be possible so no need to enqueue right now. call_node()->set_generator(this); } else { - Compile::current()->add_late_inline(this); + C->add_late_inline(this); } return new_jvms; } @@ -483,6 +488,9 @@ virtual JVMState* generate(JVMState* jvms, Parse* parent_parser) { Compile *C = Compile::current(); + + C->log_inline_id(this); + C->add_string_late_inline(this); JVMState* new_jvms = DirectCallGenerator::generate(jvms, parent_parser); @@ -505,6 +513,8 @@ virtual JVMState* generate(JVMState* jvms, Parse* parent_parser) { Compile *C = Compile::current(); + C->log_inline_id(this); + C->add_boxing_late_inline(this); JVMState* new_jvms = DirectCallGenerator::generate(jvms, parent_parser); @@ -786,6 +796,7 @@ } else { const char* msg = "receiver not constant"; if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg); + C->log_inline_failure(msg); } } break; @@ -858,6 +869,7 @@ } else { const char* msg = "member_name not constant"; if (PrintInlining) C->print_inlining(callee, jvms->depth() - 1, jvms->bci(), msg); + C->log_inline_failure(msg); } } break;