openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

X86: Check multiple itable entries after lastITable cache test

Open a7ehuo opened this issue 6 months ago • 4 comments

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

a7ehuo avatar May 23 '25 18:05 a7ehuo

@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

a7ehuo avatar May 23 '25 18:05 a7ehuo

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.

vijaysun-omr avatar May 23 '25 21:05 vijaysun-omr

Just wanted to ask what the plan for this PR is. In @a7ehuo absence, should we deliver some part of it ?

vijaysun-omr avatar Jun 16 '25 17:06 vijaysun-omr

@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?

hzongaro avatar Jun 16 '25 21:06 hzongaro

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.

BradleyWood avatar Jul 11 '25 17:07 BradleyWood

I am closing this as its functionality is being delivered in #22216.

0xdaryl avatar Jul 18 '25 19:07 0xdaryl