< prev index next >

src/hotspot/share/code/scopeDesc.hpp

Print this page
rev 53032 : imported patch 8215205
rev 53033 : imported patch at_scope


  50     _bci              = buffer.read_bci();
  51   }
  52 
  53   Method* method() { return _method; }
  54   int bci() { return _bci; }
  55 };
  56 
  57 // ScopeDescs contain the information that makes source-level debugging of
  58 // nmethods possible; each scopeDesc describes a method activation
  59 
  60 class ScopeDesc : public ResourceObj {
  61  public:
  62   // Constructor
  63   ScopeDesc(const CompiledMethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool rethrow_exception, bool return_oop);
  64 
  65   // Calls above, giving default value of "serialized_null" to the
  66   // "obj_decode_offset" argument.  (We don't use a default argument to
  67   // avoid a .hpp-.hpp dependency.)
  68   ScopeDesc(const CompiledMethod* code, int decode_offset, bool reexecute, bool rethrow_exception, bool return_oop);
  69 



  70   // JVM state
  71   Method* method()      const { return _method; }
  72   int          bci()      const { return _bci;    }
  73   bool should_reexecute() const { return _reexecute; }
  74   bool rethrow_exception() const { return _rethrow_exception; }
  75   bool return_oop()       const { return _return_oop; }
  76 
  77   GrowableArray<ScopeValue*>*   locals();
  78   GrowableArray<ScopeValue*>*   expressions();
  79   GrowableArray<MonitorValue*>* monitors();
  80   GrowableArray<ScopeValue*>*   objects();
  81 
  82   // Stack walking, returns NULL if this is the outer most scope.
  83   ScopeDesc* sender() const;
  84 
  85   // Returns where the scope was decoded
  86   int decode_offset() const { return _decode_offset; }
  87 


  88   // Tells whether sender() returns NULL
  89   bool is_top() const;
  90 
  91  private:
  92   // Alternative constructor

  93   ScopeDesc(const ScopeDesc* parent);

  94 
  95   // JVM state
  96   Method*       _method;
  97   int           _bci;
  98   bool          _reexecute;
  99   bool          _rethrow_exception;
 100   bool          _return_oop;
 101 
 102   // Decoding offsets
 103   int _decode_offset;
 104   int _sender_decode_offset;
 105   int _locals_decode_offset;
 106   int _expressions_decode_offset;
 107   int _monitors_decode_offset;
 108 
 109   // Object pool
 110   GrowableArray<ScopeValue*>* _objects;
 111 
 112   // Nmethod information
 113   const CompiledMethod* _code;




  50     _bci              = buffer.read_bci();
  51   }
  52 
  53   Method* method() { return _method; }
  54   int bci() { return _bci; }
  55 };
  56 
  57 // ScopeDescs contain the information that makes source-level debugging of
  58 // nmethods possible; each scopeDesc describes a method activation
  59 
  60 class ScopeDesc : public ResourceObj {
  61  public:
  62   // Constructor
  63   ScopeDesc(const CompiledMethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool rethrow_exception, bool return_oop);
  64 
  65   // Calls above, giving default value of "serialized_null" to the
  66   // "obj_decode_offset" argument.  (We don't use a default argument to
  67   // avoid a .hpp-.hpp dependency.)
  68   ScopeDesc(const CompiledMethod* code, int decode_offset, bool reexecute, bool rethrow_exception, bool return_oop);
  69 
  70   // Direct access to scope
  71   ScopeDesc* at_offset(int decode_offset) { return new ScopeDesc(this, decode_offset); }
  72 
  73   // JVM state
  74   Method* method()      const { return _method; }
  75   int          bci()      const { return _bci;    }
  76   bool should_reexecute() const { return _reexecute; }
  77   bool rethrow_exception() const { return _rethrow_exception; }
  78   bool return_oop()       const { return _return_oop; }
  79 
  80   GrowableArray<ScopeValue*>*   locals();
  81   GrowableArray<ScopeValue*>*   expressions();
  82   GrowableArray<MonitorValue*>* monitors();
  83   GrowableArray<ScopeValue*>*   objects();
  84 
  85   // Stack walking, returns NULL 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 NULL
  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 
 109   // Decoding offsets
 110   int _decode_offset;
 111   int _sender_decode_offset;
 112   int _locals_decode_offset;
 113   int _expressions_decode_offset;
 114   int _monitors_decode_offset;
 115 
 116   // Object pool
 117   GrowableArray<ScopeValue*>* _objects;
 118 
 119   // Nmethod information
 120   const CompiledMethod* _code;


< prev index next >