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

[fastdbg build] Arena::inc_bytes_allocated should get inlined

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Migrated
    • Icon: P4 P4
    • 14
    • 14
    • hotspot

      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.

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

              Created:
              Updated:
              Resolved: