RFR: 8344766: AES/CTR slow at big payloads [v2]
Andrew Haley
aph at openjdk.org
Wed Nov 27 14:48:37 UTC 2024
On Wed, 27 Nov 2024 13:49:51 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> src/java.base/share/classes/com/sun/crypto/provider/CounterMode.java line 57:
>>
>>> 55:
>>> 56: // chunkSize is a multiple of block size and used to divide up
>>> 57: // input data to trigger the intrinsic.
>>
>> This comment looks incorrect, a method marked as an intrinsic is always inline expanded by C2 compile during parsing or during incremental inlining if -XX:+InlineIncrement is used.
>>
>> I guess what you intend here is triggering an OSR compilation of loop by C2 compiler which in turn trigger intrinsic since C1 never intrinsifies crypto APIs
>
> For CRC32 digest computation we do support intrinsic at interpreter and c1 compiler level to overcome such warmup related penalties.
This is not just a good idea to trigger OSR and therefore use the intrinsic, it's a good idea because very long data causes an extended time to safepoint. I'd support in all cases limiting the size to about a megabyte, which is what we have here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22300#discussion_r1860794141
More information about the hotspot-compiler-dev
mailing list