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
8276670: G1: Rename G1CardSetFreePool and related classes #6514
Conversation
👋 Welcome back mli! A progress list of the required criteria for merging this PR into |
@Hamlin-Li The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
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.
Lgtm. Thanks for fixing some pre-existing include-orderings...
@Hamlin-Li 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 47 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 |
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.
Some minor comments/suggestions.
for (uint i = 0; i < num_mem_object_types(); i++) { | ||
result._num_mem_sizes[i] += _allocators[i].mem_size(); | ||
result._num_buffers[i] += _allocators[i].num_buffers(); | ||
result._num_segments[i] += _allocators[i].num_buffers(); |
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.
I see a few other places where buffer
is not renamed to segment
. Having a dedicated PR for buffer
-> segment
renaming can increase the cohesion of each PR, IMO.
@@ -144,7 +144,7 @@ class G1CardSetMemoryManager : public CHeapObj<mtGCCardSet> { | |||
uint num_mem_object_types() const; | |||
public: | |||
G1CardSetMemoryManager(G1CardSetConfiguration* config, | |||
G1CardSetFreePool* free_list_pool); | |||
G1SegmentedArrayFreePool<mtGCCardSet>* free_list_pool); |
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.
Instead of using G1SegmentedArrayFreePool<mtGCCardSet>
explicitly, I think the current name, G1CardSetFreePool
, is more meaningful in this context (user site).
Therefore, I wonder if it's possible to place using G1CardSetFreePool = G1SegmentedArrayFreePool<mtGCCardSet>
somewhere and keep using the current name.
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.
good idea!
public: | ||
|
||
size_t _num_mem_sizes[G1CardSetConfiguration::num_mem_object_types()]; | ||
size_t _num_buffers[G1CardSetConfiguration::num_mem_object_types()]; | ||
size_t _num_segments[G1CardSetConfiguration::num_mem_object_types()]; |
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.
It's a bit odd to have G1CardSetXXX
embedded inside this class. Can be fixed in a followup PR.
// The global free pool. | ||
static G1CardSetFreePool _freelist_pool; | ||
static G1SegmentedArrayFreePool<flag> _freelist_pool; |
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.
I think one can drop <flag>
here and in other similar places
@@ -82,14 +83,14 @@ class G1CardSetFreeMemoryTask : public G1ServiceTask { | |||
jlong reschedule_delay_ms() const; | |||
|
|||
public: | |||
explicit G1CardSetFreeMemoryTask(const char* name); | |||
explicit G1SegmentedArrayFreeMemoryTask(const char* name); |
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.
Looking at the call-site and implementation of execute()
method, I am not sure this class is generic enough to be called G1SegmentedArrayFreeMemoryTask
. (Maybe this class will be used for sth other than Card Set in the near future?)
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, it will be used by some other places, e.g. evecuation failure processing. This class and related others will be refactored further to be more generic after the move and rename.
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.
-
There are still a few places where
G1SegmentedArrayFreePool<mtGCCardSet>
is used, instead ofG1CardSetFreePool
. I am not entirely sure if that's intended. -
It's undesirable to include some
buffer -> segment
renames in this PR.
Both are very subjective though.
Yes, it's intended, will be refactored in later related pr.
I see, will pay attention in the future.
Thanks for detailed comments. :) |
Thanks @tschatzl @albertnetymk for your reviews. /integrate |
Going to push as commit e9b36a8.
Your commit was automatically rebased without conflicts. |
@Hamlin-Li Pushed as commit e9b36a8. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
As G1CardSetFreePool and related classes are going to be reused outside of the remembered set, they should be renamed.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6514/head:pull/6514
$ git checkout pull/6514
Update a local copy of the PR:
$ git checkout pull/6514
$ git pull https://git.openjdk.java.net/jdk pull/6514/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6514
View PR using the GUI difftool:
$ git pr show -t 6514
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6514.diff