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

src/share/vm/opto/doCall.cpp

Print this page




 166   }
 167 
 168   // Attempt to inline...
 169   if (allow_inline) {
 170     // The profile data is only partly attributable to this caller,
 171     // scale back the call site information.
 172     float past_uses = jvms->method()->scale_count(site_count, prof_factor);
 173     // This is the number of times we expect the call code to be used.
 174     float expected_uses = past_uses;
 175 
 176     // Try inlining a bytecoded method:
 177     if (!call_is_virtual) {
 178       InlineTree* ilt;
 179       if (UseOldInlining) {
 180         ilt = InlineTree::find_subtree_from_root(this->ilt(), jvms->caller(), jvms->method());
 181       } else {
 182         // Make a disembodied, stateless ILT.
 183         // TO DO:  When UseOldInlining is removed, copy the ILT code elsewhere.
 184         float site_invoke_ratio = prof_factor;
 185         // Note:  ilt is for the root of this parse, not the present call site.
 186         ilt = new InlineTree(this, jvms->method(), jvms->caller(), site_invoke_ratio, 0);
 187       }
 188       WarmCallInfo scratch_ci;
 189       if (!UseOldInlining)
 190         scratch_ci.init(jvms, call_method, profile, prof_factor);
 191       WarmCallInfo* ci = ilt->ok_to_inline(call_method, jvms, profile, &scratch_ci);
 192       assert(ci != &scratch_ci, "do not let this pointer escape");
 193       bool allow_inline   = (ci != NULL && !ci->is_cold());
 194       bool require_inline = (allow_inline && ci->is_hot());
 195 
 196       if (allow_inline) {
 197         CallGenerator* cg = CallGenerator::for_inline(call_method, expected_uses);
 198         if (require_inline && cg != NULL && should_delay_inlining(call_method, jvms)) {
 199           // Delay the inlining of this method to give us the
 200           // opportunity to perform some high level optimizations
 201           // first.
 202           return CallGenerator::for_late_inline(call_method, cg);
 203         }
 204         if (cg == NULL) {
 205           // Fall through.
 206         } else if (require_inline || !InlineWarmCalls) {




 166   }
 167 
 168   // Attempt to inline...
 169   if (allow_inline) {
 170     // The profile data is only partly attributable to this caller,
 171     // scale back the call site information.
 172     float past_uses = jvms->method()->scale_count(site_count, prof_factor);
 173     // This is the number of times we expect the call code to be used.
 174     float expected_uses = past_uses;
 175 
 176     // Try inlining a bytecoded method:
 177     if (!call_is_virtual) {
 178       InlineTree* ilt;
 179       if (UseOldInlining) {
 180         ilt = InlineTree::find_subtree_from_root(this->ilt(), jvms->caller(), jvms->method());
 181       } else {
 182         // Make a disembodied, stateless ILT.
 183         // TO DO:  When UseOldInlining is removed, copy the ILT code elsewhere.
 184         float site_invoke_ratio = prof_factor;
 185         // Note:  ilt is for the root of this parse, not the present call site.
 186         ilt = new InlineTree(this, jvms->method(), jvms->caller(), site_invoke_ratio, MaxInlineLevel);
 187       }
 188       WarmCallInfo scratch_ci;
 189       if (!UseOldInlining)
 190         scratch_ci.init(jvms, call_method, profile, prof_factor);
 191       WarmCallInfo* ci = ilt->ok_to_inline(call_method, jvms, profile, &scratch_ci);
 192       assert(ci != &scratch_ci, "do not let this pointer escape");
 193       bool allow_inline   = (ci != NULL && !ci->is_cold());
 194       bool require_inline = (allow_inline && ci->is_hot());
 195 
 196       if (allow_inline) {
 197         CallGenerator* cg = CallGenerator::for_inline(call_method, expected_uses);
 198         if (require_inline && cg != NULL && should_delay_inlining(call_method, jvms)) {
 199           // Delay the inlining of this method to give us the
 200           // opportunity to perform some high level optimizations
 201           // first.
 202           return CallGenerator::for_late_inline(call_method, cg);
 203         }
 204         if (cg == NULL) {
 205           // Fall through.
 206         } else if (require_inline || !InlineWarmCalls) {


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