RFR(m): 8220351: Cross-modifying code
Andrew Haley
aph at redhat.com
Thu Mar 14 18:23:10 UTC 2019
On 3/14/19 6:18 PM, Andrew Haley wrote:
> I have an idea that might work. Let's say that icache::flush(),
> executed whenever we patch code, increments a global patching
> counter. When a Java thread returns from a handshake, it compares a
> thread-local copy of the old value of the patching counter with the
> current value. If they are different, do whatever local fencing is
> necessary and record the current value of the patching counter.
And, just to complicate this even more, on some processors you'd not
only need to to do local fencing but you might need to know which
memory addresses had changed.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev
mailing list