perf/x86/intel/uncore: Add BW counters for GT, IA and IO breakdown
authorVaibhav Shankar <vaibhav.shankar@intel.com>
Fri, 14 Aug 2020 02:22:34 +0000 (19:22 -0700)
committerIngo Molnar <mingo@kernel.org>
Sat, 15 Aug 2020 18:24:18 +0000 (20:24 +0200)
commit24633d901ea44fe99bc9a2d01a3881fa097b78b3
treea76824dc85f05dae0fbbe902a0567a5db93ac1d1
parent50f6c7dbd973092d8e5f3c89f29eb4bea19fdebd
perf/x86/intel/uncore: Add BW counters for GT, IA and IO breakdown

Linux only has support to read total DDR reads and writes. Here we
add support to enable bandwidth breakdown-GT, IA and IO. Breakdown
of BW is important to debug and optimize memory access. This can also
be used for telemetry and improving the system software.The offsets for
GT, IA and IO are added and these free running counters can be accessed
via MMIO space.

The BW breakdown can be measured using the following cmd:

  perf stat -e uncore_imc/gt_requests/,uncore_imc/ia_requests/,uncore_imc/io_requests/

             30.57 MiB  uncore_imc/gt_requests/
           1346.13 MiB  uncore_imc/ia_requests/
            190.97 MiB  uncore_imc/io_requests/

       5.984572733 seconds time elapsed

     BW/s = <gt,ia,io>_requests/time elapsed

Signed-off-by: Vaibhav Shankar <vaibhav.shankar@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200814022234.23605-1-vaibhav.shankar@intel.com
arch/x86/events/intel/uncore_snb.c