Commit e74f72a7 authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo
Browse files

perf jevents: Add mesh bandwidth saturation metric for Intel



Memory bandwidth saturation from CBOX/CHA events present in
broadwellde, broadwellx, cascadelakex, haswellx, icelakex, skylakex
and snowridgex.

Signed-off-by: default avatarIan Rogers <irogers@google.com>
Tested-by: default avatarThomas 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5dc81578
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1033,6 +1033,22 @@ def UncoreMemBw() -> Optional[MetricGroup]:
    ], description="Memory Bandwidth")


def UncoreMemSat() -> Optional[Metric]:
    try:
        clocks = Event("UNC_CHA_CLOCKTICKS", "UNC_C_CLOCKTICKS")
        sat = Event("UNC_CHA_DISTRESS_ASSERTED.VERT", "UNC_CHA_FAST_ASSERTED.VERT",
                    "UNC_C_FAST_ASSERTED")
    except:
        return None

    desc = ("Mesh Bandwidth saturation (% CBOX cycles with FAST signal asserted, "
            "include QPI bandwidth saturation), lower is better")
    if "UNC_CHA_" in sat.name:
        desc = ("Mesh Bandwidth saturation (% CHA cycles with FAST signal asserted, "
                "include UPI bandwidth saturation), lower is better")
    return Metric("lpm_mem_sat", desc, d_ratio(sat, clocks), "100%")


def UncoreUpiBw() -> Optional[MetricGroup]:
    try:
        upi_rds = Event("UNC_UPI_RxL_FLITS.ALL_DATA")
@@ -1097,6 +1113,7 @@ def main() -> None:
        UncoreDir(),
        UncoreMem(),
        UncoreMemBw(),
        UncoreMemSat(),
        UncoreUpiBw(),
    ])