RFR: 8327645: Serial heap dump should not consume double amount of disk space [v2]
Alex Menkov
amenkov at openjdk.org
Fri Mar 8 19:32:53 UTC 2024
On Fri, 8 Mar 2024 02:35:08 GMT, Man Cao <manc at openjdk.org> wrote:
>> Hi all,
>>
>> Could anyone review this fix to make serial heap dump only write to a single file?
>> We highly appreciate the work in https://bugs.openjdk.org/browse/JDK-8306441. However, many of our customers still need to use serial heap dump, as they have limited disk space and need to dump to a network socket.
>>
>> Tested:
>> Stress tested with a fastdebug build with tests in `hotspot/jtreg/serviceability/dcmd/gc/HeapDump*`.
>>
>> -Man
>
> Man Cao has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix failure under -XX:+UseSerialGC
Right, global writer is used to write HPROF_FRAME/HPROF_TRACE records when unmounted VT is found in the heap.
The spec does not require HPROF_FRAME/HPROF_TRACE to be in the beginning. Main concern here is compatibility as we don't control external hprof tools.
Solution #2 looks better to me.
It does not require extra memory to track unmounted VT (we may have millions) and it can prevent compatibility problem if we first write HPROF_FRAME/HPROF_TRACE records and then HPROF_GC_ROOT_THREAD_OBJ and stack reference subrecords which refer to the HPROF_TRACE
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18160#issuecomment-1986286463
More information about the hotspot-runtime-dev
mailing list