8141133: [JVMCI] crash during safepoint deopt if rethrow_exception is set

Reviewed-by: twisti
This commit is contained in:
Gilles Duboscq 2015-11-11 14:40:38 -10:00 committed by Christian Thalinger
parent 163e0435dc
commit c4ce43c1ac
10 changed files with 114 additions and 36 deletions

View file

@ -123,7 +123,8 @@ class Deoptimization : AllStatic {
Unpack_deopt = 0, // normal deoptimization, use pc computed in unpack_vframe_on_stack
Unpack_exception = 1, // exception is pending
Unpack_uncommon_trap = 2, // redo last byte code (C2 only)
Unpack_reexecute = 3 // reexecute bytecode (C1 only)
Unpack_reexecute = 3, // reexecute bytecode (C1 only)
Unpack_LIMIT = 4
};
// Checks all compiled methods. Invalid methods are deleted and
@ -179,13 +180,13 @@ JVMCI_ONLY(public:)
intptr_t _initial_info; // Platform dependent data for the sender frame (was FP on x86)
int _caller_actual_parameters; // The number of actual arguments at the
// interpreted caller of the deoptimized frame
int _unpack_kind; // exec_mode that can be changed during fetch_unroll_info
// The following fields are used as temps during the unpacking phase
// (which is tight on registers, especially on x86). They really ought
// to be PD variables but that involves moving this class into its own
// file to use the pd include mechanism. Maybe in a later cleanup ...
intptr_t _counter_temp; // SHOULD BE PD VARIABLE (x86 frame count temp)
intptr_t _unpack_kind; // SHOULD BE PD VARIABLE (x86 unpack kind)
intptr_t _sender_sp_temp; // SHOULD BE PD VARIABLE (x86 sender_sp)
public:
// Constructor
@ -195,7 +196,8 @@ JVMCI_ONLY(public:)
int number_of_frames,
intptr_t* frame_sizes,
address* frames_pcs,
BasicType return_type);
BasicType return_type,
int unpack_kind);
~UnrollBlock();
// Returns where a register is located.
@ -205,6 +207,7 @@ JVMCI_ONLY(public:)
intptr_t* frame_sizes() const { return _frame_sizes; }
int number_of_frames() const { return _number_of_frames; }
address* frame_pcs() const { return _frame_pcs ; }
int unpack_kind() const { return _unpack_kind; }
// Returns the total size of frames
int size_of_frames() const;
@ -237,7 +240,7 @@ JVMCI_ONLY(public:)
// deoptimized frame.
// @argument thread. Thread where stub_frame resides.
// @see OptoRuntime::deoptimization_fetch_unroll_info_C
static UnrollBlock* fetch_unroll_info(JavaThread* thread);
static UnrollBlock* fetch_unroll_info(JavaThread* thread, int exec_mode);
//** Unpacks vframeArray onto execution stack
// Called by assembly stub after execution has returned to
@ -262,7 +265,7 @@ JVMCI_ONLY(public:)
//** Performs an uncommon trap for compiled code.
// The top most compiler frame is converted into interpreter frames
static UnrollBlock* uncommon_trap(JavaThread* thread, jint unloaded_class_index);
static UnrollBlock* uncommon_trap(JavaThread* thread, jint unloaded_class_index, jint exec_mode);
// Helper routine that enters the VM and may block
static void uncommon_trap_inner(JavaThread* thread, jint unloaded_class_index);
@ -423,7 +426,7 @@ JVMCI_ONLY(public:)
static void load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS);
static void load_class_by_index(constantPoolHandle constant_pool, int index);
static UnrollBlock* fetch_unroll_info_helper(JavaThread* thread);
static UnrollBlock* fetch_unroll_info_helper(JavaThread* thread, int exec_mode);
static DeoptAction _unloaded_action; // == Action_reinterpret;
static const char* _trap_reason_name[];