Mercurial > hg > truffle
comparison src/share/vm/code/pcDesc.cpp @ 5129:51111665eda6
Support for recording a leaf graph id for each deoptimization point in the debug info.
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 21 Mar 2012 10:47:02 +0100 |
parents | 04b9a2566eec |
children | 5d0bb7d52783 |
comparison
equal
deleted
inserted
replaced
5128:e2da6471a9a1 | 5129:51111665eda6 |
---|---|
27 #include "code/nmethod.hpp" | 27 #include "code/nmethod.hpp" |
28 #include "code/pcDesc.hpp" | 28 #include "code/pcDesc.hpp" |
29 #include "code/scopeDesc.hpp" | 29 #include "code/scopeDesc.hpp" |
30 #include "memory/resourceArea.hpp" | 30 #include "memory/resourceArea.hpp" |
31 | 31 |
32 PcDesc::PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset) { | 32 PcDesc::PcDesc(int pc_offset, int scope_decode_offset, int obj_decode_offset, jlong leaf_graph_id) { |
33 _pc_offset = pc_offset; | 33 _pc_offset = pc_offset; |
34 _scope_decode_offset = scope_decode_offset; | 34 _scope_decode_offset = scope_decode_offset; |
35 _obj_decode_offset = obj_decode_offset; | 35 _obj_decode_offset = obj_decode_offset; |
36 _flags = 0; | 36 _flags = 0; |
37 GRAAL_ONLY(_leaf_graph_id = leaf_graph_id); | |
37 } | 38 } |
38 | 39 |
39 address PcDesc::real_pc(const nmethod* code) const { | 40 address PcDesc::real_pc(const nmethod* code) const { |
40 return code->code_begin() + pc_offset(); | 41 return code->code_begin() + pc_offset(); |
41 } | 42 } |
42 | 43 |
43 void PcDesc::print(nmethod* code) { | 44 void PcDesc::print(nmethod* code) { |
44 #ifndef PRODUCT | 45 #ifndef PRODUCT |
45 ResourceMark rm; | 46 ResourceMark rm; |
47 #ifdef GRAAL | |
48 tty->print_cr("PcDesc(pc=0x%lx offset=%x bits=%x leaf_graph_id=%d):", real_pc(code), pc_offset(), _flags, leaf_graph_id()); | |
49 #else | |
46 tty->print_cr("PcDesc(pc=0x%lx offset=%x bits=%x):", real_pc(code), pc_offset(), _flags); | 50 tty->print_cr("PcDesc(pc=0x%lx offset=%x bits=%x):", real_pc(code), pc_offset(), _flags); |
51 #endif | |
47 | 52 |
48 if (scope_decode_offset() == DebugInformationRecorder::serialized_null) { | 53 if (scope_decode_offset() == DebugInformationRecorder::serialized_null) { |
49 return; | 54 return; |
50 } | 55 } |
51 | 56 |