Skip to content

Cleanup code for MM_IdleGCManager - #20454

Merged
amicic merged 1 commit into
eclipse-openj9:masterfrom
dmitripivkine:master
Oct 30, 2024
Merged

Cleanup code for MM_IdleGCManager#20454
amicic merged 1 commit into
eclipse-openj9:masterfrom
dmitripivkine:master

Conversation

@dmitripivkine

Copy link
Copy Markdown
Contributor
  • using proper types
  • code formatting

@dmitripivkine

Copy link
Copy Markdown
Contributor Author

fixes #20453

@dmitripivkine
dmitripivkine requested a review from amicic October 30, 2024 21:37
Comment thread runtime/gc_base/IdleGCManager.cpp Outdated
J9VMRuntimeStateChanged* j9VMState = (J9VMRuntimeStateChanged*)eventData;
MM_IdleGCManager* idleMgr = (MM_IdleGCManager*)userData;
J9VMRuntimeStateChanged *j9VMState = (J9VMRuntimeStateChanged *)eventData;
MM_IdleGCManager* idleMgr = (MM_IdleGCManager *)userData;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

move * in MM_IdleGCManager *idleMgr

Comment thread runtime/gc_base/IdleGCManager.cpp Outdated
MM_EnvironmentBase* env = MM_EnvironmentBase::getEnvironment(currentThread->omrVMThread);
MM_GCExtensions* _extensions = MM_GCExtensions::getExtensions(env);
MM_EnvironmentBase *env = MM_EnvironmentBase::getEnvironment(currentThread->omrVMThread);
MM_GCExtensions *_extensions = MM_GCExtensions::getExtensions(env);

@amicic amicic Oct 30, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

_extensions is declared as a local, so no leading _ is needed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one general comment that we should probably agree on.... often use env and ext as local.
we should either use them in that short form or long form (environment, extension), at least in same method, preferably same file, ideally everywhere

Comment thread runtime/gc_base/IdleGCManager.cpp Outdated

/* idle gc manager currently handles only ACTIVE -> IDLE transition*/
/* idle gc manager currently handles only ACTIVE -> IDLE transition */
if (j9VMState->state == J9VM_RUNTIME_STATE_IDLE) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

J9VM_RUNTIME_STATE_IDLE on left side

- using proper types
- code formatting

Signed-off-by: Dmitri Pivkine <Dmitri_Pivkine@ca.ibm.com>
@dmitripivkine

Copy link
Copy Markdown
Contributor Author

@amicic Thank you, fixed.

@amicic

amicic commented Oct 30, 2024

Copy link
Copy Markdown
Contributor

Jenkins compile win jdk11

@amicic
amicic merged commit 56dfc15 into eclipse-openj9:master Oct 30, 2024
@dmitripivkine dmitripivkine self-assigned this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants