< prev index next >

src/hotspot/share/runtime/deoptimization.hpp

Print this page




 155 #if INCLUDE_JVMCI
 156   static address deoptimize_for_missing_exception_handler(CompiledMethod* cm);
 157   static oop get_cached_box(AutoBoxObjectValue* bv, frame* fr, RegisterMap* reg_map, TRAPS);
 158 #endif
 159 
 160   private:
 161   // Does the actual work for deoptimizing a single frame
 162   static void deoptimize_single_frame(JavaThread* thread, frame fr, DeoptReason reason);
 163 
 164   // Helper function to revoke biases of all monitors in frame if UseBiasedLocking
 165   // is enabled
 166   static void revoke_biases_of_monitors(JavaThread* thread, frame fr, RegisterMap* map) {
 167     revoke_using_safepoint(thread, fr, map);
 168   }
 169 
 170 #if COMPILER2_OR_JVMCI
 171 JVMCI_ONLY(public:)
 172 
 173   // Support for restoring non-escaping objects
 174   static bool realloc_objects(JavaThread* thread, frame* fr, RegisterMap* reg_map, GrowableArray<ScopeValue*>* objects, TRAPS);

 175   static void reassign_type_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, typeArrayOop obj, BasicType type);
 176   static void reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj);
 177   static void reassign_fields(frame* fr, RegisterMap* reg_map, GrowableArray<ScopeValue*>* objects, bool realloc_failures, bool skip_internal);

 178   static void relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaThread* thread, bool realloc_failures);
 179   static void pop_frames_failed_reallocs(JavaThread* thread, vframeArray* array);
 180   NOT_PRODUCT(static void print_objects(GrowableArray<ScopeValue*>* objects, bool realloc_failures);)
 181 #endif // COMPILER2_OR_JVMCI
 182 
 183   public:
 184   static vframeArray* create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk, bool realloc_failures);
 185 
 186   // Interface used for unpacking deoptimized frames
 187 
 188   // UnrollBlock is returned by fetch_unroll_info() to the deoptimization handler (blob).
 189   // This is only a CheapObj to ease debugging after a deopt failure
 190   class UnrollBlock : public CHeapObj<mtCompiler> {
 191     friend class VMStructs;
 192     friend class JVMCIVMStructs;
 193    private:
 194     int       _size_of_deoptimized_frame; // Size, in bytes, of current deoptimized frame
 195     int       _caller_adjustment;         // Adjustment, in bytes, to caller's SP by initial interpreted frame
 196     int       _number_of_frames;          // Number frames to unroll
 197     int       _total_frame_sizes;         // Total of number*sizes frames




 155 #if INCLUDE_JVMCI
 156   static address deoptimize_for_missing_exception_handler(CompiledMethod* cm);
 157   static oop get_cached_box(AutoBoxObjectValue* bv, frame* fr, RegisterMap* reg_map, TRAPS);
 158 #endif
 159 
 160   private:
 161   // Does the actual work for deoptimizing a single frame
 162   static void deoptimize_single_frame(JavaThread* thread, frame fr, DeoptReason reason);
 163 
 164   // Helper function to revoke biases of all monitors in frame if UseBiasedLocking
 165   // is enabled
 166   static void revoke_biases_of_monitors(JavaThread* thread, frame fr, RegisterMap* map) {
 167     revoke_using_safepoint(thread, fr, map);
 168   }
 169 
 170 #if COMPILER2_OR_JVMCI
 171 JVMCI_ONLY(public:)
 172 
 173   // Support for restoring non-escaping objects
 174   static bool realloc_objects(JavaThread* thread, frame* fr, RegisterMap* reg_map, GrowableArray<ScopeValue*>* objects, TRAPS);
 175   static bool realloc_value_type_result(ValueKlass* vk, const RegisterMap& map, GrowableArray<Handle>& return_oops, TRAPS);
 176   static void reassign_type_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, typeArrayOop obj, BasicType type);
 177   static void reassign_object_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, objArrayOop obj);
 178   static void reassign_value_array_elements(frame* fr, RegisterMap* reg_map, ObjectValue* sv, valueArrayOop obj, ValueArrayKlass* vak, TRAPS);
 179   static void reassign_fields(frame* fr, RegisterMap* reg_map, GrowableArray<ScopeValue*>* objects, bool realloc_failures, bool skip_internal, TRAPS);
 180   static void relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaThread* thread, bool realloc_failures);
 181   static void pop_frames_failed_reallocs(JavaThread* thread, vframeArray* array);
 182   NOT_PRODUCT(static void print_objects(GrowableArray<ScopeValue*>* objects, bool realloc_failures);)
 183 #endif // COMPILER2_OR_JVMCI
 184 
 185   public:
 186   static vframeArray* create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk, bool realloc_failures);
 187 
 188   // Interface used for unpacking deoptimized frames
 189 
 190   // UnrollBlock is returned by fetch_unroll_info() to the deoptimization handler (blob).
 191   // This is only a CheapObj to ease debugging after a deopt failure
 192   class UnrollBlock : public CHeapObj<mtCompiler> {
 193     friend class VMStructs;
 194     friend class JVMCIVMStructs;
 195    private:
 196     int       _size_of_deoptimized_frame; // Size, in bytes, of current deoptimized frame
 197     int       _caller_adjustment;         // Adjustment, in bytes, to caller's SP by initial interpreted frame
 198     int       _number_of_frames;          // Number frames to unroll
 199     int       _total_frame_sizes;         // Total of number*sizes frames


< prev index next >