RFR: 8234321: Call cache flush after generating trampoline.

Xiaohong Gong (Arm Technology China) Xiaohong.Gong at arm.com
Wed Nov 20 06:36:09 UTC 2019


Hi,

Please help to review this small patch:
Webrev: http://cr.openjdk.java.net/~xgong/rfr/8234321/webrev.00/
JBS: https://bugs.openjdk.java.net/browse/JDK-8234321

This patch fixes issue: https://github.com/oracle/graal/issues/1801.

It is caused by a "SIGLL (0x4)" when the compiler calls a shared method in the
CDS archive. It shows that the trampoline instruction is invalid, while actually
it's valid. And the trampoline is just an unconditional branch to the real entry
of the method, which is generated at runtime when the method is linked. So
one possible reason is that the instruction cache and data cache are not synced.

This patch fixes it by calling the cache flush after generating the trampoline for
shared methods. It invalidates the icache to make sure the instructions fetched
are updated. This is important for platforms that the CPUs do not have a coherent
icache like AArch64.

Thanks,
Xiaohong Gong


More information about the hotspot-compiler-dev mailing list