@@ -799,7 +799,7 @@ bool AOTCodeCache::finish_write() {
799799
800800// ------------------Store/Load AOT code ----------------------
801801
802- bool AOTCodeCache::store_code_blob (CodeBlob& blob, AOTCodeEntry::Kind entry_kind, uint id, const char * name, int entry_offset_count, int * entry_offsets ) {
802+ bool AOTCodeCache::store_code_blob (CodeBlob& blob, AOTCodeEntry::Kind entry_kind, uint id, const char * name) {
803803 AOTCodeCache* cache = open_for_dump ();
804804 if (cache == nullptr ) {
805805 return false ;
@@ -883,18 +883,6 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind
883883 return false ;
884884 }
885885
886- // Write entries offsets
887- n = cache->write_bytes (&entry_offset_count, sizeof (int ));
888- if (n != sizeof (int )) {
889- return false ;
890- }
891- for (int i = 0 ; i < entry_offset_count; i++) {
892- uint32_t off = (uint32_t )entry_offsets[i];
893- n = cache->write_bytes (&off, sizeof (uint32_t ));
894- if (n != sizeof (uint32_t )) {
895- return false ;
896- }
897- }
898886 uint entry_size = cache->_write_position - entry_position;
899887 AOTCodeEntry* entry = new (cache) AOTCodeEntry (entry_kind, encode_id (entry_kind, id),
900888 entry_position, entry_size, name_offset, name_size,
@@ -903,13 +891,13 @@ bool AOTCodeCache::store_code_blob(CodeBlob& blob, AOTCodeEntry::Kind entry_kind
903891 return true ;
904892}
905893
906- bool AOTCodeCache::store_code_blob (CodeBlob& blob, AOTCodeEntry::Kind entry_kind, BlobId id, int entry_offset_count, int * entry_offsets ) {
894+ bool AOTCodeCache::store_code_blob (CodeBlob& blob, AOTCodeEntry::Kind entry_kind, BlobId id) {
907895 assert (AOTCodeEntry::is_blob (entry_kind),
908896 " wrong entry kind for blob id %s" , StubInfo::name (id));
909- return store_code_blob (blob, entry_kind, (uint)id, StubInfo::name (id), entry_offset_count, entry_offsets );
897+ return store_code_blob (blob, entry_kind, (uint)id, StubInfo::name (id));
910898}
911899
912- CodeBlob* AOTCodeCache::load_code_blob (AOTCodeEntry::Kind entry_kind, uint id, const char * name, int entry_offset_count, int * entry_offsets ) {
900+ CodeBlob* AOTCodeCache::load_code_blob (AOTCodeEntry::Kind entry_kind, uint id, const char * name) {
913901 AOTCodeCache* cache = open_for_use ();
914902 if (cache == nullptr ) {
915903 return nullptr ;
@@ -929,20 +917,20 @@ CodeBlob* AOTCodeCache::load_code_blob(AOTCodeEntry::Kind entry_kind, uint id, c
929917 return nullptr ;
930918 }
931919 AOTCodeReader reader (cache, entry);
932- CodeBlob* blob = reader.compile_code_blob (name, entry_offset_count, entry_offsets );
920+ CodeBlob* blob = reader.compile_code_blob (name);
933921
934922 log_debug (aot, codecache, stubs)(" %sRead blob '%s' (id=%u, kind=%s) from AOT Code Cache" ,
935923 (blob == nullptr ? " Failed to " : " " ), name, id, aot_code_entry_kind_name[entry_kind]);
936924 return blob;
937925}
938926
939- CodeBlob* AOTCodeCache::load_code_blob (AOTCodeEntry::Kind entry_kind, BlobId id, int entry_offset_count, int * entry_offsets ) {
927+ CodeBlob* AOTCodeCache::load_code_blob (AOTCodeEntry::Kind entry_kind, BlobId id) {
940928 assert (AOTCodeEntry::is_blob (entry_kind),
941929 " wrong entry kind for blob id %s" , StubInfo::name (id));
942- return load_code_blob (entry_kind, (uint)id, StubInfo::name (id), entry_offset_count, entry_offsets );
930+ return load_code_blob (entry_kind, (uint)id, StubInfo::name (id));
943931}
944932
945- CodeBlob* AOTCodeReader::compile_code_blob (const char * name, int entry_offset_count, int * entry_offsets ) {
933+ CodeBlob* AOTCodeReader::compile_code_blob (const char * name) {
946934 uint entry_position = _entry->offset ();
947935
948936 // Read name
@@ -989,21 +977,6 @@ CodeBlob* AOTCodeReader::compile_code_blob(const char* name, int entry_offset_co
989977
990978 fix_relocations (code_blob);
991979
992- // Read entries offsets
993- offset = read_position ();
994- int stored_count = *(int *)addr (offset);
995- assert (stored_count == entry_offset_count, " entry offset count mismatch, count in AOT code cache=%d, expected=%d" , stored_count, entry_offset_count);
996- offset += sizeof (int );
997- set_read_position (offset);
998- for (int i = 0 ; i < stored_count; i++) {
999- uint32_t off = *(uint32_t *)addr (offset);
1000- offset += sizeof (uint32_t );
1001- const char * entry_name = (_entry->kind () == AOTCodeEntry::Adapter) ? AdapterHandlerEntry::entry_name (i) : " " ;
1002- log_trace (aot, codecache, stubs)(" Reading adapter '%s:%s' (0x%x) offset: 0x%x from AOT Code Cache" ,
1003- stored_name, entry_name, _entry->id (), off);
1004- entry_offsets[i] = off;
1005- }
1006-
1007980#ifdef ASSERT
1008981 LogStreamHandle (Trace, aot, codecache, stubs) log;
1009982 if (log.is_enabled ()) {
0 commit comments