RFR[M]: Adding MD5 Intrinsic on x86-64
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Aug 3 17:34:28 UTC 2020
And I got crash during JDK build on linux-x64:
# Internal Error (src/hotspot/share/opto/library_call.cpp:5732), pid=18904, tid=19012
# assert(field != __null) failed: undefined field
#
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 16-internal+0-2020-08-03-1651458.vladimir.kozlov.jdkjdk, mixed mode,
tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x11123f4] LibraryCallKit::load_field_from_object(Node*, char const*, char const*, bool, bool,
ciInstanceKlass*)+0x334
Current CompileTask:
C2: 6204 1305 4 sun.security.provider.DigestBase::engineUpdate (189 bytes)
Stack: [0x0000151bfcfc7000,0x0000151bfd0c8000], sp=0x0000151bfd0c3ed0, free space=1011k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x11123f4] LibraryCallKit::load_field_from_object(Node*, char const*, char const*, bool, bool,
ciInstanceKlass*)+0x334
V [libjvm.so+0x11167ea] LibraryCallKit::get_long_state_from_digestBase_object(Node*)+0x2a
V [libjvm.so+0x1116f2d] LibraryCallKit::inline_digestBase_implCompressMB(Node*, ciInstanceKlass*, bool, unsigned
char*, char const*, Node*, Node*, Node*)+0x2cd
V [libjvm.so+0x1117467] LibraryCallKit::inline_digestBase_implCompressMB(int)+0x397
V [libjvm.so+0x1121de1] LibraryIntrinsic::generate(JVMState*)+0x211
V [libjvm.so+0x75d61d] PredicatedIntrinsicGenerator::generate(JVMState*)+0xb8d
Vladimir K
On 8/3/20 10:10 AM, Vladimir Kozlov wrote:
> Hi Ludovic
>
> This is very professional work!
>
> CCing to Core-libs because you modified Java code and need review from Java library group.
>
> Few notes:
>
> Add tests to verify intrinsic implementation. You can use test/hotspot/jtreg/compiler/intrinsics/sha/ as examples.
>
> In vm_version_x86.cpp move UseMD5Intrinsics flag setting near UseSHA flag setting.
>
> In new file macroAssembler_x86_md5.cpp no need empty line after copyright line. There is also typo 'rrdistribute':
>
> * This code is free software; you can rrdistribute it and/or modify it
>
> Our validate-headers check failed. See GPL header template: ./make/templates/gpl-header
>
> Ludovic, it looks like you used only general instructions to implement this code. Can you add comment where the
> algorithm come from? Or it is just direct translation of Java code?
>
> Vivek, do we have SSE/AVX instructions which may improve performance of this code? It could be follow up update if we can.
>
> Did you test it on 32-bit x86? Would be interesting to see result of artificially switching off AVX and SSE:
> '-XX:UseSSE=0 -XX:UseAVX=0'. It will make sure that only general instructions are needed.
>
> Thanks,
> Vladimir
>
> On 8/3/20 7:39 AM, Ludovic Henry wrote:
>> Hi,
>>
>> A quick follow up on that change. Are you happy with the general approach, or would rather have it done differently?
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8250902
>> Webrev: http://cr.openjdk.java.net/~luhenry/8250902/webrev.01/
>>
>> Thank you
>> Ludovic
>>
More information about the hotspot-compiler-dev
mailing list