-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8381561: G1: Cleanup patch in preparation for eager reclamation of flat arrays #30549
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
Open
stefank
wants to merge
1
commit into
openjdk:master
Choose a base branch
from
stefank:8381561_cleanup_for_eager_reclaim_of_flat_arrays
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+30
−37
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2341,20 +2341,16 @@ void G1CMTask::drain_local_queue(bool partially) { | |
| } | ||
| } | ||
|
|
||
| size_t G1CMTask::start_partial_array_processing(oop obj) { | ||
| size_t G1CMTask::start_partial_array_processing(objArrayOop obj) { | ||
| assert(should_be_sliced(obj), "Must be an array object %d and large %zu", obj->is_objArray(), obj->size()); | ||
|
|
||
| objArrayOop obj_array = objArrayOop(obj); | ||
| size_t array_length = obj_array->length(); | ||
|
|
||
| size_t initial_chunk_size = _partial_array_splitter.start(_task_queue, obj_array, nullptr, array_length); | ||
|
|
||
| // Mark objArray klass metadata | ||
| if (_cm_oop_closure->do_metadata()) { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This check has been removed. Marking closures should follow the metadata and there's no need to check if it should. |
||
| _cm_oop_closure->do_klass(obj_array->klass()); | ||
| } | ||
| process_klass(obj->klass()); | ||
|
|
||
| size_t array_length = obj->length(); | ||
| size_t initial_chunk_size = _partial_array_splitter.start(_task_queue, obj, nullptr, array_length); | ||
|
|
||
| process_array_chunk(obj_array, 0, initial_chunk_size); | ||
| process_array_chunk(obj, 0, initial_chunk_size); | ||
|
|
||
| // Include object header size | ||
| return objArrayOopDesc::object_size(checked_cast<int>(initial_chunk_size)); | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 the arg name can be
obj_arrayto emphasize that it's an objArray.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.
I prefer
objsince it is a more common name. It seems like only this function and its counter part in the full GC named thisobj_array. There's almost 50 occurrences that just call themobj.I also don't like giving local variables multi-word names unless it really helps with the readability and understanding of the function. I don't think it does in this case.