Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf jevents: Add upi_bw metric for Intel

Break down UPI read and write bandwidth using uncore_upi counters.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Thomas Falcon <thomas.falcon@intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Benjamin Gray <bgray@linux.ibm.com>
Cc: Caleb Biggers <caleb.biggers@intel.com>
Cc: Edward Baker <edward.baker@intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Leo Yan <leo.yan@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Perry Taylor <perry.taylor@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sandipan Das <sandipan.das@amd.com>
Cc: Weilin Wang <weilin.wang@intel.com>
Cc: Xu Yang <xu.yang_2@nxp.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
5dc81578 6ec3058e

+22
+22
tools/perf/pmu-events/intel_metrics.py
··· 1033 1033 ], description="Memory Bandwidth") 1034 1034 1035 1035 1036 + def UncoreUpiBw() -> Optional[MetricGroup]: 1037 + try: 1038 + upi_rds = Event("UNC_UPI_RxL_FLITS.ALL_DATA") 1039 + upi_wrs = Event("UNC_UPI_TxL_FLITS.ALL_DATA") 1040 + except: 1041 + return None 1042 + 1043 + upi_total = upi_rds + upi_wrs 1044 + 1045 + # From "Uncore Performance Monitoring": When measuring the amount of 1046 + # bandwidth consumed by transmission of the data (i.e. NOT including 1047 + # the header), it should be .ALL_DATA / 9 * 64B. 1048 + scale = (64 / 9) / 1_000_000 1049 + return MetricGroup("lpm_upi_bw", [ 1050 + Metric("lpm_upi_bw_read", "UPI read bandwidth", 1051 + d_ratio(upi_rds, interval_sec), f"{scale}MB/s"), 1052 + Metric("lpm_upi_bw_write", "DDR memory write bandwidth", 1053 + d_ratio(upi_wrs, interval_sec), f"{scale}MB/s"), 1054 + ], description="UPI Bandwidth") 1055 + 1056 + 1036 1057 def main() -> None: 1037 1058 global _args 1038 1059 ··· 1097 1076 UncoreDir(), 1098 1077 UncoreMem(), 1099 1078 UncoreMemBw(), 1079 + UncoreUpiBw(), 1100 1080 ]) 1101 1081 1102 1082 if _args.metricgroups: