RFR: 8210498: nmethod entry barriers
Per Liden
per.liden at oracle.com
Tue Jan 7 10:25:08 UTC 2020
Hi,
On 1/7/20 11:04 AM, Andrew Haley wrote:
> On 1/7/20 9:22 AM, erik.osterlund at oracle.com wrote:
[...]
>> In the alternative solution that biases the cost towards arming, instead
>> of calling, you would
>> instead walk the code cache and explicitly arm nmethods by patching in a
>> jump over nops in the
>> verified entry (for all nmethods).
>>
>> Disarming would be done by patching back nops over the jump on
>> individual nmethods as they
>> become safe to disarm.
>
> Aha! That'd be a much simpler method for AArch64, for sure. We already have
> a nop at the start of every method, so we could rewrite it as a simple
> jump.
But as Erik hinted, the main problem with this alternative is that
arming becomes an O(n) stop-the-world operation (where n is the number
of nmethods) rather than O(1), which is highly undesirable for ZGC.
cheers,
Per
More information about the hotspot-dev
mailing list