src/share/vm/ci/ciMethod.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6877170 Sdiff src/share/vm/ci

src/share/vm/ci/ciMethod.cpp

Print this page




 311 // ------------------------------------------------------------------
 312 // ciMethod::get_osr_flow_analysis
 313 ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
 314 #ifdef COMPILER2
 315   // OSR entry points are always place after a call bytecode of some sort
 316   assert(osr_bci >= 0, "must supply valid OSR entry point");
 317   ciEnv* env = CURRENT_ENV;
 318   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
 319   flow->do_flow();
 320   return flow;
 321 #else // COMPILER2
 322   ShouldNotReachHere();
 323   return NULL;
 324 #endif // COMPILER2
 325 }
 326 
 327 // ------------------------------------------------------------------
 328 // ciMethod::liveness_at_bci
 329 //
 330 // Which local variables are live at a specific bci?
 331 MethodLivenessResult ciMethod::liveness_at_bci(int bci) {
 332   check_is_loaded();
 333   if (_liveness == NULL) {
 334     // Create the liveness analyzer.
 335     Arena* arena = CURRENT_ENV->arena();
 336     _liveness = new (arena) MethodLiveness(arena, this);
 337     _liveness->compute_liveness();
 338   }
 339   MethodLivenessResult result = _liveness->get_liveness_at(bci);
 340   if (CURRENT_ENV->jvmti_can_access_local_variables() || DeoptimizeALot || CompileTheWorld) {

 341     // Keep all locals live for the user's edification and amusement.
 342     result.at_put_range(0, result.size(), true);
 343   }
 344   return result;
 345 }
 346 
 347 // ciMethod::live_local_oops_at_bci
 348 //
 349 // find all the live oops in the locals array for a particular bci
 350 // Compute what the interpreter believes by using the interpreter
 351 // oopmap generator. This is used as a double check during osr to
 352 // guard against conservative result from MethodLiveness making us
 353 // think a dead oop is live.  MethodLiveness is conservative in the
 354 // sense that it may consider locals to be live which cannot be live,
 355 // like in the case where a local could contain an oop or  a primitive
 356 // along different paths.  In that case the local must be dead when
 357 // those paths merge. Since the interpreter's viewpoint is used when
 358 // gc'ing an interpreter frame we need to use its viewpoint  during
 359 // OSR when loading the locals.
 360 




 311 // ------------------------------------------------------------------
 312 // ciMethod::get_osr_flow_analysis
 313 ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
 314 #ifdef COMPILER2
 315   // OSR entry points are always place after a call bytecode of some sort
 316   assert(osr_bci >= 0, "must supply valid OSR entry point");
 317   ciEnv* env = CURRENT_ENV;
 318   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
 319   flow->do_flow();
 320   return flow;
 321 #else // COMPILER2
 322   ShouldNotReachHere();
 323   return NULL;
 324 #endif // COMPILER2
 325 }
 326 
 327 // ------------------------------------------------------------------
 328 // ciMethod::liveness_at_bci
 329 //
 330 // Which local variables are live at a specific bci?
 331 MethodLivenessResult ciMethod::liveness_at_bci(int bci, bool raw) {
 332   check_is_loaded();
 333   if (_liveness == NULL) {
 334     // Create the liveness analyzer.
 335     Arena* arena = CURRENT_ENV->arena();
 336     _liveness = new (arena) MethodLiveness(arena, this);
 337     _liveness->compute_liveness();
 338   }
 339   MethodLivenessResult result = _liveness->get_liveness_at(bci);
 340   if (!raw &&
 341       (CURRENT_ENV->jvmti_can_access_local_variables() || DeoptimizeALot || CompileTheWorld)) {
 342     // Keep all locals live for the user's edification and amusement.
 343     result.at_put_range(0, result.size(), true);
 344   }
 345   return result;
 346 }
 347 
 348 // ciMethod::live_local_oops_at_bci
 349 //
 350 // find all the live oops in the locals array for a particular bci
 351 // Compute what the interpreter believes by using the interpreter
 352 // oopmap generator. This is used as a double check during osr to
 353 // guard against conservative result from MethodLiveness making us
 354 // think a dead oop is live.  MethodLiveness is conservative in the
 355 // sense that it may consider locals to be live which cannot be live,
 356 // like in the case where a local could contain an oop or  a primitive
 357 // along different paths.  In that case the local must be dead when
 358 // those paths merge. Since the interpreter's viewpoint is used when
 359 // gc'ing an interpreter frame we need to use its viewpoint  during
 360 // OSR when loading the locals.
 361 


src/share/vm/ci/ciMethod.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File