< prev index next >

src/hotspot/share/cds/archiveHeapWriter.hpp

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 60,10 ***
--- 60,11 ---
    HeapRootSegments heap_root_segments() { return _heap_root_segments; }
  };
  
  #if INCLUDE_CDS_JAVA_HEAP
  class ArchiveHeapWriter : AllStatic {
+   friend class HeapShared;
    // ArchiveHeapWriter manipulates three types of addresses:
    //
    //     "source" vs "buffered" vs "requested"
    //
    // (Note: the design and convention is the same as for the archiving of Metaspace objects.

*** 193,10 ***
--- 194,11 ---
    static void root_segment_at_put(objArrayOop segment, int index, oop root);
    static objArrayOop allocate_root_segment(size_t offset, int element_count);
    static void copy_roots_to_buffer(GrowableArrayCHeap<oop, mtClassShared>* roots);
    static void copy_source_objs_to_buffer(GrowableArrayCHeap<oop, mtClassShared>* roots);
    static size_t copy_one_source_obj_to_buffer(oop src_obj);
+   static void update_stats(oop src_obj);
  
    static void maybe_fill_gc_region_gap(size_t required_byte_size);
    static size_t filler_array_byte_size(int length);
    static int filler_array_length(size_t fill_bytes);
    static HeapWord* init_filler_array_at_buffer_top(int array_length, size_t fill_bytes);
< prev index next >