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

*** 264,290 **** --- 264,295 ---- return new VirtualCallGenerator(m, vtable_index); } // 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), _unique_id(0) {} virtual bool is_late_inline() const { return true; } // Convert the CallStaticJava into an inline virtual void do_late_inline(); 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()) { C->add_late_inline(this); }
*** 302,311 **** --- 307,324 ---- C->print_inlining_assert_ready(); C->print_inlining(method(), call->jvms()->depth()-1, call->jvms()->bci(), msg); 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() { // Can't inline it CallStaticJavaNode* call = call_node();
*** 366,393 **** --- 379,397 ---- C->print_inlining_assert_ready(); 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)) { map->disconnect_inputs(NULL, C); 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) { Node_Notes* entry_nn = old_nn->clone(C); entry_nn->set_jvms(jvms);
*** 436,450 **** --- 440,455 ---- virtual bool is_mh_late_inline() const { return true; } 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); } return new_jvms; } };
*** 481,490 **** --- 486,498 ---- LateInlineStringCallGenerator(ciMethod* method, CallGenerator* inline_cg) : LateInlineCallGenerator(method, inline_cg) {} 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); return new_jvms; }
*** 503,512 **** --- 511,522 ---- LateInlineCallGenerator(method, inline_cg) {} 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); return new_jvms; }
*** 784,793 **** --- 794,804 ---- if (cg != NULL && cg->is_inline()) return cg; } 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; case vmIntrinsics::_linkToVirtual:
*** 856,865 **** --- 867,877 ---- if (cg != NULL && cg->is_inline()) return cg; } 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; default:

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