-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8314021: HeapDump: Optimize segmented heap file merging phase #15245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
👋 Welcome back yyang! A progress list of the required criteria for merging this PR into |
/label remove hotspot-runtime |
@y1yang0 |
@y1yang0 |
Webrevs
|
The fix looks good to me in general, but I'm not sure about code organization. |
#ifdef LINUX | ||
// 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. | ||
merge_file_fast(path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you don't need separate method for linux.
Would it be better to make linux-specific implementation of merge_file():
#ifdef LINUX
// Merge segmented heap files via sendfile
void DumpMerger::merge_file(char* path) {
...
}
#else
// Generic implementation using read+write
void DumpMerger::merge_file(char* path) {
...
}
#endif
Thanks for the review, yes, grepping /label add hotspot-runtime |
@y1yang0 |
Hi @alexmenkov, can we move on since there are no more comments from runtime folks. We can still propose a follow-up change if someone have strong objection/concern on this "exception" |
@y1yang0 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 488 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Can I have a second review? Maybe @plummercj @kevinjwalls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, looks good to me.
Apologies for delay, had looked at this previously but not come back for final review.
Never mind:) Thanks @alexmenkov and @kevinjwalls for the reviews. /integrate |
Going to push as commit 3760a04.
Your commit was automatically rebased without conflicts. |
I had not noticed this PR sorry. I do not like the fact we have Linux-only functionality being added with no intent to supply similar functionality on other platforms. I also do not like the fact we had to ifdef the Linux code into the shared code. It would have been metter to place the code in os::Linux and then have a single LINUX_ONLY() to make that call. |
Okay, I'll prepare a follow-up PR to do this once #15843 merged. |
I made a simple attempt, but it is difficult to integrate this portion of code into OS Linux because it requires modifying the writer's written bytes and setting error messages. Logically, it belongs to DumpMerge. Abstracting it into a function similar to concatenate_file and placing it into OS Linux seems challenging. |
I think it can be improved somewhat even if we can't simply pass the |
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 maxos sendfile win32 TransmitFile), while only Linux supports both two file descriptors.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15245/head:pull/15245
$ git checkout pull/15245
Update a local copy of the PR:
$ git checkout pull/15245
$ git pull https://git.openjdk.org/jdk.git pull/15245/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 15245
View PR using the GUI difftool:
$ git pr show -t 15245
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15245.diff
Webrev
Link to Webrev Comment