-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8295658 G1: Refactor G1SegmentedArray to indicate that it is an allocator #10767
Conversation
👋 Welcome back iwalulya! A progress list of the required criteria for merging this PR into |
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 sans the minor formatting issues.
@@ -145,7 +145,7 @@ class G1CollectedHeap : public CollectedHeap { | |||
private: | |||
G1ServiceThread* _service_thread; | |||
G1ServiceTask* _periodic_gc_task; | |||
G1SegmentedArrayFreeMemoryTask* _free_segmented_array_memory_task; | |||
G1MonotonicArenaFreeMemoryTask* _free_monotonic_arena_memory_task; |
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 do not think it is required to have variable names that repeat the whole type name, particularly if there is no ambiguity. I.e. _free_arena_memory_task
seems sufficient instead of _free_monotonic_arena....
but I do not mind either way.
// Actual allocation from the C heap occurs as memory blocks called Segments. | ||
// The allocation pattern for these Segments is assumed to be strictly two-phased: | ||
// | ||
// - in the first phase, Segment are allocated from the C heap (or a free |
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.
(probably pre-existing) s/Segment/Segments or "Segment instances"
// The class also manages a few counters for statistics using atomic operations. | ||
// Their values are only consistent within each other with extra global | ||
// synchronization. | ||
|
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.
(pre-existing) additional newline
// AllocOptions provides parameters for allocation segment | ||
// sizing and expansion. |
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.
Maybe:
AllocOptions provides parameters for Segment sizing and expansion.
volatile size_t _mem_size; // Memory used by all segments. | ||
|
||
SegmentFreeList* _segment_free_list; // The global free segment list to preferentially | ||
// get new segments from. |
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.
Comment should be aligned to the start of the one above.
@walulyai 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 210 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.
still good.
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.
Nice refactoring, looks good.
Going to push as commit dd5d4df.
Your commit was automatically rebased without conflicts. |
Hi,
Please review this refactoring change of G1SegmentedArray to G1MonotonicArena which is a more appropriate name for the intended use of the class objects.
The change has two commits, with the first commit refactoring the class names and the second commit adding the corresponding changes to file names.
Testing: builds
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10767/head:pull/10767
$ git checkout pull/10767
Update a local copy of the PR:
$ git checkout pull/10767
$ git pull https://git.openjdk.org/jdk pull/10767/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 10767
View PR using the GUI difftool:
$ git pr show -t 10767
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10767.diff