< prev index next >

src/hotspot/share/aot/aotCodeHeap.hpp

Print this page
rev 47466 : 8132547: [AOT] support invokedynamic instructions
Reviewed-by: iveresov, kvn


 224 
 225 
 226   AOTCompiledMethod* next_in_use_at(int index) const;
 227 
 228   // Find klass in SystemDictionary for aot metadata.
 229   static Klass* lookup_klass(const char* name, int len, const Method* method, Thread* THREAD);
 230 public:
 231   AOTCodeHeap(AOTLib* lib);
 232   virtual ~AOTCodeHeap();
 233 
 234   AOTCompiledMethod* find_aot(address p) const;
 235 
 236   virtual void* find_start(void* p)     const;
 237   virtual CodeBlob* find_blob_unsafe(void* start) const;
 238   virtual void* first() const;
 239   virtual void* next(void *p) const;
 240 
 241   AOTKlassData* find_klass(InstanceKlass* ik);
 242   bool load_klass_data(InstanceKlass* ik, Thread* thread);
 243   Klass* get_klass_from_got(const char* klass_name, int klass_len, const Method* method);
 244   void sweep_dependent_methods(AOTKlassData* klass_data);
 245   bool is_dependent_method(Klass* dependee, AOTCompiledMethod* aot);
 246 
 247   const char* get_name_at(int offset) {
 248     return _metaspace_names + offset;
 249   }
 250 

 251   void oops_do(OopClosure* f);
 252   void metadata_do(void f(Metadata*));
 253   void got_metadata_do(void f(Metadata*));
 254 
 255 #ifdef ASSERT
 256   bool got_contains(Metadata **p) {
 257     return (p >= &_metadata_got[0] && p < &_metadata_got[_metadata_got_size]) ||
 258            (p >= &_klasses_got[0] && p < &_klasses_got[_klasses_got_size]);
 259   }
 260 #endif
 261 
 262   int dso_id() const { return _lib->id(); }
 263   int aot_id() const { return _aot_id; }
 264 
 265   int method_count() { return _method_count; }
 266 
 267   AOTCompiledMethod* get_code_desc_at_index(int index) {
 268     if (index < _method_count && _code_to_aot[index]._state == in_use) {
 269         AOTCompiledMethod* m = _code_to_aot[index]._aot;
 270         assert(m != NULL, "AOT method should be set");


 277 
 278   static Method* find_method(Klass* klass, Thread* thread, const char* method_name);
 279 
 280   void cleanup_inline_caches();
 281 
 282   DEBUG_ONLY( int verify_icholder_relocations(); )
 283 
 284   void flush_evol_dependents_on(InstanceKlass* dependee);
 285 
 286   void alive_methods_do(void f(CompiledMethod* nm));
 287 
 288 #ifndef PRODUCT
 289   static int klasses_seen;
 290   static int aot_klasses_found;
 291   static int aot_klasses_fp_miss;
 292   static int aot_klasses_cl_miss;
 293   static int aot_methods_found;
 294 
 295   static void print_statistics();
 296 #endif















 297 };
 298 
 299 #endif // SHARE_VM_AOT_AOTCODEHEAP_HPP


 224 
 225 
 226   AOTCompiledMethod* next_in_use_at(int index) const;
 227 
 228   // Find klass in SystemDictionary for aot metadata.
 229   static Klass* lookup_klass(const char* name, int len, const Method* method, Thread* THREAD);
 230 public:
 231   AOTCodeHeap(AOTLib* lib);
 232   virtual ~AOTCodeHeap();
 233 
 234   AOTCompiledMethod* find_aot(address p) const;
 235 
 236   virtual void* find_start(void* p)     const;
 237   virtual CodeBlob* find_blob_unsafe(void* start) const;
 238   virtual void* first() const;
 239   virtual void* next(void *p) const;
 240 
 241   AOTKlassData* find_klass(InstanceKlass* ik);
 242   bool load_klass_data(InstanceKlass* ik, Thread* thread);
 243   Klass* get_klass_from_got(const char* klass_name, int klass_len, const Method* method);
 244 
 245   bool is_dependent_method(Klass* dependee, AOTCompiledMethod* aot);
 246 
 247   const char* get_name_at(int offset) {
 248     return _metaspace_names + offset;
 249   }
 250 
 251 
 252   void oops_do(OopClosure* f);
 253   void metadata_do(void f(Metadata*));
 254   void got_metadata_do(void f(Metadata*));
 255 
 256 #ifdef ASSERT
 257   bool got_contains(Metadata **p) {
 258     return (p >= &_metadata_got[0] && p < &_metadata_got[_metadata_got_size]) ||
 259            (p >= &_klasses_got[0] && p < &_klasses_got[_klasses_got_size]);
 260   }
 261 #endif
 262 
 263   int dso_id() const { return _lib->id(); }
 264   int aot_id() const { return _aot_id; }
 265 
 266   int method_count() { return _method_count; }
 267 
 268   AOTCompiledMethod* get_code_desc_at_index(int index) {
 269     if (index < _method_count && _code_to_aot[index]._state == in_use) {
 270         AOTCompiledMethod* m = _code_to_aot[index]._aot;
 271         assert(m != NULL, "AOT method should be set");


 278 
 279   static Method* find_method(Klass* klass, Thread* thread, const char* method_name);
 280 
 281   void cleanup_inline_caches();
 282 
 283   DEBUG_ONLY( int verify_icholder_relocations(); )
 284 
 285   void flush_evol_dependents_on(InstanceKlass* dependee);
 286 
 287   void alive_methods_do(void f(CompiledMethod* nm));
 288 
 289 #ifndef PRODUCT
 290   static int klasses_seen;
 291   static int aot_klasses_found;
 292   static int aot_klasses_fp_miss;
 293   static int aot_klasses_cl_miss;
 294   static int aot_methods_found;
 295 
 296   static void print_statistics();
 297 #endif
 298 
 299   bool reconcile_dynamic_invoke(AOTCompiledMethod* caller, InstanceKlass* holder, int index, Method* adapter_method, Klass *appendix_klass);
 300 
 301 private:
 302   AOTKlassData* find_klass(const char* name);
 303 
 304   void sweep_dependent_methods(int* indexes, int methods_cnt);
 305   void sweep_dependent_methods(AOTKlassData* klass_data);
 306   void sweep_dependent_methods(InstanceKlass* ik);
 307   void sweep_method(AOTCompiledMethod* aot);
 308 
 309   bool reconcile_dynamic_klass(AOTCompiledMethod *caller, InstanceKlass* holder, int index, Klass *dyno, const char *descriptor1, const char *descriptor2 = NULL);
 310 
 311   bool reconcile_dynamic_method(AOTCompiledMethod *caller, InstanceKlass* holder, int index, Method *adapter_method);
 312 
 313 };
 314 
 315 #endif // SHARE_VM_AOT_AOTCODEHEAP_HPP
< prev index next >