src/share/vm/code/scopeDesc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6910618 Sdiff src/share/vm/code

src/share/vm/code/scopeDesc.cpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *
  23  */
  24 
  25 # include "incls/_precompiled.incl"
  26 # include "incls/_scopeDesc.cpp.incl"
  27 
  28 
  29 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute) {
  30   _code          = code;
  31   _decode_offset = decode_offset;
  32   _objects       = decode_object_values(obj_decode_offset);
  33   _reexecute     = reexecute;

  34   decode_body();
  35 }
  36 
  37 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, bool reexecute) {
  38   _code          = code;
  39   _decode_offset = decode_offset;
  40   _objects       = decode_object_values(DebugInformationRecorder::serialized_null);
  41   _reexecute     = reexecute;

  42   decode_body();
  43 }
  44 
  45 
  46 ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
  47   _code          = parent->_code;
  48   _decode_offset = parent->_sender_decode_offset;
  49   _objects       = parent->_objects;
  50   _reexecute     = false; //reexecute only applies to the first scope

  51   decode_body();
  52 }
  53 
  54 
  55 void ScopeDesc::decode_body() {
  56   if (decode_offset() == DebugInformationRecorder::serialized_null) {
  57     // This is a sentinel record, which is only relevant to
  58     // approximate queries.  Decode a reasonable frame.
  59     _sender_decode_offset = DebugInformationRecorder::serialized_null;
  60     _method = methodHandle(_code->method());
  61     _bci = InvocationEntryBci;
  62     _locals_decode_offset = DebugInformationRecorder::serialized_null;
  63     _expressions_decode_offset = DebugInformationRecorder::serialized_null;
  64     _monitors_decode_offset = DebugInformationRecorder::serialized_null;
  65   } else {
  66     // decode header
  67     DebugInfoReadStream* stream  = stream_at(decode_offset());
  68 
  69     _sender_decode_offset = stream->read_int();
  70     _method = methodHandle((methodOop) stream->read_oop());




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  20  * CA 95054 USA or visit www.sun.com if you need additional information or
  21  * have any questions.
  22  *
  23  */
  24 
  25 # include "incls/_precompiled.incl"
  26 # include "incls/_scopeDesc.cpp.incl"
  27 
  28 
  29 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool return_oop) {
  30   _code          = code;
  31   _decode_offset = decode_offset;
  32   _objects       = decode_object_values(obj_decode_offset);
  33   _reexecute     = reexecute;
  34   _return_oop    = return_oop;
  35   decode_body();
  36 }
  37 
  38 ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, bool reexecute, bool return_oop) {
  39   _code          = code;
  40   _decode_offset = decode_offset;
  41   _objects       = decode_object_values(DebugInformationRecorder::serialized_null);
  42   _reexecute     = reexecute;
  43   _return_oop    = return_oop;
  44   decode_body();
  45 }
  46 
  47 
  48 ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
  49   _code          = parent->_code;
  50   _decode_offset = parent->_sender_decode_offset;
  51   _objects       = parent->_objects;
  52   _reexecute     = false; //reexecute only applies to the first scope
  53   _return_oop    = false;
  54   decode_body();
  55 }
  56 
  57 
  58 void ScopeDesc::decode_body() {
  59   if (decode_offset() == DebugInformationRecorder::serialized_null) {
  60     // This is a sentinel record, which is only relevant to
  61     // approximate queries.  Decode a reasonable frame.
  62     _sender_decode_offset = DebugInformationRecorder::serialized_null;
  63     _method = methodHandle(_code->method());
  64     _bci = InvocationEntryBci;
  65     _locals_decode_offset = DebugInformationRecorder::serialized_null;
  66     _expressions_decode_offset = DebugInformationRecorder::serialized_null;
  67     _monitors_decode_offset = DebugInformationRecorder::serialized_null;
  68   } else {
  69     // decode header
  70     DebugInfoReadStream* stream  = stream_at(decode_offset());
  71 
  72     _sender_decode_offset = stream->read_int();
  73     _method = methodHandle((methodOop) stream->read_oop());


src/share/vm/code/scopeDesc.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File