< prev index next >

src/hotspot/share/memory/filemap.hpp

Print this page


 285   ReservedSpace reserve_shared_memory();
 286 
 287   // JVM/TI RedefineClasses() support:
 288   // Remap the shared readonly space to shared readwrite, private.
 289   bool  remap_shared_readonly_as_readwrite();
 290 
 291   // Errors.
 292   static void fail_stop(const char *msg, ...) ATTRIBUTE_PRINTF(1, 2);
 293   static void fail_continue(const char *msg, ...) ATTRIBUTE_PRINTF(1, 2);
 294 
 295   bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false);
 296 
 297   // Stop CDS sharing and unmap CDS regions.
 298   static void stop_sharing_and_unmap(const char* msg);
 299 
 300   static void allocate_shared_path_table();
 301   static void check_nonempty_dir_in_shared_path_table();
 302   bool validate_shared_path_table();
 303   static void update_shared_classpath(ClassPathEntry *cpe, SharedClassPathEntry* ent, TRAPS);
 304 




 305   static SharedClassPathEntry* shared_path(int index) {
 306     if (index < 0) {
 307       return NULL;
 308     }
 309     assert(index < _shared_path_table_size, "sanity");
 310     char* p = (char*)_shared_path_table->data();
 311     p += _shared_path_entry_size * index;
 312     return (SharedClassPathEntry*)p;
 313   }
 314 
 315   static const char* shared_path_name(int index) {
 316     assert(index >= 0, "Sanity");
 317     return shared_path(index)->name();
 318   }
 319 
 320   static int get_number_of_shared_paths() {
 321     return _shared_path_table_size;
 322   }
 323 
 324   char* region_addr(int idx);


 331 
 332   CDSFileMapRegion* space_at(int i) {
 333     return _header->space_at(i);
 334   }
 335 
 336   narrowOop offset_of_space(CDSFileMapRegion* spc) {
 337     return (narrowOop)(spc->_addr._offset);
 338   }
 339 
 340   // The starting address of spc, as calculated with CompressedOop::decode_non_null()
 341   address start_address_as_decoded_with_current_oop_encoding_mode(CDSFileMapRegion* spc) {
 342     return decode_start_address(spc, true);
 343   }
 344 
 345   // The starting address of spc, as calculated with HeapShared::decode_from_archive()
 346   address start_address_as_decoded_from_archive(CDSFileMapRegion* spc) {
 347     return decode_start_address(spc, false);
 348   }
 349 
 350   address decode_start_address(CDSFileMapRegion* spc, bool with_current_oop_encoding_mode);





 351 };
 352 
 353 #endif // SHARE_MEMORY_FILEMAP_HPP


 285   ReservedSpace reserve_shared_memory();
 286 
 287   // JVM/TI RedefineClasses() support:
 288   // Remap the shared readonly space to shared readwrite, private.
 289   bool  remap_shared_readonly_as_readwrite();
 290 
 291   // Errors.
 292   static void fail_stop(const char *msg, ...) ATTRIBUTE_PRINTF(1, 2);
 293   static void fail_continue(const char *msg, ...) ATTRIBUTE_PRINTF(1, 2);
 294 
 295   bool is_in_shared_region(const void* p, int idx) NOT_CDS_RETURN_(false);
 296 
 297   // Stop CDS sharing and unmap CDS regions.
 298   static void stop_sharing_and_unmap(const char* msg);
 299 
 300   static void allocate_shared_path_table();
 301   static void check_nonempty_dir_in_shared_path_table();
 302   bool validate_shared_path_table();
 303   static void update_shared_classpath(ClassPathEntry *cpe, SharedClassPathEntry* ent, TRAPS);
 304 
 305 #if INCLUDE_JVMTI
 306   static ClassFileStream* open_stream_for_jvmti(InstanceKlass* ik, TRAPS);
 307 #endif
 308 
 309   static SharedClassPathEntry* shared_path(int index) {
 310     if (index < 0) {
 311       return NULL;
 312     }
 313     assert(index < _shared_path_table_size, "sanity");
 314     char* p = (char*)_shared_path_table->data();
 315     p += _shared_path_entry_size * index;
 316     return (SharedClassPathEntry*)p;
 317   }
 318 
 319   static const char* shared_path_name(int index) {
 320     assert(index >= 0, "Sanity");
 321     return shared_path(index)->name();
 322   }
 323 
 324   static int get_number_of_shared_paths() {
 325     return _shared_path_table_size;
 326   }
 327 
 328   char* region_addr(int idx);


 335 
 336   CDSFileMapRegion* space_at(int i) {
 337     return _header->space_at(i);
 338   }
 339 
 340   narrowOop offset_of_space(CDSFileMapRegion* spc) {
 341     return (narrowOop)(spc->_addr._offset);
 342   }
 343 
 344   // The starting address of spc, as calculated with CompressedOop::decode_non_null()
 345   address start_address_as_decoded_with_current_oop_encoding_mode(CDSFileMapRegion* spc) {
 346     return decode_start_address(spc, true);
 347   }
 348 
 349   // The starting address of spc, as calculated with HeapShared::decode_from_archive()
 350   address start_address_as_decoded_from_archive(CDSFileMapRegion* spc) {
 351     return decode_start_address(spc, false);
 352   }
 353 
 354   address decode_start_address(CDSFileMapRegion* spc, bool with_current_oop_encoding_mode);
 355 
 356 #if INCLUDE_JVMTI
 357   static ClassPathEntry** _classpath_entries_for_jvmti;
 358   static ClassPathEntry* get_classpath_entry_for_jvmti(int i, TRAPS);
 359 #endif
 360 };
 361 
 362 #endif // SHARE_MEMORY_FILEMAP_HPP
< prev index next >