RFR: 8338912: CDS: Segmented roots array [v5]
Ioi Lam
iklam at openjdk.org
Tue Sep 10 00:45:08 UTC 2024
On Mon, 9 Sep 2024 19:07:06 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> > > I don't quite understand the Windows `DeterministicDump` failure. Is there anything specific about CDS and Windows that makes it only fail there?
> >
> >
> > This kind of failure usually can be diagnosed by diffing the map files that are generated the test case. Let me try to reproduce it on my side.
>
> Hmm, since you haven't change the logic of how the archive is created, except that you move the allocation of the root array(s) from the end to the beginning of the heap objects, I think it's probably caused by this:
>
> ```
> class HeapRootSegments {
> private:
> size_t _base_offset;
> size_t _count;
> int _roots_count;
> int _max_size_in_bytes;
> int _max_size_in_elems;
> // uninitialized padding on Windows
> ```
>
> Maybe explicitly add an `int _unused` there?
Diff of the map files confirms this:
- heap_root_segments.roots_count: 2628
- heap_root_segments.seg_max_size_elems: 1048576
- heap_root_segments.seg_max_size_bytes: 131070
....
131c131
< 0x0000000000000300: 0010000000000a44 0000020a0001fffe 0000000000000002 000000000000f022
---
> 0x0000000000000300: 0010000000000a44 000001e20001fffe 0000000000000002 000000000000f022
2628 = 0x00000a44
1048576 = 0x00100000
131080 = 0x00001ff2
The 0x000001e2 is garbage.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20858#issuecomment-2339393432
More information about the hotspot-runtime-dev
mailing list