< prev index next >

src/hotspot/share/code/scopeDesc.hpp

Print this page

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

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

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

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

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