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

Remove OMR_GC_LEAF_BITS #4958

Open
youngar opened this issue Mar 20, 2020 · 0 comments
Open

Remove OMR_GC_LEAF_BITS #4958

youngar opened this issue Mar 20, 2020 · 0 comments

Comments

@youngar
Copy link
Contributor

youngar commented Mar 20, 2020

We are thinking about getting rid of OMR_GC_LEAF_BITS as an optional feature, and making it permanent. This would remove some duplicated code in our object scanners which is never exercised.

To support people who don't use leaf maps, we could add default implementation of ObjectScanner::getNextSlotMap(uintptr_t *slotMap, uintptr_t *leafMap, bool *hasNextSlotMap) that defaults to setting the leaf map to 0. This would mean that the API stays the same. It might have some effect on performance for those who don't use leaf maps. I'm thinking something like:

virtual fomrobject_t *
getNextSlotMap(uintptr_t *slotMap, bool *hasNextSlotMap)
{
	Assert_MM_unimplemented();
}
virtual fomrobject_t *
getNextSlotMap(uintptr_t *slotMap, uintptr_t *leafMap, bool *hasNextSlotMap)
{
	*leafMap = 0;
	return getNextSlotMap(slotMap, hasNextSlotMap);
}

The alternatives are we leave it as an optional feature, or we force users to always specify *leafMap = 0 when they don't support leaf maps (edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant