-
Notifications
You must be signed in to change notification settings - Fork 720
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
Handle new CPU enum types inside J9CPU.cpp #10390
Conversation
Signed-off-by: Dhruv Chopra <Dhruv.C.Chopra@ibm.com>
Jenkins test sanity zlinux jdk11 |
Depends on eclipse-omr/omr#5459. We'll need to wait for a promotion. |
@fjeremic I think this one depends on eclipse-omr/omr#5459 |
Jenkins test sanity zlinux jdk11 depends eclipse-omr/omr#5459 |
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.
Actually I don't think you need the changes in applyUserOptions()
at all.
I only added the changes in |
Here are a few examples:
In all of these situations |
If any update needs to be done for void
J9::Z::CPU::initializeS390ProcessorFeatures()
{
// The following nested if statements cascade so as to have the effect of only enabling the least common denominator
// of disable CPU architectures. For example if the user specified to disable z13 when running on a z15 machine the
// logic below will ensure we only reach the `setSupportsArch` call for zEC12.
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZ6() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZ10))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::z10);
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZGryphon() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZ196))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::z196);
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZHelix() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZEC12))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::zEC12);
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZ13() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZ13))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::z13);
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZ14() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZ14))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::z14);
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZ15() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZ15))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::z15);
if (TR::Compiler->target.cpu.TO_PORTLIB_get390_supportsZNext() &&
!TR::Options::getCmdLineOptions()->getOption(TR_DisableZNext))
{
TR::Compiler->target.cpu.setSupportsArch(TR::CPU::zNext);
}
}
}
}
}
}
}
.... |
The backtrace for the above assert is as below:
Looking at
So it looks like But then when we later call |
Just guessing here. You added initialization of |
Try this and see if the problem goes away: #if defined(J9VM_OPT_JITSERVER)
// In JITServer, we would like to use JITClient's processor info for the compilation
// The following code effectively replaces the cpu with client's cpu through the getProcessorDescription() that has JITServer support
if (self()->getPersistentInfo()->getRemoteCompilationMode() == JITServer::SERVER)
{
OMRProcessorDesc JITClientProcessorDesc = TR::Compiler->target.cpu.getProcessorDescription();
_target.cpu = TR::CPU(JITClientProcessorDesc);
#if defined(TR_TARGET_S390)
_target.cpu.initialzeS390ProcessorFeatures();
#endif
}
else
#endif /* defined(J9VM_OPT_JITSERVER) */ then remove the initialization of |
Sorry for the complications.. They wouldn't be here if we don't still have 2 implementations of processor detection. Hopefully I'll have time soon to get rid of the old implementation. |
It sounds like that might be the problem because |
For what it's worth:
|
Oh just realized, I don't think the processor detection test applies to JITServer |
It looks like your above suggested solution fixed the problem in my java -version test. I see the following code:
So I think that test will pass regardless of the above change you suggested. But I can still remove the change for JITServer if you prefer. |
yeah we should remove the change for JITServer because it doesn't make sense as JITClientProcessorDesc is already initialized by a remote client JVM. |
9c9eebb
to
86e45fe
Compare
I have reverted the changes in |
@harryyu1994 is this one ready? Please add an approval review whenever you get a chance. Jenkins test sanity zlinux jdk8 |
New CPU types were introduced in the OMRProcessArchitecture enum and OpenJ9 must be able to handle these new entries. Additionally, this PR also adds on to the
J9::Z::CPU::applyUserOptions()
routine by also updating_supportedArch
when the CPU level is changed.