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

[fastdbg build] Arena::inc_bytes_allocated should get inlined

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Migrated
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: hotspot

      Description

      The simple function Arena::inc_bytes_allocated can be found as CPU consuming when profiling the fastdbg build. It is located in a cpp file.
      It should better get inlined. Main performance issue seems to be contention on the static variable _bytes_allocated which is updated by several threads.

      This function is only needed for PrintMallocStatistics, but the performance impact is also there if the feature is inactive (which is default).

      In addition, the implementation could get updated: Atomic 8-Byte load and store functions are available on all platforms, so the "#if defined ..." can get removed or adjusted to only avoid word-tearing on 32 bit.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mdoerr Martin Doerr
              Reporter:
              mdoerr Martin Doerr
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: