RFR: 8332980: [IR Framework] Add option to measure IR rule processing time

Theo Weidmann tweidmann at openjdk.org
Fri Jan 24 08:09:45 UTC 2025


On Thu, 23 Jan 2025 19:28:08 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

> Why you need to warm up match()?

Because otherwise the first rule matching will always be much slower. Here's the results from two very different tests without warm up:


Verifying IR rules for testByteArray: 9647292 ns = 9 ms
Verifying IR rules for testIntArray: 1285333 ns = 1 ms
Verifying IR rules for testLongArray: 750541 ns = 0 ms
Verifying IR rules for testShortArray: 1238209 ns = 1 ms



Verifying IR rules for constant: 9102250 ns = 9 ms
Verifying IR rules for divByPow2: 287083 ns = 0 ms
Verifying IR rules for divByPow2Big: 203042 ns = 0 ms
Verifying IR rules for divByPow2Random: 190834 ns = 0 ms
Verifying IR rules for identity: 62750 ns = 0 ms
Verifying IR rules for identityAgain: 69250 ns = 0 ms
Verifying IR rules for identityAgainButBig: 58541 ns = 0 ms
Verifying IR rules for identityThird: 390250 ns = 0 ms
Verifying IR rules for retainDenominator: 525625 ns = 0 ms
``` 

In both cases the first method's rules are not more complicated in any way that would explain this and it goes away with warm up.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23266#issuecomment-2611903770


More information about the hotspot-compiler-dev mailing list