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

Modify HeapRegionDescriptorRealtime for moving into OMR #5125

Merged
merged 1 commit into from Mar 19, 2019

Conversation

jason-hall
Copy link
Contributor

Signed-off-by: Jason Hall jasonhal@ca.ibm.com

@dmitripivkine dmitripivkine self-assigned this Mar 15, 2019
@dmitripivkine dmitripivkine self-requested a review March 15, 2019 20:05
@dmitripivkine
Copy link
Contributor

please fix copyrights

@@ -108,7 +108,7 @@ MM_RealtimeGCDelegate::allocateAndInitializeReferenceObjectLists(MM_EnvironmentB
bool
MM_RealtimeGCDelegate::allocateAndInitializeUnfinalizedObjectLists(MM_EnvironmentBase *env)
{
const UDATA listCount = MM_HeapRegionDescriptorRealtime::getUnfinalizedObjectListCount(env);
const UDATA listCount = MM_RealtimeGCDelegate::getUnfinalizedObjectListCount(env);
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to specify MM_RealtimeGCDelegate:: here. This is a member of this class

@@ -132,7 +132,7 @@ MM_RealtimeGCDelegate::allocateAndInitializeUnfinalizedObjectLists(MM_Environmen
bool
MM_RealtimeGCDelegate::allocateAndInitializeOwnableSynchronizerObjectLists(MM_EnvironmentBase *env)
{
const UDATA listCount = MM_HeapRegionDescriptorRealtime::getOwnableSynchronizerObjectListCount(env);
const UDATA listCount = MM_RealtimeGCDelegate::getOwnableSynchronizerObjectListCount(env);
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to specify MM_RealtimeGCDelegate:: here. This is a member of this class

@@ -117,6 +117,10 @@ class MM_RealtimeGCDelegate : public MM_BaseNonVirtual
void lockClassUnloadMonitor(MM_EnvironmentRealtime *env);
void unlockClassUnloadMonitor(MM_EnvironmentRealtime *env);

static UDATA getUnfinalizedObjectListCount(MM_EnvironmentBase *env) {return MM_GCExtensions::getExtensions(env)->gcThreadCount;}
static UDATA getOwnableSynchronizerObjectListCount(MM_EnvironmentBase *env) {return MM_GCExtensions::getExtensions(env)->gcThreadCount;}
static UDATA getReferenceObjectListCount(MM_EnvironmentBase *env) {return MM_GCExtensions::getExtensions(env)->gcThreadCount;}
Copy link
Contributor

Choose a reason for hiding this comment

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

_extensions can be used instead of MM_GCExtensions::getExtensions(env)

@jason-hall jason-hall force-pushed the metronome14 branch 3 times, most recently from 324a7c4 to 67757a0 Compare March 19, 2019 16:47
@@ -117,6 +117,10 @@ class MM_RealtimeGCDelegate : public MM_BaseNonVirtual
void lockClassUnloadMonitor(MM_EnvironmentRealtime *env);
void unlockClassUnloadMonitor(MM_EnvironmentRealtime *env);

UDATA getUnfinalizedObjectListCount(MM_EnvironmentBase *env) { return MM_GCExtensions::getExtensions(env)->gcThreadCount; }
UDATA getOwnableSynchronizerObjectListCount(MM_EnvironmentBase *env) { return MM_GCExtensions::getExtensions(env)->gcThreadCount; }
UDATA getReferenceObjectListCount(MM_EnvironmentBase *env) { return MM_GCExtensions::getExtensions(env)->gcThreadCount; }
Copy link
Contributor

Choose a reason for hiding this comment

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

now you can use _extensions instead of MM_GCExtensions::getExtensions(env)

@@ -1021,7 +1027,7 @@ MM_RealtimeMarkingScheme::incrementalConsumeQueue(MM_EnvironmentRealtime *env, U
void
MM_RealtimeMarkingScheme::scanUnfinalizedObjects(MM_EnvironmentRealtime *env)
{
const UDATA maxIndex = MM_HeapRegionDescriptorRealtime::getUnfinalizedObjectListCount(env);
const UDATA maxIndex = _gcExtensions->realtimeGC->getRealtimeDelegate()->getUnfinalizedObjectListCount(env);
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use _realtimeGC here and below

Signed-off-by: Jason Hall <jasonhal@ca.ibm.com>
@dmitripivkine
Copy link
Contributor

Jenkins compile win

@dmitripivkine dmitripivkine merged commit 57a0ffc into eclipse-openj9:master Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants