< prev index next >

src/hotspot/share/opto/parseHelper.cpp

Print this page




 454 
 455   // To do: factor out the the limit calculations below. These duplicate
 456   // the similar limit calculations in the interpreter.
 457 
 458   if (method_data_update() || force_update) {
 459     ciMethodData* md = method()->method_data();
 460     assert(md != NULL, "expected valid ciMethodData");
 461     ciProfileData* data = md->bci_to_data(cur_bci);
 462     assert(data != NULL && data->is_JumpData(), "need JumpData for taken branch");
 463     increment_md_counter_at(md, data, JumpData::taken_offset());
 464   }
 465 
 466   // In the new tiered system this is all we need to do. In the old
 467   // (c2 based) tiered sytem we must do the code below.
 468 #ifndef TIERED
 469   if (method_data_update()) {
 470     ciMethodData* md = method()->method_data();
 471     if (osr_site) {
 472       ciProfileData* data = md->bci_to_data(cur_bci);
 473       assert(data != NULL && data->is_JumpData(), "need JumpData for taken branch");
 474       int limit = (CompileThreshold
 475                    * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100;
 476       test_for_osr_md_counter_at(md, data, JumpData::taken_offset(), limit);
 477     }
 478   } else {
 479     // With method data update off, use the invocation counter to trigger an
 480     // OSR compilation, as done in the interpreter.
 481     if (osr_site) {
 482       int limit = (CompileThreshold * OnStackReplacePercentage) / 100;
 483       increment_and_test_invocation_counter(limit);
 484     }
 485   }
 486 #endif // TIERED
 487 
 488   // Restore the original bytecode.
 489   set_bci(cur_bci);
 490 }
 491 
 492 //--------------------------profile_not_taken_branch---------------------------
 493 void Parse::profile_not_taken_branch(bool force_update) {
 494 
 495   if (method_data_update() || force_update) {
 496     ciMethodData* md = method()->method_data();
 497     assert(md != NULL, "expected valid ciMethodData");
 498     ciProfileData* data = md->bci_to_data(bci());
 499     assert(data != NULL && data->is_BranchData(), "need BranchData for not taken branch");
 500     increment_md_counter_at(md, data, BranchData::not_taken_offset());
 501   }
 502 




 454 
 455   // To do: factor out the the limit calculations below. These duplicate
 456   // the similar limit calculations in the interpreter.
 457 
 458   if (method_data_update() || force_update) {
 459     ciMethodData* md = method()->method_data();
 460     assert(md != NULL, "expected valid ciMethodData");
 461     ciProfileData* data = md->bci_to_data(cur_bci);
 462     assert(data != NULL && data->is_JumpData(), "need JumpData for taken branch");
 463     increment_md_counter_at(md, data, JumpData::taken_offset());
 464   }
 465 
 466   // In the new tiered system this is all we need to do. In the old
 467   // (c2 based) tiered sytem we must do the code below.
 468 #ifndef TIERED
 469   if (method_data_update()) {
 470     ciMethodData* md = method()->method_data();
 471     if (osr_site) {
 472       ciProfileData* data = md->bci_to_data(cur_bci);
 473       assert(data != NULL && data->is_JumpData(), "need JumpData for taken branch");
 474       int limit = ((int64_t)CompileThreshold
 475                    * (OnStackReplacePercentage - InterpreterProfilePercentage)) / 100;
 476       test_for_osr_md_counter_at(md, data, JumpData::taken_offset(), limit);
 477     }
 478   } else {
 479     // With method data update off, use the invocation counter to trigger an
 480     // OSR compilation, as done in the interpreter.
 481     if (osr_site) {
 482       int limit = ((int64_t)CompileThreshold * OnStackReplacePercentage) / 100;
 483       increment_and_test_invocation_counter(limit);
 484     }
 485   }
 486 #endif // TIERED
 487 
 488   // Restore the original bytecode.
 489   set_bci(cur_bci);
 490 }
 491 
 492 //--------------------------profile_not_taken_branch---------------------------
 493 void Parse::profile_not_taken_branch(bool force_update) {
 494 
 495   if (method_data_update() || force_update) {
 496     ciMethodData* md = method()->method_data();
 497     assert(md != NULL, "expected valid ciMethodData");
 498     ciProfileData* data = md->bci_to_data(bci());
 499     assert(data != NULL && data->is_BranchData(), "need BranchData for not taken branch");
 500     increment_md_counter_at(md, data, BranchData::not_taken_offset());
 501   }
 502 


< prev index next >