CHTable Opts Policy - #18543
Conversation
Only disable CHTable Opts under -Xnojit if AOT compilation is not possible; otherwise, SCC validation will fail. Furthermore, if recompilation is not allowed, only disable the CHTable Opts if AOT compilation is also not possible. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
|
How about adding a testcase for making sure that AOT works under -Xnojit? |
| } | ||
| // if AOT is not possible and recompilation is disabled, | ||
| // disable CH Table opts | ||
| if (!TR::Options::sharedClassCache()) |
There was a problem hiding this comment.
I don't fully understand this code.
If SCC/AOT is completely disabled, then: noRecomp ==> no CHOpts. Let's say there is a reason for this implication.
What happens in the "default" case where both JIT and AOT compilations are allowed. Why don't we enforce the same policy noRecomp ==> no CHOpts? It's possible to run with -Xjit:noRecompile and whatever breaks if we don't disable CHOpts when recompilation is disabled, is going to break in Xjit Xaot case too.
There was a problem hiding this comment.
Yeah part of the reason I changed this PR back to a draft is because I realized the logic isn't accurate, so I need to ensure that we don't break existing behaviour (ie, behaviour when JIT compilation is possible). I'll un-draft once I also have a testcase, which is a little non-trivial to write up because it needs multiple stages.
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR removes some of the logic to disable CHTable Ops and replaces with some logic to check whether AOT loads are ever possible. If they aren't then we disable AOT loads. This PR borrows a lot from eclipse-openj9#18543 The exact logic we use to check if AOT loads are ever possible is as follows If -Xshareclasses:none is NOT specified (since there is a default SCC even if you don't specify a name) If -Xnoaot is NOT specified If -Xaot:noload is NOT specified then AOT loads are potentially possible.
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR removes some of the logic to disable CHTable Ops and replaces with some logic to check whether AOT loads are ever possible. If they aren't then we disable AOT loads. This PR borrows a lot from eclipse-openj9#18543 The exact logic we use to check if AOT loads are ever possible is as follows If -Xshareclasses:none is NOT specified (since there is a default SCC even if you don't specify a name) If -Xnoaot is NOT specified If -Xaot:noload is NOT specified then AOT loads are potentially possible.
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR removes some of the logic to disable CHTable Ops and replaces with some logic to check whether AOT loads are ever possible. If they aren't then we disable AOT loads. This PR borrows a lot from eclipse-openj9#18543 The exact logic we use to check if AOT loads are ever possible is as follows If -Xshareclasses:none is NOT specified (since there is a default SCC even if you don't specify a name) If -Xnoaot is NOT specified If -Xaot:noload is NOT specified then AOT loads are potentially possible.
|
Closing as incorrect. |
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR removes some of the logic to disable CHTable Ops and replaces with some logic to check whether AOT loads are ever possible. If they aren't then we disable AOT loads. This PR borrows a lot from eclipse-openj9#18543 The exact logic we use to check if AOT loads are ever possible is as follows If -Xshareclasses:none is NOT specified (since there is a default SCC even if you don't specify a name) If -Xnoaot is NOT specified If -Xaot:noload is NOT specified then AOT loads are potentially possible.
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR removes some of the logic to disable CHTable Ops and replaces with some logic to check whether AOT loads are ever possible. If they aren't then we disable AOT loads. This PR borrows a lot from eclipse-openj9#18543 The exact logic we use to check if AOT loads are ever possible is as follows If -Xshareclasses:none is NOT specified (since there is a default SCC even if you don't specify a name) If -Xnoaot is NOT specified If -Xaot:noload is NOT specified then AOT loads are potentially possible.
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR enforces that if -Xnojit is specified, then AOT compilations are prohibited but CHTable optimizations are still enabled. Otherwise if recompilations are disabled for any other reason, we also disable CHTable ops. This PR borrows a lot from eclipse-openj9#18543
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR enforces that if -Xnojit is specified, then AOT compilations are prohibited but CHTable optimizations are still enabled. Otherwise if recompilations are disabled for any other reason, we also disable CHTable ops. This PR borrows a lot from eclipse-openj9#18543
Fixes issue: eclipse-openj9#17918 Previously, there was an issue that when -Xnojit was set, AOT loads were disabled. This is because -Xnotjit disabled CHTable Ops, which were needed for AOT header validation. This PR enforces that if -Xnojit is specified, then AOT compilations are prohibited but CHTable optimizations are still enabled. Otherwise if recompilations are disabled for any other reason, we also disable CHTable ops. This PR borrows a lot from eclipse-openj9#18543
Only disable CHTable Opts under -Xnojit if AOT compilation is not possible; otherwise, SCC validation will fail. Furthermore, if recompilation is not allowed, only disable the CHTable Opts if AOT compilation is also not possible.
CHTable opts and Recompilation have been coupled together for a long time, and in #11247 the coupling was made further implicit. This PR decouples it under AOT.
Closes #17918