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 dir breakdown metrics for Intel

Breakdown directory hit, misses and requests. The implementation uses
the M2M and CHA PMUs present in server models broadwellde, broadwellx
cascadelakex, emeraldrapids, icelakex, 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
2166b44b cde9c1a5

+36
+36
tools/perf/pmu-events/intel_metrics.py
··· 815 815 ], description="Breakdown of load/store instructions") 816 816 817 817 818 + def UncoreDir() -> Optional[MetricGroup]: 819 + try: 820 + m2m_upd = Event("UNC_M2M_DIRECTORY_UPDATE.ANY") 821 + m2m_hits = Event("UNC_M2M_DIRECTORY_HIT.DIRTY_I") 822 + # Turn the umask into a ANY rather than DIRTY_I filter. 823 + m2m_hits.name += "/umask=0xFF,name=UNC_M2M_DIRECTORY_HIT.ANY/" 824 + m2m_miss = Event("UNC_M2M_DIRECTORY_MISS.DIRTY_I") 825 + # Turn the umask into a ANY rather than DIRTY_I filter. 826 + m2m_miss.name += "/umask=0xFF,name=UNC_M2M_DIRECTORY_MISS.ANY/" 827 + cha_upd = Event("UNC_CHA_DIR_UPDATE.HA") 828 + # Turn the umask into a ANY rather than HA filter. 829 + cha_upd.name += "/umask=3,name=UNC_CHA_DIR_UPDATE.ANY/" 830 + except: 831 + return None 832 + 833 + m2m_total = m2m_hits + m2m_miss 834 + upd = m2m_upd + cha_upd # in cache lines 835 + upd_r = upd / interval_sec 836 + look_r = m2m_total / interval_sec 837 + 838 + scale = 64 / 1_000_000 # Cache lines to MB 839 + return MetricGroup("lpm_dir", [ 840 + Metric("lpm_dir_lookup_rate", "", 841 + d_ratio(m2m_total, interval_sec), "requests/s"), 842 + Metric("lpm_dir_lookup_hits", "", 843 + d_ratio(m2m_hits, m2m_total), "100%"), 844 + Metric("lpm_dir_lookup_misses", "", 845 + d_ratio(m2m_miss, m2m_total), "100%"), 846 + Metric("lpm_dir_update_requests", "", 847 + d_ratio(m2m_upd + cha_upd, interval_sec), "requests/s"), 848 + Metric("lpm_dir_update_bw", "", 849 + d_ratio(m2m_upd + cha_upd, interval_sec), f"{scale}MB/s"), 850 + ]) 851 + 852 + 818 853 def UncoreMem() -> Optional[MetricGroup]: 819 854 try: 820 855 loc_rds = Event("UNC_CHA_REQUESTS.READS_LOCAL", ··· 979 944 IntelMlp(), 980 945 IntelPorts(), 981 946 IntelSwpf(), 947 + UncoreDir(), 982 948 UncoreMem(), 983 949 UncoreMemBw(), 984 950 ])