Replace markWord.is_neutral() with markWord.is_unlocked()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 23
    • Component/s: hotspot
    • b18

      In markword.hpp the definitions for is_neutral() and is_unlocked() are identical and always have been:

        bool is_unlocked() const {
          return (mask_bits(value(), lock_mask_in_place) == unlocked_value);
        }
        bool is_neutral() const {
          return (mask_bits(value(), lock_mask_in_place) == unlocked_value);
        }

      Investigating this historical anomaly it seems in the early days of biased-locking, when different approaches were being trialed, the use of is_neutral slipped in via a merge and the anomaly was never noticed, or subsequently cleaned up. With a lot of work happening in this area of the code recently this anomaly has been causing some confusion, so it is prudent to clean things up and just replace is_neutral with is_unlocked where appropriate.

            Assignee:
            David Holmes
            Reporter:
            David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: