RFR [S] 8087133: Improve sharing of native wrappers in SignatureHandlerLibrary
David Holmes
david.holmes at oracle.com
Fri Jun 12 08:57:22 UTC 2015
Hi Bertrand,
On 12/06/2015 6:12 PM, Bertrand Delsart wrote:
> Hi all,
>
> This CR allows to reduce the number of generated fast native signature
> handlers, based on a CPU-dependent normalization of the signatures.
>
> This will be pushed through hs-rt as part of a series of webrevs that
> implement a closed JEP which adds support for some pregenerated code,
> including these handlers.
>
> https://bugs.openjdk.java.net/browse/JDK-8087133
>
> http://cr.openjdk.java.net/~bdelsart/8087133/webrev.01/webrev/index.html
src/share/vm/runtime/signature.hpp
In is_static:
120 return fingerprint & 1;
should the 1 be a constant/enum? eg static_feature_size ?
src/share/vm/interpreter/interpreterRuntime.cpp
tty->print_cr(" associated result handler: " PTR_FORMAT, rh_begin);
You might find that needs p2i(rh_begin) on some platforms. I've been
seeing weird inconsistencies in some code I've been working on.
Otherwise seems okay.
Thanks,
David
> In the general use case, this only slightly reduces the number of
> generated native handlers, leading to a negligible code size gain.
> However, this sharing is more critical for our closed pregenerated code
> JEP. This is why the CPU-dependent normalization, which triggers the
> sharing, is currently only implemented on these closed platforms.
>
> The webrev also fixes a minor debug issue that was discovered while
> validating the change on our closed platforms.
> -XX:+PrintSignatureHandlers did not work correctly because
> Interpreter::result_handler(return_type) is not always executable code.
> On some platforms, this is just a value used by the native wrappers
> instead of code jumped to.
>
> Regards,
>
> Bertrand
More information about the hotspot-runtime-dev
mailing list