src/share/vm/opto/output.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6833129 Sdiff src/share/vm/opto

src/share/vm/opto/output.cpp

Print this page




 887       }
 888 
 889       OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node);
 890       Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg));
 891       while( !box_node->is_BoxLock() )  box_node = box_node->in(1);
 892       monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated()));
 893     }
 894 
 895     // We dump the object pool first, since deoptimization reads it in first.
 896     debug_info()->dump_object_pool(objs);
 897 
 898     // Build first class objects to pass to scope
 899     DebugToken *locvals = debug_info()->create_scope_values(locarray);
 900     DebugToken *expvals = debug_info()->create_scope_values(exparray);
 901     DebugToken *monvals = debug_info()->create_monitor_values(monarray);
 902 
 903     // Make method available for all Safepoints
 904     ciMethod* scope_method = method ? method : _method;
 905     // Describe the scope here
 906     assert(jvms->bci() >= InvocationEntryBci && jvms->bci() <= 0x10000, "must be a valid or entry BCI");


 907     // Now we can describe the scope.
 908     debug_info()->describe_scope(safepoint_pc_offset,scope_method,jvms->bci(),locvals,expvals,monvals);
 909   } // End jvms loop
 910 
 911   // Mark the end of the scope set.
 912   debug_info()->end_safepoint(safepoint_pc_offset);
 913 }
 914 
 915 
 916 
 917 // A simplified version of Process_OopMap_Node, to handle non-safepoints.
 918 class NonSafepointEmitter {
 919   Compile*  C;
 920   JVMState* _pending_jvms;
 921   int       _pending_offset;
 922 
 923   void emit_non_safepoint();
 924 
 925  public:
 926   NonSafepointEmitter(Compile* compile) {
 927     this->C = compile;
 928     _pending_jvms = NULL;


 970   }
 971 };
 972 
 973 void NonSafepointEmitter::emit_non_safepoint() {
 974   JVMState* youngest_jvms = _pending_jvms;
 975   int       pc_offset     = _pending_offset;
 976 
 977   // Clear it now:
 978   _pending_jvms = NULL;
 979 
 980   DebugInformationRecorder* debug_info = C->debug_info();
 981   assert(debug_info->recording_non_safepoints(), "sanity");
 982 
 983   debug_info->add_non_safepoint(pc_offset);
 984   int max_depth = youngest_jvms->depth();
 985 
 986   // Visit scopes from oldest to youngest.
 987   for (int depth = 1; depth <= max_depth; depth++) {
 988     JVMState* jvms = youngest_jvms->of_depth(depth);
 989     ciMethod* method = jvms->has_method() ? jvms->method() : NULL;
 990     debug_info->describe_scope(pc_offset, method, jvms->bci());


 991   }
 992 
 993   // Mark the end of the scope set.
 994   debug_info->end_non_safepoint(pc_offset);
 995 }
 996 
 997 
 998 
 999 // helper for Fill_buffer bailout logic
1000 static void turn_off_compiler(Compile* C) {
1001   if (CodeCache::unallocated_capacity() >= CodeCacheMinimumFreeSpace*10) {
1002     // Do not turn off compilation if a single giant method has
1003     // blown the code cache size.
1004     C->record_failure("excessive request to CodeCache");
1005   } else {
1006     // Let CompilerBroker disable further compilations.
1007     C->record_failure("CodeCache is full");
1008   }
1009 }
1010 




 887       }
 888 
 889       OptoReg::Name box_reg = BoxLockNode::stack_slot(box_node);
 890       Location basic_lock = Location::new_stk_loc(Location::normal,_regalloc->reg2offset(box_reg));
 891       while( !box_node->is_BoxLock() )  box_node = box_node->in(1);
 892       monarray->append(new MonitorValue(scval, basic_lock, box_node->as_BoxLock()->is_eliminated()));
 893     }
 894 
 895     // We dump the object pool first, since deoptimization reads it in first.
 896     debug_info()->dump_object_pool(objs);
 897 
 898     // Build first class objects to pass to scope
 899     DebugToken *locvals = debug_info()->create_scope_values(locarray);
 900     DebugToken *expvals = debug_info()->create_scope_values(exparray);
 901     DebugToken *monvals = debug_info()->create_monitor_values(monarray);
 902 
 903     // Make method available for all Safepoints
 904     ciMethod* scope_method = method ? method : _method;
 905     // Describe the scope here
 906     assert(jvms->bci() >= InvocationEntryBci && jvms->bci() <= 0x10000, "must be a valid or entry BCI");
 907     assert(jvms->should_reexecute() != JVMState::RE_True || depth==max_depth, "reexecute allowed only for the youngest");
 908     bool reexecute = (jvms->should_reexecute() == JVMState::RE_True) ? true : false;
 909     // Now we can describe the scope.
 910     debug_info()->describe_scope(safepoint_pc_offset,scope_method,jvms->bci(),reexecute,locvals,expvals,monvals);
 911   } // End jvms loop
 912 
 913   // Mark the end of the scope set.
 914   debug_info()->end_safepoint(safepoint_pc_offset);
 915 }
 916 
 917 
 918 
 919 // A simplified version of Process_OopMap_Node, to handle non-safepoints.
 920 class NonSafepointEmitter {
 921   Compile*  C;
 922   JVMState* _pending_jvms;
 923   int       _pending_offset;
 924 
 925   void emit_non_safepoint();
 926 
 927  public:
 928   NonSafepointEmitter(Compile* compile) {
 929     this->C = compile;
 930     _pending_jvms = NULL;


 972   }
 973 };
 974 
 975 void NonSafepointEmitter::emit_non_safepoint() {
 976   JVMState* youngest_jvms = _pending_jvms;
 977   int       pc_offset     = _pending_offset;
 978 
 979   // Clear it now:
 980   _pending_jvms = NULL;
 981 
 982   DebugInformationRecorder* debug_info = C->debug_info();
 983   assert(debug_info->recording_non_safepoints(), "sanity");
 984 
 985   debug_info->add_non_safepoint(pc_offset);
 986   int max_depth = youngest_jvms->depth();
 987 
 988   // Visit scopes from oldest to youngest.
 989   for (int depth = 1; depth <= max_depth; depth++) {
 990     JVMState* jvms = youngest_jvms->of_depth(depth);
 991     ciMethod* method = jvms->has_method() ? jvms->method() : NULL;
 992     assert(jvms->should_reexecute() != JVMState::RE_True || depth==max_depth, "reexecute allowed only for the youngest");
 993     bool reexecute = (jvms->should_reexecute() == JVMState::RE_True) ? true : false;
 994     debug_info->describe_scope(pc_offset, method, jvms->bci(), reexecute);
 995   }
 996 
 997   // Mark the end of the scope set.
 998   debug_info->end_non_safepoint(pc_offset);
 999 }
1000 
1001 
1002 
1003 // helper for Fill_buffer bailout logic
1004 static void turn_off_compiler(Compile* C) {
1005   if (CodeCache::unallocated_capacity() >= CodeCacheMinimumFreeSpace*10) {
1006     // Do not turn off compilation if a single giant method has
1007     // blown the code cache size.
1008     C->record_failure("excessive request to CodeCache");
1009   } else {
1010     // Let CompilerBroker disable further compilations.
1011     C->record_failure("CodeCache is full");
1012   }
1013 }
1014 


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