NMT level does not need to be volatile

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P3
    • None
    • Affects Version/s: 20
    • Component/s: hotspot

      While investigating the performance of os::malloc, I found that we spend considerable time in the NMT enabled check. This is bad, since this hits every execution path unconditionally. On x64 it uses a locked load. That is caused by NMT level being a volatile.

      We need to investigate if this is still needed. NMT level used to get modified on the fly (NMT shutdown) but we simplified that NMT protocol a lot over the years. Nowadays the level should - in theory - only be set in VM initialization, after which it should never change. We can probably just remove the volatile, but I need to check first.

            Assignee:
            Thomas Stuefe
            Reporter:
            Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: