8212753: Improve oopDesc::forward_to_atomic

Avoid multiple unnecessary reloads of the mark oop in oopDesc::forward_to_atomic

Reviewed-by: kbarrett, mdoerr
This commit is contained in:
Thomas Schatzl 2018-10-24 16:22:34 +02:00
parent 5dac22b8eb
commit 3a48e68b1a
4 changed files with 19 additions and 24 deletions

View file

@ -273,7 +273,7 @@ class oopDesc {
// Exactly one thread succeeds in inserting the forwarding pointer, and
// this call returns "NULL" for that thread; any other thread has the
// value of the forwarding pointer returned and does not modify "this".
inline oop forward_to_atomic(oop p, atomic_memory_order order = memory_order_conservative);
inline oop forward_to_atomic(oop p, markOop compare, atomic_memory_order order = memory_order_conservative);
inline oop forwardee() const;
inline oop forwardee_acquire() const;