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

Rename refill waster counters in ThreadLocalAllocBuffer

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 17
    • hotspot
    • None
    • gc
    • behavioral
    • minimal
    • After the renaming, only the new names are print by jcmd commands. They can also be accessed via jdk.internal APIs, which handles both old and new names by treating them as aliases.
    • Other
    • Implementation

      Summary

      Rename two TLAB performance counters:

      1. sun.gc.tlab.slowWaste => sun.gc.tlab.refillWaste
      2. sun.gc.tlab.maxSlowWaste => sun.gc.tlab.maxRefillWaste

      These performance counters can be accessed in two ways: jcmd and jdk.internal APIs.

      jcmd <pid> PerfCounter.print will print counters with only the new names.

      If a user queries the counter programmatically via AbstractPerfDataBuffer query APIs, (e.g. Monitor findByName(String name)), both old and new names work, because src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/resources/aliasmap is updated treat old names as aliases of the new names.

      Problem

      The underlying counters are dropping slow in their names, so the corresponding exposed performance counters should be updated accordingly as well.

      Solution

      Rename those two counters so that sun.gc.tlab.refillWaste tracks _perf_total_refill_waste and sun.gc.tlab.maxRefillWaste tracks _perf_max_refill_waste.

      Specification

      The most important change is in src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp, shown below.

      Before:

          _perf_total_slow_refill_waste = create_perf_variable("slowWaste",    PerfData::U_Bytes, CHECK);
          _perf_max_slow_refill_waste   = create_perf_variable("maxSlowWaste", PerfData::U_Bytes, CHECK);

      After:

          _perf_total_refill_waste      = create_perf_variable("refillWaste",    PerfData::U_Bytes, CHECK);
          _perf_max_refill_waste        = create_perf_variable("maxRefillWaste", PerfData::U_Bytes, CHECK);

            ayang Albert Yang
            ayang Albert Yang
            Stefan Johansson, Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: