comparison src/share/vm/runtime/deoptimization.hpp @ 12699:38b84d5a66fd

Start passing down a 'speculation id' to deoptimizations. Use it to record GuardNode id during guard lowering as a debug feature for now
author Gilles Duboscq <duboscq@ssw.jku.at>
date Wed, 06 Nov 2013 14:53:31 +0100
parents 359f7e70ae7f
children a36839dafe50
comparison
equal deleted inserted replaced
12698:d59a65c11feb 12699:38b84d5a66fd
100 }; 100 };
101 101
102 enum { 102 enum {
103 _action_bits = 3, 103 _action_bits = 3,
104 _reason_bits = 5, 104 _reason_bits = 5,
105 _speculation_id_bits = 16,
105 _action_shift = 0, 106 _action_shift = 0,
106 _reason_shift = _action_shift+_action_bits, 107 _reason_shift = _action_shift+_action_bits,
108 _speculation_id_shift = _reason_shift+_reason_bits,
107 BC_CASE_LIMIT = PRODUCT_ONLY(1) NOT_PRODUCT(4) // for _deoptimization_hist 109 BC_CASE_LIMIT = PRODUCT_ONLY(1) NOT_PRODUCT(4) // for _deoptimization_hist
108 }; 110 };
109 111
110 enum UnpackType { 112 enum UnpackType {
111 Unpack_deopt = 0, // normal deoptimization, use pc computed in unpack_vframe_on_stack 113 Unpack_deopt = 0, // normal deoptimization, use pc computed in unpack_vframe_on_stack
284 ((~(trap_request) >> _action_shift) & right_n_bits(_action_bits)); 286 ((~(trap_request) >> _action_shift) & right_n_bits(_action_bits));
285 else 287 else
286 // standard action for unloaded CP entry 288 // standard action for unloaded CP entry
287 return _unloaded_action; 289 return _unloaded_action;
288 } 290 }
291 static short trap_request_speculation_id(int trap_request) {
292 if (trap_request < 0)
293 return (DeoptAction)
294 ((~(trap_request) >> _speculation_id_shift) & right_n_bits(_speculation_id_bits));
295 else
296 // standard action for unloaded CP entry
297 return 0;
298 }
289 static int trap_request_index(int trap_request) { 299 static int trap_request_index(int trap_request) {
290 if (trap_request < 0) 300 if (trap_request < 0)
291 return -1; 301 return -1;
292 else 302 else
293 return trap_request; 303 return trap_request;