Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/deoptimization.cpp @ 3090:536528f48708
more escape analysis work: debug info
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 28 Jun 2011 19:14:28 +0200 |
parents | 79165996a12d |
children | 4b63eb1197ca |
comparison
equal
deleted
inserted
replaced
3089:05b8a7787aaf | 3090:536528f48708 |
---|---|
204 vf = vf->sender(); | 204 vf = vf->sender(); |
205 } | 205 } |
206 assert(vf->is_compiled_frame(), "Wrong frame type"); | 206 assert(vf->is_compiled_frame(), "Wrong frame type"); |
207 chunk->push(compiledVFrame::cast(vf)); | 207 chunk->push(compiledVFrame::cast(vf)); |
208 | 208 |
209 #ifdef COMPILER2 | 209 //#ifdef COMPILER2 |
210 // Reallocate the non-escaping objects and restore their fields. Then | 210 // Reallocate the non-escaping objects and restore their fields. Then |
211 // relock objects if synchronization on them was eliminated. | 211 // relock objects if synchronization on them was eliminated. |
212 if (DoEscapeAnalysis) { | 212 // if (DoEscapeAnalysis) { |
213 if (EliminateAllocations) { | 213 // if (EliminateAllocations) { |
214 assert (chunk->at(0)->scope() != NULL,"expect only compiled java frames"); | 214 assert (chunk->at(0)->scope() != NULL,"expect only compiled java frames"); |
215 GrowableArray<ScopeValue*>* objects = chunk->at(0)->scope()->objects(); | 215 GrowableArray<ScopeValue*>* objects = chunk->at(0)->scope()->objects(); |
216 | 216 |
217 // The flag return_oop() indicates call sites which return oop | 217 // The flag return_oop() indicates call sites which return oop |
218 // in compiled code. Such sites include java method calls, | 218 // in compiled code. Such sites include java method calls, |
252 } | 252 } |
253 if (save_oop_result) { | 253 if (save_oop_result) { |
254 // Restore result. | 254 // Restore result. |
255 deoptee.set_saved_oop_result(&map, return_value()); | 255 deoptee.set_saved_oop_result(&map, return_value()); |
256 } | 256 } |
257 } | 257 // } |
258 if (EliminateLocks) { | 258 // if (EliminateLocks) { |
259 #ifndef PRODUCT | 259 #ifndef PRODUCT |
260 bool first = true; | 260 bool first = true; |
261 #endif | 261 #endif |
262 for (int i = 0; i < chunk->length(); i++) { | 262 for (int i = 0; i < chunk->length(); i++) { |
263 compiledVFrame* cvf = chunk->at(i); | 263 compiledVFrame* cvf = chunk->at(i); |
280 } | 280 } |
281 } | 281 } |
282 #endif | 282 #endif |
283 } | 283 } |
284 } | 284 } |
285 } | 285 // } |
286 } | 286 // } |
287 #endif // COMPILER2 | 287 //#endif // COMPILER2 |
288 // Ensure that no safepoint is taken after pointers have been stored | 288 // Ensure that no safepoint is taken after pointers have been stored |
289 // in fields of rematerialized objects. If a safepoint occurs from here on | 289 // in fields of rematerialized objects. If a safepoint occurs from here on |
290 // out the java state residing in the vframeArray will be missed. | 290 // out the java state residing in the vframeArray will be missed. |
291 No_Safepoint_Verifier no_safepoint; | 291 No_Safepoint_Verifier no_safepoint; |
292 | 292 |
707 Threads::deoptimized_wrt_marked_nmethods(); | 707 Threads::deoptimized_wrt_marked_nmethods(); |
708 return 0; | 708 return 0; |
709 } | 709 } |
710 | 710 |
711 | 711 |
712 #ifdef COMPILER2 | 712 //#ifdef COMPILER2 |
713 bool Deoptimization::realloc_objects(JavaThread* thread, frame* fr, GrowableArray<ScopeValue*>* objects, TRAPS) { | 713 bool Deoptimization::realloc_objects(JavaThread* thread, frame* fr, GrowableArray<ScopeValue*>* objects, TRAPS) { |
714 Handle pending_exception(thread->pending_exception()); | 714 Handle pending_exception(thread->pending_exception()); |
715 const char* exception_file = thread->exception_file(); | 715 const char* exception_file = thread->exception_file(); |
716 int exception_line = thread->exception_line(); | 716 int exception_line = thread->exception_line(); |
717 thread->clear_pending_exception(); | 717 thread->clear_pending_exception(); |
949 k->oop_print_on(obj(), tty); | 949 k->oop_print_on(obj(), tty); |
950 } | 950 } |
951 } | 951 } |
952 } | 952 } |
953 #endif | 953 #endif |
954 #endif // COMPILER2 | 954 //#endif // COMPILER2 |
955 | 955 |
956 vframeArray* Deoptimization::create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk) { | 956 vframeArray* Deoptimization::create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk) { |
957 | 957 |
958 #ifndef PRODUCT | 958 #ifndef PRODUCT |
959 if (TraceDeoptimization) { | 959 if (TraceDeoptimization) { |