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




 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 




 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(), jvms->is_restart(), 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(), jvms->is_restart());
 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 


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