JDK-8314021 : HeapDump: Optimize segmented heap file merging phase
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: svc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-09
  • Updated: 2023-09-25
  • Resolved: 2023-09-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b16Fixed
Related Reports
Relates :  
Relates :  
Description
Merge segmented heap files via sendfile, it's more efficient than the read+write combination, which would require transferring data to and from user space.
Comments
It needed to use `::sendfile64` to get the global namespace.
21-09-2023

This causes build errors on Linux Alpine/musl (Linux ALPINE 3.17.4 gcc12.2.1): /linuxmuslx86_64/jdk/src/hotspot/os/linux/os_linux.cpp: In static member function 'static jlong os::Linux::sendfile(int, int, jlong*, jlong)': /linuxmuslx86_64/jdk/src/hotspot/os/linux/os_linux.cpp:4375:7: error: infinite recursion detected [-Werror=infinite-recursion] 4375 | jlong os::Linux::sendfile(int out_fd, int in_fd, jlong* offset, jlong count) { | ^~ /linuxmuslx86_64/jdk/src/hotspot/os/linux/os_linux.cpp:4376:20: note: recursive call 4376 | return sendfile64(out_fd, in_fd, (off64_t*)offset, (size_t)count);
20-09-2023

On Alpine Linux 3.17.4 we have just this definition for sendfile64 : sys/sendfile.h:11:ssize_t sendfile(int, int, off_t *, size_t); sys/sendfile.h:14:#define sendfile64 sendfile So it would be better to use sendfile directly.
20-09-2023

Changeset: 3760a044 Author: Yi Yang <yyang@openjdk.org> Date: 2023-09-19 02:03:15 +0000 URL: https://git.openjdk.org/jdk/commit/3760a0448df7024f9b44fa2af11007de4dfcbbe2
19-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15245 Date: 2023-08-11 09:31:56 +0000
11-08-2023