Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8296436

NMT level does not need to be volatile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • None
    • 20
    • 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.

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

              Created:
              Updated:
              Resolved: