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

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

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b22

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: