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
8267186: Add string deduplication support to ZGC #5029
Conversation
|
Webrevs
|
Now that we have a context object for marking, it would be nice if it also contained the stripes and stacks that we pass around everywhere, that we originally determine just the lines below where the context object is created.
Good suggestion, will fix that. |
@pliden This change now passes all automated pre-integration checks. 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 81 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.
|
Looks good, except for the include order in zMarkContext.inline.hpp.
|
||
#include "classfile/javaClasses.inline.hpp" | ||
#include "gc/z/zMarkCache.inline.hpp" | ||
#include "gc/z/zMarkContext.hpp" |
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.
The associated .hpp file is supposed to be included first by a .inline.hpp file, per JDK-8267464.
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.
Ah, forgot about that new rule. Fixed.
Looks good.
ZMarkContext serves multiple purposes in the marking code, and if we (maybe in the future) add code for those purposes then it risk being a class of multiple responsibilities. Therefore, I think it would be good to let this class be a simpler data carrier, and move the extra code/logic in ZMarkContext::try_deduplicate out to ZMark, or maybe even a new ZStringDedup class.
Fixed. |
Thanks @fisk, @kimbarrett and @stefank for reviewing! /integrate |
Going to push as commit abebbe2.
Your commit was automatically rebased without conflicts. |
This change adds support for string deduplication to ZGC. It's a pretty straight forward change, but to make reviewing even easier it is broken up into two commits:
ZGC: Introduce ZMarkContext
This commit just moves the
ZMarkCache
into the newZMarkContext
class, and we now pass aZMarkContext*
around instead of aZMarkCache*
. TheZMarkContext
class is a more general container for worker-local data, which in the next commit will be extended to also include theStringDedup::Requests
queue.8267186: Add string deduplication support to ZGC
This commits adds the actual string dedup functionality and enables relevant tests. We use the
deduplication_requested
bit in theString
object to filter outStrings
we've already attempted to deduplicate.Testing:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5029/head:pull/5029
$ git checkout pull/5029
Update a local copy of the PR:
$ git checkout pull/5029
$ git pull https://git.openjdk.java.net/jdk pull/5029/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5029
View PR using the GUI difftool:
$ git pr show -t 5029
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5029.diff