RFR: 8314021: HeapDump: Optimize segmented heap file merging phase [v2]

David Holmes dholmes at openjdk.org
Thu Oct 19 02:01:02 UTC 2023


On Thu, 7 Sep 2023 02:19:10 GMT, Yi Yang <yyang at openjdk.org> wrote:

>> This patch reduce ~16%(24s->20s) pahse 2 merge time during dumping 32g heap with 96threads and fixes a memory leak of compressor
>> 
>> You might argue why this is Linux-only optimization, because sendfile requires at least socket fd in other platforms([aix sendfile](https://www.ibm.com/docs/en/aix/7.1?topic=s-send-file-subroutine) [maxos sendfile](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/sendfile.2.html) [win32 TransmitFile](https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-transmitfile)), while [only Linux](https://man7.org/linux/man-pages/man2/sendfile.2.html) supports both two file descriptors.
>
> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   one merge_file for all

I think it can be improved somewhat even if we can't simply pass the `_writer` through.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15245#issuecomment-1769769467


More information about the serviceability-dev mailing list