openj9
openj9 copied to clipboard
X86: Check multiple itable entries after lastITable cache test
If the lastITable cache does not match the declaring interface class, check a few entries on the iTable. The max number of entries to check is capped at 4. Running Dacapo pmd shows checking 4 entries render the best result.
This enhancement can be disabled by the env variable: TR_DisableITableIterationsAfterLastITableCacheCheck
The number of iterations can be changed by setting: TR_NumITableIterationsAfterLastITableCacheCheck=n
@0xdaryl May I ask you to review this change? Thank you!
Here is an example of the instructions generated: log_sample_instructions.txt
@vijaysun-omr @hzongaro fyi
fyi @zl-wang @knn-k @r30shah that this needs to be added on to the Power, AArch64, and IBM Z codegen backlogs. It may not be a bad idea to make sure all the heuristics are made consistent across the different codegens for interface dispatch when you do the work, i.e. static PICs, dynamic PICs, last itable cache and this multiple itable cache are all employed in more or less the same way across platforms.
@ehsankianifar is already looking at doing something for IBM Z, I believe.
Just wanted to ask what the plan for this PR is. In @a7ehuo absence, should we deliver some part of it ?
@BradleyWood, as @a7ehuo will be away for a bit, may I ask you to pick up her changes from this pull request, and address the comments that are still outstanding from the review?
I have opened #22216. I have addressed review comments and I was able to reproduce the performance benefit on the PMD benchmark. I also ran a suite of tests.
Lets carry over reviews and discussions in that PR.
I am closing this as its functionality is being delivered in #22216.