Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/deoptimization.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 | 1b907994bf2d |
children | ab038e0d6b43 |
comparison
equal
deleted
inserted
replaced
5128:e2da6471a9a1 | 5129:51111665eda6 |
---|---|
84 #ifdef TARGET_ARCH_MODEL_ppc | 84 #ifdef TARGET_ARCH_MODEL_ppc |
85 # include "adfiles/ad_ppc.hpp" | 85 # include "adfiles/ad_ppc.hpp" |
86 #endif | 86 #endif |
87 #endif | 87 #endif |
88 | 88 |
89 #ifdef GRAAL | |
90 #include "graal/graalCompiler.hpp" | |
91 #endif | |
92 | |
93 | |
89 bool DeoptimizationMarker::_is_active = false; | 94 bool DeoptimizationMarker::_is_active = false; |
90 | 95 |
91 Deoptimization::UnrollBlock::UnrollBlock(int size_of_deoptimized_frame, | 96 Deoptimization::UnrollBlock::UnrollBlock(int size_of_deoptimized_frame, |
92 int caller_adjustment, | 97 int caller_adjustment, |
93 int caller_actual_parameters, | 98 int caller_actual_parameters, |
199 } | 204 } |
200 | 205 |
201 // Create a growable array of VFrames where each VFrame represents an inlined | 206 // Create a growable array of VFrames where each VFrame represents an inlined |
202 // Java frame. This storage is allocated with the usual system arena. | 207 // Java frame. This storage is allocated with the usual system arena. |
203 assert(deoptee.is_compiled_frame(), "Wrong frame type"); | 208 assert(deoptee.is_compiled_frame(), "Wrong frame type"); |
209 | |
210 #ifdef GRAAL | |
211 PcDesc* pc_desc = ((nmethod*) deoptee.cb())->pc_desc_at(deoptee.pc()); | |
212 int decode_offset; | |
213 if (pc_desc != NULL && pc_desc->leaf_graph_id() != -1) { | |
214 GraalCompiler* compiler = (GraalCompiler*) ((nmethod*) deoptee.cb())->compiler(); | |
215 if (PrintDeoptimizationDetails) { | |
216 tty->print_cr("leaf graph id: %d", pc_desc->leaf_graph_id()); | |
217 } | |
218 compiler->deopt_leaf_graph(pc_desc->leaf_graph_id()); | |
219 } | |
220 #endif | |
221 | |
204 GrowableArray<compiledVFrame*>* chunk = new GrowableArray<compiledVFrame*>(10); | 222 GrowableArray<compiledVFrame*>* chunk = new GrowableArray<compiledVFrame*>(10); |
205 vframe* vf = vframe::new_vframe(&deoptee, &map, thread); | 223 vframe* vf = vframe::new_vframe(&deoptee, &map, thread); |
206 while (!vf->is_top()) { | 224 while (!vf->is_top()) { |
207 assert(vf->is_compiled_frame(), "Wrong frame type"); | 225 assert(vf->is_compiled_frame(), "Wrong frame type"); |
208 chunk->push(compiledVFrame::cast(vf)); | 226 chunk->push(compiledVFrame::cast(vf)); |