< prev index next >

src/hotspot/share/cds/archiveHeapWriter.hpp

Print this page

232   static bool is_too_large_to_archive(size_t size);
233   static bool is_too_large_to_archive(oop obj);
234   static bool is_string_too_large_to_archive(oop string);
235   static void write(GrowableArrayCHeap<oop, mtClassShared>*, ArchiveHeapInfo* heap_info);
236   static address requested_address();  // requested address of the lowest achived heap object
237   static oop heap_roots_requested_address(); // requested address of HeapShared::roots()
238   static address buffered_heap_roots_addr() {
239     return offset_to_buffered_address<address>(_heap_roots_offset);
240   }
241   static size_t heap_roots_word_size() {
242     return _heap_roots_word_size;
243   }
244   static size_t get_filler_size_at(address buffered_addr);
245 
246   static void mark_native_pointer(oop src_obj, int offset);
247   static bool is_marked_as_native_pointer(ArchiveHeapInfo* heap_info, oop src_obj, int field_offset);
248   static oop source_obj_to_requested_obj(oop src_obj);
249   static oop buffered_addr_to_source_obj(address buffered_addr);
250   static address buffered_addr_to_requested_addr(address buffered_addr);
251 
252   // Archived heap object headers carry pre-computed narrow Klass ids calculated with the
253   // following scheme:
254   // 1) the encoding base must be the mapping start address.
255   // 2) shift must be large enough to result in an encoding range that covers the runtime Klass range.
256   //    That Klass range is defined by CDS archive size and runtime class space size. Luckily, the maximum
257   //    size can be predicted: archive size is assumed to be <1G, class space size capped at 3G, and at
258   //    runtime we put both regions adjacent to each other. Therefore, runtime Klass range size < 4G.
259   //    Since nKlass itself is 32 bit, our encoding range len is 4G, and since we set the base directly
260   //    at mapping start, these 4G are enough. Therefore, we don't need to shift at all (shift=0).
261   static constexpr int precomputed_narrow_klass_shift = 0;
262 
263 };
264 #endif // INCLUDE_CDS_JAVA_HEAP
265 #endif // SHARE_CDS_ARCHIVEHEAPWRITER_HPP

232   static bool is_too_large_to_archive(size_t size);
233   static bool is_too_large_to_archive(oop obj);
234   static bool is_string_too_large_to_archive(oop string);
235   static void write(GrowableArrayCHeap<oop, mtClassShared>*, ArchiveHeapInfo* heap_info);
236   static address requested_address();  // requested address of the lowest achived heap object
237   static oop heap_roots_requested_address(); // requested address of HeapShared::roots()
238   static address buffered_heap_roots_addr() {
239     return offset_to_buffered_address<address>(_heap_roots_offset);
240   }
241   static size_t heap_roots_word_size() {
242     return _heap_roots_word_size;
243   }
244   static size_t get_filler_size_at(address buffered_addr);
245 
246   static void mark_native_pointer(oop src_obj, int offset);
247   static bool is_marked_as_native_pointer(ArchiveHeapInfo* heap_info, oop src_obj, int field_offset);
248   static oop source_obj_to_requested_obj(oop src_obj);
249   static oop buffered_addr_to_source_obj(address buffered_addr);
250   static address buffered_addr_to_requested_addr(address buffered_addr);
251 











252 };
253 #endif // INCLUDE_CDS_JAVA_HEAP
254 #endif // SHARE_CDS_ARCHIVEHEAPWRITER_HPP
< prev index next >