comparison src/share/vm/code/pcDesc.hpp @ 5129:51111665eda6

Support for recording a leaf graph id for each deoptimization point in the debug info.
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 21 Mar 2012 10:47:02 +0100
parents 82af018d61db
children e307e8104e12
comparison
equal deleted inserted replaced
5128:e2da6471a9a1 5129:51111665eda6
36 friend class VMStructs; 36 friend class VMStructs;
37 private: 37 private:
38 int _pc_offset; // offset from start of nmethod 38 int _pc_offset; // offset from start of nmethod
39 int _scope_decode_offset; // offset for scope in nmethod 39 int _scope_decode_offset; // offset for scope in nmethod
40 int _obj_decode_offset; 40 int _obj_decode_offset;
41 GRAAL_ONLY(jlong _leaf_graph_id;)
41 42
42 enum { 43 enum {
43 PCDESC_reexecute = 1 << 0, 44 PCDESC_reexecute = 1 << 0,
44 PCDESC_is_method_handle_invoke = 1 << 1, 45 PCDESC_is_method_handle_invoke = 1 << 1,
45 PCDESC_return_oop = 1 << 2, 46 PCDESC_return_oop = 1 << 2,
54 55
55 public: 56 public:
56 int pc_offset() const { return _pc_offset; } 57 int pc_offset() const { return _pc_offset; }
57 int scope_decode_offset() const { return _scope_decode_offset; } 58 int scope_decode_offset() const { return _scope_decode_offset; }
58 int obj_decode_offset() const { return _obj_decode_offset; } 59 int obj_decode_offset() const { return _obj_decode_offset; }
60 jlong leaf_graph_id() const { return _leaf_graph_id; }
59 61
60 void set_pc_offset(int x) { _pc_offset = x; } 62 void set_pc_offset(int x) { _pc_offset = x; }
61 void set_scope_decode_offset(int x) { _scope_decode_offset = x; } 63 void set_scope_decode_offset(int x) { _scope_decode_offset = x; }
62 void set_obj_decode_offset(int x) { _obj_decode_offset = x; } 64 void set_obj_decode_offset(int x) { _obj_decode_offset = x; }
65 void set_leaf_graph_id(jlong x) { _leaf_graph_id = x; }
63 66
64 // Constructor (only used for static in nmethod.cpp) 67 // Constructor (only used for static in nmethod.cpp)
65 // Also used by ScopeDesc::sender()] 68 // Also used by ScopeDesc::sender()]
66 PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset); 69 PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset, jlong leaf_graph_id);
67 70
68 enum { 71 enum {
69 // upper and lower exclusive limits real offsets: 72 // upper and lower exclusive limits real offsets:
70 lower_offset_limit = -1, 73 lower_offset_limit = -1,
71 upper_offset_limit = (unsigned int)-1 >> 1 74 upper_offset_limit = (unsigned int)-1 >> 1
79 82
80 // Does pd refer to the same information as pd? 83 // Does pd refer to the same information as pd?
81 bool is_same_info(const PcDesc* pd) { 84 bool is_same_info(const PcDesc* pd) {
82 return _scope_decode_offset == pd->_scope_decode_offset && 85 return _scope_decode_offset == pd->_scope_decode_offset &&
83 _obj_decode_offset == pd->_obj_decode_offset && 86 _obj_decode_offset == pd->_obj_decode_offset &&
84 _flags == pd->_flags; 87 _flags == pd->_flags
88 GRAAL_ONLY(&& _leaf_graph_id == pd->_leaf_graph_id)
89 ;
85 } 90 }
86 91
87 bool is_method_handle_invoke() const { return (_flags & PCDESC_is_method_handle_invoke) != 0; } 92 bool is_method_handle_invoke() const { return (_flags & PCDESC_is_method_handle_invoke) != 0; }
88 void set_is_method_handle_invoke(bool z) { set_flag(PCDESC_is_method_handle_invoke, z); } 93 void set_is_method_handle_invoke(bool z) { set_flag(PCDESC_is_method_handle_invoke, z); }
89 94