[foreign-memaccess+abi] RFR: 8262118: Specialize upcalls [v2]
Jorn Vernee
jvernee at openjdk.java.net
Tue Feb 23 14:23:55 UTC 2021
On Tue, 23 Feb 2021 13:02:14 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Other includes seem to be missing - here's the patch I needed to get it working:
>>
>> +++ b/src/hotspot/cpu/x86/universalUpcallHandler_x86_64.cpp
>> @@ -31,6 +31,8 @@
>> #include "memory/resourceArea.hpp"
>> #include "prims/universalUpcallHandler.hpp"
>> #include "runtime/sharedRuntime.hpp"
>> +#include "runtime/signature.hpp"
>> +#include "utilities/formatBuffer.hpp"
>> #include "utilities/globalDefinitions.hpp"
>>
>> #define __ _masm->
>> diff --git a/src/hotspot/share/prims/foreign_globals.hpp b/src/hotspot/share/prims/foreign_globals.hpp
>> index 4f02ee625cb..44c65771e7c 100644
>> --- a/src/hotspot/share/prims/foreign_globals.hpp
>> +++ b/src/hotspot/share/prims/foreign_globals.hpp
>> @@ -27,6 +27,7 @@
>> #include "oops/oopsHierarchy.hpp"
>> #include "utilities/growableArray.hpp"
>> #include "utilities/macros.hpp"
>> +#include "code/vmreg.hpp"
>>
>> #include CPU_HEADER(foreign_globals)
>
> Executed benchmark on my machine:
>
> Benchmark Mode Cnt Score Error Units
> Upcalls.jni_args10 avgt 30 102.245 ? 1.952 ns/op
> Upcalls.jni_args5 avgt 30 59.715 ? 1.488 ns/op
> Upcalls.jni_blank avgt 30 43.189 ? 0.642 ns/op
> Upcalls.jni_identity avgt 30 90.224 ? 1.775 ns/op
> Upcalls.panama_args10 avgt 30 24.633 ? 0.260 ns/op
> Upcalls.panama_args5 avgt 30 18.708 ? 0.314 ns/op
> Upcalls.panama_blank avgt 30 15.925 ? 0.262 ns/op
> Upcalls.panama_identity avgt 30 19.769 ? 0.266 ns/op
> Seems to be from 2x to 4x faster - awesome!
Thanks for testing. I forgot that precompiled headers can be an issue, and was testing on multiple Linux machines, one of which doesn't test with PCH disabled. Will give it another try here as well.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/457
More information about the panama-dev
mailing list