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

NMT: AllocationSite::equals() should compare the whole object

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • tbd
    • 17
    • hotspot

    Description

      `AllocationSite` contains a call stack and a MEMFLAGS object. `AllocationSite::equals()` only compares the call stack, disregarding the MEMFLAGS setting.

      In theory two objects with the same call stack should always have the same MEMFLAGS value too since the call stack should refer to the same allocation call site. However, the call stack grabbing may have been off, we may have skipped or lost too many low frames.

      (We see this actually happening on some platforms, see [1])

      The effect could be that multiple allocation sites get lumped together and registered with the same call stack. But they may carry different flags.

      The flag values are currently compared outside of `AllocationSite::equals()` in `MallocSiteTable::lookup_and_add()`. But `AllocationSite`objects are placed into sorting containers too and therefore `AllocationSite::equals()` should do the comparison.

      [1] https://bugs.openjdk.java.net/browse/JDK-8261556

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: