-
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
Checklist of features for new JIT backends #5455
Comments
This should be handled by the VM's resolve helpers. I'm not aware of any JIT surface to this feature.
New in Java 9, similar to JSR 292's MethodHandles but for field access under different modes.
In additional to DirectToJNI, there's also the recentish work on atomic free vmaccess. |
VarHandles are just like MethodHandles by the time you get to codegen. Nestmates are only seen as part of the resolve paths and not really for perf. |
No special support needed for JProfiling - it is all done in trees. |
Constant dynamic is transparent in codegen |
Validation (SVM): common code Codegen: This is where the majority of the work would need to be done. The Relocation: Any other considerations @mstoodle ? EDITFor other SVM changes, also see #15121 (comment) |
Complete atomicCompareAndSwapReturn support on Z, Power, and AArch64: eclipse-omr/omr#3759 |
OSR for AArch64 #5921 |
CompactLocals (ability to map compacted stack in some linkage) : #5910 |
JITaaS relocations |
Quad recognized methods (hopefully not required for long!) |
Interface PICs (e.g., #6325) |
Hardware transactional memory support. Enable CodeGenerator |
LoadExtensions codegen optimization [1]. |
I'd like to clarify a few points about nestmates here.
The JIT interaction is that with nestmates,
This is true, but I want to emphasize that code generator support is required for nestmates to work correctly. The runtime resolution path must be capable of carrying out a direct dispatch when indicated by the VM. The current design for doing so requires a pointer to the "virtual" J2I thunk in the PIC data, which needs a relocation for AOT. In the case of (It was technically possible for |
Arraycopy transformations from value propagation ( AArch64 (#12122) |
Inline dynamic cast class evaluation for checkcast : #5291 |
Please note that autoSIMD is supported only to the degree vector opcodes implemented in a particular codegen. Optimizer attempts to vectorize a loop and then asks codegen if particular opcode has vector version (there is a codegen method for that, takes opcode as a parameter). I am pretty sure only x,z,p have some number of opcodes that are supported. |
Exception Directed Optimization (EDO)
|
CodeGenerator support for GlRegDeps:
And by extension, global register allocation. For AArch64 (#6606). |
Method recompilation
|
A code generator must set |
Enable prefetchInsertion optimization. Requires backend support for prefetch instructions. AArch64 eclipse-omr/omr#4494, ARM32 eclipse-omr/omr#4495 |
Enable support for compressed references. |
Implicit NULLCHKs: AArch64 (#8036) |
Implicit DIVCHKs: AArch64 (#8037) |
Support ternary (soon-to-be-renamed-to select) opcodes. eclipse-omr/omr#4682 |
Live registers: eclipse-omr/omr#4843 |
Support for value types: #9105 |
Support for inlined monitor cache for monent/monexit: #9240 |
ASSOCREG pseudo-instruction: AArch64 (#9350) |
Patchable GCR guards: Epic: #9730 |
Support newInstanceImpl optimization: AArch64 (#11790) |
Allocation TLH prefetching (via CodeGen |
JIT Server support: AArch64 (#12121) |
Implement |
Enable CodeGenerator |
Enable CodeGenerator |
Ensure CodeGenerator |
Does this mean if a CodeGenerator doesn't do anything w.r.t. this API we may have functional bugs? |
Yes. Mis-aligned data accesses were being generated on AArch64, and there was no means of encoding instructions to access that data. I believe this API defaults to "false", so if a processor can (for example) access 4-bytes on a mis-aligned boundary then it should be fine. We have a PR coming on AArch64 that sets this flag to fix its problem. |
Should we be making such APIs pure virtual functions to force concrete CodeGenerators to implement them correctly and not rely on a default value? |
Support bit IL opcodes: ihbit, ilbit, inolz, inotz, ipopcnt, lhbit, llbit, lnolz, lnotz, lpopcnt Make Java API methods (e.g., LowestOneBit) intrinsics that map to them. |
Profile guarded devirtualization: Z (#13606) |
Implement |
Counting recompilation: AArch64 (#17543) |
I'm compiling a list of features that a new OpenJ9 JIT backend would need to implement to be reasonably "feature complete" with the others. These features are typically performance features above and beyond a basic, functional OpenJ9 JIT.
This could also serve a secondary purpose as a cross checklist for existing platforms to determine if they are missing any opportunities.
At the moment, I am particularly interested in the work that has been done to support features in Java 9, 11, 12, ... to be sure we don't miss any of that work in the AArch64 implementation.
This is a bit of a brain dump, but I hope to provide some structure to it once everyone has provided their input. I would appreciate it if those that are familiar with a particular backend could review this list and add anything you think is relevant. You don't necessarily have to go into great detail here: it will either be enough for me to track down the feature myself, or I can ask you about it.
FYI @andrewcraik @fjeremic @gita-omr, but input from anyone is welcome.
software concurrent scavenge
constant dynamic
nestmates
read barriers
write barriers
field watch
JNI dispatch
lock reservation
recompilation
on-stack replacement? (@andrewcraik)
AOT / SVM? (@dsouzai)
per code-cache helpers
JSR292?
DLT?
JProfiling?
J9-specific IL opcodes, including:
Platform-specific inlining
inlined helpers
implicit NULLCHK (via signal handler)
implicit DIVCHK (via signal handler)
transactional memory (tstart/tfinish/tabort/tcommit)
what is "asyncCheckGCMapPatching" @0dvictor ?
The text was updated successfully, but these errors were encountered: