-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fix incorrect usage of TR::Options #2715
Conversation
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.
I would like some small changes to the Compilation constructor. The code looks good otherwise.
compiler/compile/OMRCompilation.cpp
Outdated
@@ -326,13 +326,13 @@ OMR::Compilation::Compilation( | |||
// while the PersistentMethodInfo is allocated during codegen creation | |||
// Access to this list must be performed with assumptionTableMutex in hand | |||
// | |||
if (!TR::Options::getCmdLineOptions()->getOption(TR_DisableFastAssumptionReclamation)) | |||
if (!_options->getOption(TR_DisableFastAssumptionReclamation)) |
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.
The parameter options
is the same thing here.
compiler/compile/OMRCompilation.cpp
Outdated
_metadataAssumptionList = new (m->trPersistentMemory()) TR::SentinelRuntimeAssumption(); | ||
#endif | ||
|
||
//Random fields must be set before allocating codegen | ||
_primaryRandom = new (m->trHeapMemory()) TR_RandomGenerator(options.getRandomSeed()); | ||
_adhocRandom = new (m->trHeapMemory()) TR_RandomGenerator(options.getRandomSeed()); | ||
_primaryRandom = new (m->trHeapMemory()) TR_RandomGenerator(_options->getRandomSeed()); |
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.
The code was good as it was because options
is the per compilation Options object
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.
yeah I changed it because I saw many more instances of _options
than options
so I changed everything to _options
to avoid confusion. Do you prefer using options
or just want this part of the code unchanged?
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.
Yes, I would prefer to use the parameter options
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.
LGTM
- during compilation, the per-method TR::Options should be used instead of the global one - mostly happens at the Optimizer and Code Generation stage - simplify comp()->getOptions()->getOption(TR_XXX) to comp()->getOptions(TR_XXX), they are equivalent - switch _options usage to options in OMRCompilation ctor Signed-off-by: Harry Yu <harryyu1994@gmail.com>
Hi @vijaysun-omr, could you help merge this change as well as eclipse-openj9/openj9#2290, I think they are ready to go in, thanks a lot. |
@genie-omr build all |
Internal pointers are never actually disabled for <= warm level until recent refactoring in OMR changed it to use the correct API and disbled it for real. Disabling internal pointers for <= warm opt level would hurt performance so we need to enable it. pr: eclipse-omr#2715 Signed-off-by: Yi Zhang <yizhang@ca.ibm.com>
Signed-off-by: Harry Yu harryyu1994@gmail.com