src/share/vm/c1/c1_LinearScan.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/c1

src/share/vm/c1/c1_LinearScan.cpp

Print this page
rev 6132 : 8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9
Summary: make compiled code bang the stack by the worst case size of the interpreter frame at deoptimization points.
Reviewed-by:


2434   for (int i = 0; i < locks_count; i++) {
2435     set_oop(map, frame_map()->monitor_object_regname(i));
2436   }
2437 
2438   return map;
2439 }
2440 
2441 
2442 void LinearScan::compute_oop_map(IntervalWalker* iw, const LIR_OpVisitState &visitor, LIR_Op* op) {
2443   assert(visitor.info_count() > 0, "no oop map needed");
2444 
2445   // compute oop_map only for first CodeEmitInfo
2446   // because it is (in most cases) equal for all other infos of the same operation
2447   CodeEmitInfo* first_info = visitor.info_at(0);
2448   OopMap* first_oop_map = compute_oop_map(iw, op, first_info, visitor.has_call());
2449 
2450   for (int i = 0; i < visitor.info_count(); i++) {
2451     CodeEmitInfo* info = visitor.info_at(i);
2452     OopMap* oop_map = first_oop_map;
2453 



2454     if (info->stack()->locks_size() != first_info->stack()->locks_size()) {
2455       // this info has a different number of locks then the precomputed oop map
2456       // (possible for lock and unlock instructions) -> compute oop map with
2457       // correct lock information
2458       oop_map = compute_oop_map(iw, op, info, visitor.has_call());
2459     }
2460 
2461     if (info->_oop_map == NULL) {
2462       info->_oop_map = oop_map;
2463     } else {
2464       // a CodeEmitInfo can not be shared between different LIR-instructions
2465       // because interval splitting can occur anywhere between two instructions
2466       // and so the oop maps must be different
2467       // -> check if the already set oop_map is exactly the one calculated for this operation
2468       assert(info->_oop_map == oop_map, "same CodeEmitInfo used for multiple LIR instructions");
2469     }
2470   }
2471 }
2472 
2473 




2434   for (int i = 0; i < locks_count; i++) {
2435     set_oop(map, frame_map()->monitor_object_regname(i));
2436   }
2437 
2438   return map;
2439 }
2440 
2441 
2442 void LinearScan::compute_oop_map(IntervalWalker* iw, const LIR_OpVisitState &visitor, LIR_Op* op) {
2443   assert(visitor.info_count() > 0, "no oop map needed");
2444 
2445   // compute oop_map only for first CodeEmitInfo
2446   // because it is (in most cases) equal for all other infos of the same operation
2447   CodeEmitInfo* first_info = visitor.info_at(0);
2448   OopMap* first_oop_map = compute_oop_map(iw, op, first_info, visitor.has_call());
2449 
2450   for (int i = 0; i < visitor.info_count(); i++) {
2451     CodeEmitInfo* info = visitor.info_at(i);
2452     OopMap* oop_map = first_oop_map;
2453 
2454     // compute worst case interpreter size in case of a deoptimization
2455     _compilation->update_interpreter_frame_size(info->interpreter_frame_size());
2456 
2457     if (info->stack()->locks_size() != first_info->stack()->locks_size()) {
2458       // this info has a different number of locks then the precomputed oop map
2459       // (possible for lock and unlock instructions) -> compute oop map with
2460       // correct lock information
2461       oop_map = compute_oop_map(iw, op, info, visitor.has_call());
2462     }
2463 
2464     if (info->_oop_map == NULL) {
2465       info->_oop_map = oop_map;
2466     } else {
2467       // a CodeEmitInfo can not be shared between different LIR-instructions
2468       // because interval splitting can occur anywhere between two instructions
2469       // and so the oop maps must be different
2470       // -> check if the already set oop_map is exactly the one calculated for this operation
2471       assert(info->_oop_map == oop_map, "same CodeEmitInfo used for multiple LIR instructions");
2472     }
2473   }
2474 }
2475 
2476 


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