comparison src/share/vm/code/nmethod.hpp @ 13641:5a9afbf72714

Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 12 Dec 2013 15:13:02 +0100
parents 02f27ecb4f3a
children cd22c8dbda4f d8041d695d19
comparison
equal deleted inserted replaced
13640:bfe7a8c8c3c6 13641:5a9afbf72714
117 jmethodID _jmethod_id; // Cache of method()->jmethod_id() 117 jmethodID _jmethod_id; // Cache of method()->jmethod_id()
118 118
119 #ifdef GRAAL 119 #ifdef GRAAL
120 // Needed to keep nmethods alive that are not the default nmethod for the associated Method. 120 // Needed to keep nmethods alive that are not the default nmethod for the associated Method.
121 oop _graal_installed_code; 121 oop _graal_installed_code;
122 typeArrayOop _triggered_deoptimizations; 122 oop _speculation_log;
123 #endif 123 #endif
124 124
125 // To support simple linked-list chaining of nmethods: 125 // To support simple linked-list chaining of nmethods:
126 nmethod* _osr_link; // from InstanceKlass::osr_nmethods_head 126 nmethod* _osr_link; // from InstanceKlass::osr_nmethods_head
127 nmethod* _scavenge_root_link; // from CodeCache::scavenge_root_nmethods 127 nmethod* _scavenge_root_link; // from CodeCache::scavenge_root_nmethods
278 AbstractCompiler* compiler, 278 AbstractCompiler* compiler,
279 int comp_level, 279 int comp_level,
280 GrowableArray<jlong>* leaf_graph_ids 280 GrowableArray<jlong>* leaf_graph_ids
281 #ifdef GRAAL 281 #ifdef GRAAL
282 , Handle installed_code, 282 , Handle installed_code,
283 Handle triggered_deoptimizations 283 Handle speculation_log
284 #endif 284 #endif
285 ); 285 );
286 286
287 // helper methods 287 // helper methods
288 void* operator new(size_t size, int nmethod_size) throw(); 288 void* operator new(size_t size, int nmethod_size) throw();
320 AbstractCompiler* compiler, 320 AbstractCompiler* compiler,
321 int comp_level, 321 int comp_level,
322 GrowableArray<jlong>* leaf_graph_ids = NULL 322 GrowableArray<jlong>* leaf_graph_ids = NULL
323 #ifdef GRAAL 323 #ifdef GRAAL
324 , Handle installed_code = Handle(), 324 , Handle installed_code = Handle(),
325 Handle triggered_deoptimizations = Handle() 325 Handle speculation_log = Handle()
326 #endif 326 #endif
327 ); 327 );
328 328
329 static nmethod* new_native_nmethod(methodHandle method, 329 static nmethod* new_native_nmethod(methodHandle method,
330 int compile_id, 330 int compile_id,
590 void set_method(Method* method) { _method = method; } 590 void set_method(Method* method) { _method = method; }
591 591
592 #ifdef GRAAL 592 #ifdef GRAAL
593 oop graal_installed_code() { return _graal_installed_code ; } 593 oop graal_installed_code() { return _graal_installed_code ; }
594 void set_graal_installed_code(oop installed_code) { _graal_installed_code = installed_code; } 594 void set_graal_installed_code(oop installed_code) { _graal_installed_code = installed_code; }
595 oop speculation_log() { return _speculation_log ; }
596 void set_speculation_log(oop speculation_log) { _speculation_log = speculation_log; }
595 #endif 597 #endif
596 598
597 // GC support 599 // GC support
598 void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); 600 void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
599 bool can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred); 601 bool can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred);