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

Avoid calling MallocTracker::record_malloc and record_free when NMT is off

XMLWordPrintable

    • b22

        When mallocing, we spend some cycles calling into MallocTracker::record_malloc and ::record_free, only to immediately return in the common case that NMT is not enabled.

        Moving the NMT_off check to equivalents in MemTracker allows the checks to be inlined, which is performance neutral in case NMT is enabled, but reduces overhead when it's disabled. This inlining is also neutral w.r.t. static binary size.

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: