< prev index next >

src/share/vm/aot/aotCodeHeap.hpp

Print this page




 231   AOTCodeHeap(AOTLib* lib);
 232   virtual ~AOTCodeHeap();
 233 
 234   address low_boundary()  const { return _low_boundary; }
 235   address high_boundary() const { return (address)CodeHeap::high(); }
 236 
 237   bool contains(const void* p) const {
 238     bool result = (low_boundary() <= p) && (p < high_boundary());
 239     assert(!result || (_method_count > 0), "");
 240     assert(result == CodeHeap::contains(p), "");
 241     return result;
 242   }
 243   AOTCompiledMethod* find_aot(address p) const;
 244 
 245   virtual void* find_start(void* p)     const;
 246   virtual CodeBlob* find_blob_unsafe(void* start) const;
 247   virtual void* first() const;
 248   virtual void* next(void *p) const;
 249 
 250   AOTKlassData* find_klass(InstanceKlass* ik);
 251   bool load_klass_data(instanceKlassHandle kh, Thread* thread);
 252   Klass* get_klass_from_got(const char* klass_name, int klass_len, const Method* method);
 253   void sweep_dependent_methods(AOTKlassData* klass_data);
 254   bool is_dependent_method(Klass* dependee, AOTCompiledMethod* aot);
 255 
 256   const char* get_name_at(int offset) {
 257     return _metaspace_names + offset;
 258   }
 259 
 260   void oops_do(OopClosure* f);
 261   void metadata_do(void f(Metadata*));
 262   void got_metadata_do(void f(Metadata*));
 263 
 264 #ifdef ASSERT
 265   bool got_contains(Metadata **p) {
 266     return (p >= &_metadata_got[0] && p < &_metadata_got[_metadata_got_size]) ||
 267            (p >= &_metaspace_got[0] && p < &_metaspace_got[_metaspace_got_size]);
 268   }
 269 #endif
 270 
 271   int dso_id() const { return _lib->id(); }
 272   int aot_id() const { return _aot_id; }
 273 
 274   int method_count() { return _method_count; }
 275 
 276   AOTCompiledMethod* get_code_desc_at_index(int index) {
 277     if (index < _method_count && _code_to_aot[index]._state == in_use) {
 278         AOTCompiledMethod* m = _code_to_aot[index]._aot;
 279         assert(m != NULL, "AOT method should be set");
 280         if (!m->is_runtime_stub()) {
 281           return m;
 282         }
 283     }
 284     return NULL;
 285   }
 286 
 287   static Method* find_method(KlassHandle klass, Thread* thread, const char* method_name);
 288 
 289   void cleanup_inline_caches();
 290 
 291   DEBUG_ONLY( int verify_icholder_relocations(); )
 292 
 293   void flush_evol_dependents_on(instanceKlassHandle dependee);
 294 
 295   void alive_methods_do(void f(CompiledMethod* nm));
 296 
 297 #ifndef PRODUCT
 298   static int klasses_seen;
 299   static int aot_klasses_found;
 300   static int aot_klasses_fp_miss;
 301   static int aot_klasses_cl_miss;
 302   static int aot_methods_found;
 303 
 304   static void print_statistics();
 305 #endif
 306 };
 307 
 308 #endif // SHARE_VM_AOT_AOTCODEHEAP_HPP


 231   AOTCodeHeap(AOTLib* lib);
 232   virtual ~AOTCodeHeap();
 233 
 234   address low_boundary()  const { return _low_boundary; }
 235   address high_boundary() const { return (address)CodeHeap::high(); }
 236 
 237   bool contains(const void* p) const {
 238     bool result = (low_boundary() <= p) && (p < high_boundary());
 239     assert(!result || (_method_count > 0), "");
 240     assert(result == CodeHeap::contains(p), "");
 241     return result;
 242   }
 243   AOTCompiledMethod* find_aot(address p) const;
 244 
 245   virtual void* find_start(void* p)     const;
 246   virtual CodeBlob* find_blob_unsafe(void* start) const;
 247   virtual void* first() const;
 248   virtual void* next(void *p) const;
 249 
 250   AOTKlassData* find_klass(InstanceKlass* ik);
 251   bool load_klass_data(InstanceKlass* ik, Thread* thread);
 252   Klass* get_klass_from_got(const char* klass_name, int klass_len, const Method* method);
 253   void sweep_dependent_methods(AOTKlassData* klass_data);
 254   bool is_dependent_method(Klass* dependee, AOTCompiledMethod* aot);
 255 
 256   const char* get_name_at(int offset) {
 257     return _metaspace_names + offset;
 258   }
 259 
 260   void oops_do(OopClosure* f);
 261   void metadata_do(void f(Metadata*));
 262   void got_metadata_do(void f(Metadata*));
 263 
 264 #ifdef ASSERT
 265   bool got_contains(Metadata **p) {
 266     return (p >= &_metadata_got[0] && p < &_metadata_got[_metadata_got_size]) ||
 267            (p >= &_metaspace_got[0] && p < &_metaspace_got[_metaspace_got_size]);
 268   }
 269 #endif
 270 
 271   int dso_id() const { return _lib->id(); }
 272   int aot_id() const { return _aot_id; }
 273 
 274   int method_count() { return _method_count; }
 275 
 276   AOTCompiledMethod* get_code_desc_at_index(int index) {
 277     if (index < _method_count && _code_to_aot[index]._state == in_use) {
 278         AOTCompiledMethod* m = _code_to_aot[index]._aot;
 279         assert(m != NULL, "AOT method should be set");
 280         if (!m->is_runtime_stub()) {
 281           return m;
 282         }
 283     }
 284     return NULL;
 285   }
 286 
 287   static Method* find_method(Klass* klass, Thread* thread, const char* method_name);
 288 
 289   void cleanup_inline_caches();
 290 
 291   DEBUG_ONLY( int verify_icholder_relocations(); )
 292 
 293   void flush_evol_dependents_on(InstanceKlass* dependee);
 294 
 295   void alive_methods_do(void f(CompiledMethod* nm));
 296 
 297 #ifndef PRODUCT
 298   static int klasses_seen;
 299   static int aot_klasses_found;
 300   static int aot_klasses_fp_miss;
 301   static int aot_klasses_cl_miss;
 302   static int aot_methods_found;
 303 
 304   static void print_statistics();
 305 #endif
 306 };
 307 
 308 #endif // SHARE_VM_AOT_AOTCODEHEAP_HPP
< prev index next >