Skip to content
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

Created FlattenedContiguousArrayIterator for FA iteration #11714

Conversation

OussamaSaoudi
Copy link
Contributor

Created iterator which has nextSlot() method to sequentially
return slots found inside a Flattened Array.
-Implements getIndex(), setIndex(int) getter and setter method for
index within the flattened array.
-Implements save(ObjectIteratorState) and restore(ObjectIteratorState)
methods to save scan and end pointers to objectIteratorState, or set
the scan and end pointers from the objectIteratorState.
-Implements getObject() to return pointer to the array.

Created new CopmactSchemeFixupObject method: fixupFlattenedArrayObject,
which allows the gc compacter to copmact flattened arrays using
FlattenedContiguousArrayIterator.

Added ValueTypeTest for flattenedArray compact, using -Xcompactgc
flag.

Signed-off-by: Oussama Saoudi [email protected]

@OussamaSaoudi OussamaSaoudi force-pushed the GCFlattenedContiguousArrayIterator branch 2 times, most recently from 4d160c4 to 0c31134 Compare January 20, 2021 20:16
@OussamaSaoudi
Copy link
Contributor Author

@dmitripivkine

@OussamaSaoudi OussamaSaoudi force-pushed the GCFlattenedContiguousArrayIterator branch 2 times, most recently from 8c5cdf4 to 2767a13 Compare January 20, 2021 20:24
@OussamaSaoudi OussamaSaoudi force-pushed the GCFlattenedContiguousArrayIterator branch 2 times, most recently from c6a4499 to c739dee Compare January 20, 2021 21:19
Created iterator which has nextSlot() method to sequentially
return slots found inside a Flattened Array.
-Implements getIndex(), setIndex(int) getter and setter method for
index within the flattened array.
-Implements save(ObjectIteratorState) and restore(ObjectIteratorState)
methods to save scan and end pointers to objectIteratorState, or set
the scan and end pointers from the objectIteratorState.
-Implements getObject() to return pointer to the array.

Created new CopmactSchemeFixupObject method: fixupFlattenedArrayObject,
which allows the gc compacter to copmact flattened arrays using
FlattenedContiguousArrayIterator.

Modified VT tests to allow for compacting by removing -Xnocompactgc
flag.

Signed-off-by: Oussama Saoudi <[email protected]>
{
/* If no more object slots to scan, returns NULL */
GC_SlotObject *result = NULL;
if (_scanPtr < _endPtr) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is a cost of skipping initialization of _mixedObjectIterator in initialize() for case of zero length array. It is quite expensive because should be done for every single returning slot. However the only alternative I see is a modification of GC_MixedObjectIterator that way we can get NULL from first call of _mixedObjectIterator.nextSlot() and I don't like it either. So I am ok with current implementation if there is no better proposals

@dmitripivkine
Copy link
Contributor

@tajila Would you please review test update part?

@dmitripivkine
Copy link
Contributor

Jenkins test sanity xlinuxvalst jdknext

@dmitripivkine
Copy link
Contributor

Jenkins test sanity,extended xlinuxval jdknext

@dmitripivkine dmitripivkine merged commit b162f26 into eclipse-openj9:master Jan 21, 2021
@hangshao0 hangshao0 added the project:valhalla Used to track Project Valhalla related work label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:gc project:valhalla Used to track Project Valhalla related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants