< prev index next >

src/hotspot/share/code/scopeDesc.hpp

Print this page

 55   int bci() { return _bci; }
 56 };
 57 
 58 // ScopeDescs contain the information that makes source-level debugging of
 59 // nmethods possible; each scopeDesc describes a method activation
 60 
 61 class ScopeDesc : public ResourceObj {
 62  public:
 63   // Constructor
 64   ScopeDesc(const CompiledMethod* code, PcDesc* pd, bool ignore_objects = false);
 65 
 66   // Direct access to scope
 67   ScopeDesc* at_offset(int decode_offset) { return new ScopeDesc(this, decode_offset); }
 68 
 69   // JVM state
 70   Method* method()      const { return _method; }
 71   int          bci()      const { return _bci;    }
 72   bool should_reexecute() const { return _reexecute; }
 73   bool rethrow_exception() const { return _rethrow_exception; }
 74   bool return_oop()       const { return _return_oop; }

 75   // Returns true if one or more NoEscape or ArgEscape objects exist in
 76   // any of the scopes at compiled pc.
 77   bool has_ea_local_in_scope() const { return _has_ea_local_in_scope; }
 78   bool arg_escape()       const { return _arg_escape; }
 79 
 80   GrowableArray<ScopeValue*>*   locals();
 81   GrowableArray<ScopeValue*>*   expressions();
 82   GrowableArray<MonitorValue*>* monitors();
 83   GrowableArray<ScopeValue*>*   objects();
 84 
 85   // Stack walking, returns nullptr if this is the outer most scope.
 86   ScopeDesc* sender() const;
 87 
 88   // Returns where the scope was decoded
 89   int decode_offset() const { return _decode_offset; }
 90 
 91   int sender_decode_offset() const { return _sender_decode_offset; }
 92 
 93   // Tells whether sender() returns nullptr
 94   bool is_top() const;
 95 
 96  private:
 97   void initialize(const ScopeDesc* parent, int decode_offset);
 98   // Alternative constructors
 99   ScopeDesc(const ScopeDesc* parent);
100   ScopeDesc(const ScopeDesc* parent, int decode_offset);
101 
102   // JVM state
103   Method*       _method;
104   int           _bci;
105   bool          _reexecute;
106   bool          _rethrow_exception;
107   bool          _return_oop;

108   bool          _has_ea_local_in_scope;       // One or more NoEscape or ArgEscape objects exist in
109                                               // any of the scopes at compiled pc.
110   bool          _arg_escape;                  // Compiled Java call in youngest scope passes ArgEscape
111 
112   // Decoding offsets
113   int _decode_offset;
114   int _sender_decode_offset;
115   int _locals_decode_offset;
116   int _expressions_decode_offset;
117   int _monitors_decode_offset;
118 
119   // Object pool
120   GrowableArray<ScopeValue*>* _objects;
121 
122   // Nmethod information
123   const CompiledMethod* _code;
124 
125   // Decoding operations
126   void decode_body();
127   GrowableArray<ScopeValue*>* decode_scope_values(int decode_offset);
128   GrowableArray<MonitorValue*>* decode_monitor_values(int decode_offset);
129   GrowableArray<ScopeValue*>* decode_object_values(int decode_offset);
130 
131   DebugInfoReadStream* stream_at(int decode_offset) const;

 55   int bci() { return _bci; }
 56 };
 57 
 58 // ScopeDescs contain the information that makes source-level debugging of
 59 // nmethods possible; each scopeDesc describes a method activation
 60 
 61 class ScopeDesc : public ResourceObj {
 62  public:
 63   // Constructor
 64   ScopeDesc(const CompiledMethod* code, PcDesc* pd, bool ignore_objects = false);
 65 
 66   // Direct access to scope
 67   ScopeDesc* at_offset(int decode_offset) { return new ScopeDesc(this, decode_offset); }
 68 
 69   // JVM state
 70   Method* method()      const { return _method; }
 71   int          bci()      const { return _bci;    }
 72   bool should_reexecute() const { return _reexecute; }
 73   bool rethrow_exception() const { return _rethrow_exception; }
 74   bool return_oop()       const { return _return_oop; }
 75   bool return_scalarized() const { return _return_scalarized; }
 76   // Returns true if one or more NoEscape or ArgEscape objects exist in
 77   // any of the scopes at compiled pc.
 78   bool has_ea_local_in_scope() const { return _has_ea_local_in_scope; }
 79   bool arg_escape()       const { return _arg_escape; }
 80 
 81   GrowableArray<ScopeValue*>*   locals();
 82   GrowableArray<ScopeValue*>*   expressions();
 83   GrowableArray<MonitorValue*>* monitors();
 84   GrowableArray<ScopeValue*>*   objects();
 85 
 86   // Stack walking, returns nullptr if this is the outer most scope.
 87   ScopeDesc* sender() const;
 88 
 89   // Returns where the scope was decoded
 90   int decode_offset() const { return _decode_offset; }
 91 
 92   int sender_decode_offset() const { return _sender_decode_offset; }
 93 
 94   // Tells whether sender() returns nullptr
 95   bool is_top() const;
 96 
 97  private:
 98   void initialize(const ScopeDesc* parent, int decode_offset);
 99   // Alternative constructors
100   ScopeDesc(const ScopeDesc* parent);
101   ScopeDesc(const ScopeDesc* parent, int decode_offset);
102 
103   // JVM state
104   Method*       _method;
105   int           _bci;
106   bool          _reexecute;
107   bool          _rethrow_exception;
108   bool          _return_oop;
109   bool          _return_scalarized;
110   bool          _has_ea_local_in_scope;       // One or more NoEscape or ArgEscape objects exist in
111                                               // any of the scopes at compiled pc.
112   bool          _arg_escape;                  // Compiled Java call in youngest scope passes ArgEscape

113   // Decoding offsets
114   int _decode_offset;
115   int _sender_decode_offset;
116   int _locals_decode_offset;
117   int _expressions_decode_offset;
118   int _monitors_decode_offset;
119 
120   // Object pool
121   GrowableArray<ScopeValue*>* _objects;
122 
123   // Nmethod information
124   const CompiledMethod* _code;
125 
126   // Decoding operations
127   void decode_body();
128   GrowableArray<ScopeValue*>* decode_scope_values(int decode_offset);
129   GrowableArray<MonitorValue*>* decode_monitor_values(int decode_offset);
130   GrowableArray<ScopeValue*>* decode_object_values(int decode_offset);
131 
132   DebugInfoReadStream* stream_at(int decode_offset) const;
< prev index next >