comparison src/share/vm/code/pcDesc.hpp @ 7660:0b646334c5f7

keep track of leafGraphIds only at the StructuredGraph level (see GRAAL-60)
author Lukas Stadler <lukas.stadler@jku.at>
date Fri, 01 Feb 2013 17:32:59 +0100
parents e307e8104e12
children b8f261ba79c6
comparison
equal deleted inserted replaced
7656:01aeaf194641 7660:0b646334c5f7
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;)
42 41
43 enum { 42 enum {
44 PCDESC_reexecute = 1 << 0, 43 PCDESC_reexecute = 1 << 0,
45 PCDESC_is_method_handle_invoke = 1 << 1, 44 PCDESC_is_method_handle_invoke = 1 << 1,
46 PCDESC_return_oop = 1 << 2, 45 PCDESC_return_oop = 1 << 2,
55 54
56 public: 55 public:
57 int pc_offset() const { return _pc_offset; } 56 int pc_offset() const { return _pc_offset; }
58 int scope_decode_offset() const { return _scope_decode_offset; } 57 int scope_decode_offset() const { return _scope_decode_offset; }
59 int obj_decode_offset() const { return _obj_decode_offset; } 58 int obj_decode_offset() const { return _obj_decode_offset; }
60 jlong leaf_graph_id() const { return GRAAL_ONLY(_leaf_graph_id) NOT_GRAAL(-1); }
61 59
62 void set_pc_offset(int x) { _pc_offset = x; } 60 void set_pc_offset(int x) { _pc_offset = x; }
63 void set_scope_decode_offset(int x) { _scope_decode_offset = x; } 61 void set_scope_decode_offset(int x) { _scope_decode_offset = x; }
64 void set_obj_decode_offset(int x) { _obj_decode_offset = x; } 62 void set_obj_decode_offset(int x) { _obj_decode_offset = x; }
65 63
66 // Constructor (only used for static in nmethod.cpp) 64 // Constructor (only used for static in nmethod.cpp)
67 // Also used by ScopeDesc::sender()] 65 // Also used by ScopeDesc::sender()]
68 PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset, jlong leaf_graph_id); 66 PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset);
69 67
70 enum { 68 enum {
71 // upper and lower exclusive limits real offsets: 69 // upper and lower exclusive limits real offsets:
72 lower_offset_limit = -1, 70 lower_offset_limit = -1,
73 upper_offset_limit = (unsigned int)-1 >> 1 71 upper_offset_limit = (unsigned int)-1 >> 1
82 // Does pd refer to the same information as pd? 80 // Does pd refer to the same information as pd?
83 bool is_same_info(const PcDesc* pd) { 81 bool is_same_info(const PcDesc* pd) {
84 return _scope_decode_offset == pd->_scope_decode_offset && 82 return _scope_decode_offset == pd->_scope_decode_offset &&
85 _obj_decode_offset == pd->_obj_decode_offset && 83 _obj_decode_offset == pd->_obj_decode_offset &&
86 _flags == pd->_flags 84 _flags == pd->_flags
87 GRAAL_ONLY(&& _leaf_graph_id == pd->_leaf_graph_id)
88 ; 85 ;
89 } 86 }
90 87
91 bool is_method_handle_invoke() const { return (_flags & PCDESC_is_method_handle_invoke) != 0; } 88 bool is_method_handle_invoke() const { return (_flags & PCDESC_is_method_handle_invoke) != 0; }
92 void set_is_method_handle_invoke(bool z) { set_flag(PCDESC_is_method_handle_invoke, z); } 89 void set_is_method_handle_invoke(bool z) { set_flag(PCDESC_is_method_handle_invoke, z); }