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 local/remote "mem" breakdown metrics for Intel

Breakdown local and remote memory bandwidth, read and writes.

The implementation uses the HA and CHA PMUs present in server models
broadwellde, broadwellx cascadelakex, emeraldrapids, haswellx, icelakex,
ivytown, sapphirerapids and skylakex.

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
cde9c1a5 130f4245

+31
+31
tools/perf/pmu-events/intel_metrics.py
··· 815 815 ], description="Breakdown of load/store instructions") 816 816 817 817 818 + def UncoreMem() -> Optional[MetricGroup]: 819 + try: 820 + loc_rds = Event("UNC_CHA_REQUESTS.READS_LOCAL", 821 + "UNC_H_REQUESTS.READS_LOCAL") 822 + rem_rds = Event("UNC_CHA_REQUESTS.READS_REMOTE", 823 + "UNC_H_REQUESTS.READS_REMOTE") 824 + loc_wrs = Event("UNC_CHA_REQUESTS.WRITES_LOCAL", 825 + "UNC_H_REQUESTS.WRITES_LOCAL") 826 + rem_wrs = Event("UNC_CHA_REQUESTS.WRITES_REMOTE", 827 + "UNC_H_REQUESTS.WRITES_REMOTE") 828 + except: 829 + return None 830 + 831 + scale = 64 / 1_000_000 832 + return MetricGroup("lpm_mem", [ 833 + MetricGroup("lpm_mem_local", [ 834 + Metric("lpm_mem_local_read", "Local memory read bandwidth not including directory updates", 835 + d_ratio(loc_rds, interval_sec), f"{scale}MB/s"), 836 + Metric("lpm_mem_local_write", "Local memory write bandwidth not including directory updates", 837 + d_ratio(loc_wrs, interval_sec), f"{scale}MB/s"), 838 + ]), 839 + MetricGroup("lpm_mem_remote", [ 840 + Metric("lpm_mem_remote_read", "Remote memory read bandwidth not including directory updates", 841 + d_ratio(rem_rds, interval_sec), f"{scale}MB/s"), 842 + Metric("lpm_mem_remote_write", "Remote memory write bandwidth not including directory updates", 843 + d_ratio(rem_wrs, interval_sec), f"{scale}MB/s"), 844 + ]), 845 + ], description="Memory Bandwidth breakdown local vs. remote (remote requests in). directory updates not included") 846 + 847 + 818 848 def UncoreMemBw() -> Optional[MetricGroup]: 819 849 mem_events = [] 820 850 try: ··· 944 914 IntelMlp(), 945 915 IntelPorts(), 946 916 IntelSwpf(), 917 + UncoreMem(), 947 918 UncoreMemBw(), 948 919 ]) 949 920