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

Enable Symbol Validation Manager on all platforms #3028

Open
3 of 8 tasks
dsouzai opened this issue Sep 25, 2018 · 1 comment
Open
3 of 8 tasks

Enable Symbol Validation Manager on all platforms #3028

dsouzai opened this issue Sep 25, 2018 · 1 comment

Comments

@dsouzai
Copy link
Contributor

dsouzai commented Sep 25, 2018

@dsouzai
Copy link
Contributor Author

dsouzai commented Oct 16, 2018

I've started working on cleaning up the AOT infrastructure (#3031) . I decided not to work on getting support for other platforms first, because it would end up being a bunch of extra work for me to add the relocations only for them to get cleaned up. Additionally, it will take me some time (since I'm not really familiar with any of the codegens). Thus the plan is to clean up the infrastructure, and once there's a single canonical version of the AOT infrastructure, I can start to take a look at the other platforms.

That said, if anyone wishes to work on the other platforms, this is what's needed (at least what I can think of):

  1. The code that writes the Relocation Header needs to be copied over to J9AheadOfTimeCompile (b9efceb#diff-3f1aba0052032c44a8f47c99b97e30e2)

  2. Initially disable string peepholes (97b11cc)

  3. Do not remove the devirtualized check (c4be204#diff-bc6d5bca24d2675b48424ae7ce17bb9c)

  4. Enable Abstrct Method Inlining (eclipse-omr/omr@2347110)

  5. Intially disable the code added in Guard code with SVM check eclipse-omr/omr#3074

  6. When using the symbol validation manager, for AOT compiles, the compiler thinks all methods are interpreted. Therefore, when the method is also resolved, a resolved interpreter call snippet is generated. However, if this code is guarded with forceUnresolvedDispatch then that guard needs to be removed (c4be204#diff-6f742cfd99927bbd8a989b86c42da43e)

  7. Because with the symbol validation manager more things are resolved (including new), object allocation inlining needs to account for the fact that the loadaddr is no longer anchored by a resolvechk. (c4be204#diff-11e7eccbbf8ec3cf2e4f26d5b7357efe) . Also, you need to make sure you add the relocation for the object allocation inlining as done here b9efceb#diff-11e7eccbbf8ec3cf2e4f26d5b7357efeR7710

  8. Update relocations for RamMethod, MethodPointer, ClassAddress, and ClassPointer to get the symbol from the SVM rather than through the cpIndex (eclipse-omr/omr@34f7416 and eclipse-omr/omr@1520ed0)

  9. Enable 2 and 5

  10. Enable CheckCast and InstanceOf inlining (b460431)

Initially, run with disabling object allocation inlining and disabling checkcast and instanceof inlining via cmd line options. Once 7 is done, you can enable object allocation inlining. One 10 is done, you can enable checkcast and instanceof inlining. When running, make sure you only add enableSymbolValidationManager to the -Xaot options.

I would also comment out https://github.com/eclipse/openj9/blob/d762f281be4546b8ecefd2a46cccb9be32a5b20e/runtime/compiler/control/CompilationThread.cpp#L7426-L7429
as it will ensure that the new AOT gets used also during startup.

Fyi @gita-omr @fjeremic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants