diff --git a/Makefile b/Makefile index 0a1b0e1..2837cba 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ build-public/postprocess: --add-data "./events/metric_bdx.json:." \ --add-data "./events/metric_icx.json:." \ --add-data "./events/metric_spr.json:." \ + --add-data "./events/metric_srf.json:." \ --add-data "./src/base.html:." \ --runtime-tmpdir . \ --exclude-module readline diff --git a/events/metric_srf.json b/events/metric_srf.json new file mode 100644 index 0000000..1f38f6e --- /dev/null +++ b/events/metric_srf.json @@ -0,0 +1,40 @@ +[ + { + "name": "metric_CPU operating frequency (in GHz)", + "expression": "(([cpu-cycles] / [ref-cycles] * [SYSTEM_TSC_FREQ]) / 1000000000)" + }, + { + "name": "metric_CPU utilization %", + "expression": "100 * [ref-cycles] / [TSC]" + }, + { + "name": "metric_CPU utilization% in kernel mode", + "expression": "100 * [ref-cycles:k] / [TSC]", + "origin": "perfspect" + }, + { + "name": "metric_CPI", + "name-txn": "metric_cycles per txn", + "expression": "[cpu-cycles] / [instructions]", + "expression-txn": "[cpu-cycles] / [TXN]" + }, + { + "name": "metric_kernel_CPI", + "name-txn": "metric_kernel_cycles per txn", + "expression": "[cpu-cycles:k] / [instructions:k]", + "expression-txn": "[cpu-cycles:k] / [TXN]", + "origin": "perfspect" + }, + { + "name": "metric_IPC", + "name-txn": "metric_txn per cycle", + "expression": "[instructions] / [cpu-cycles]", + "expression-txn": "[TXN] / [cpu-cycles]", + "origin": "perfspect" + }, + { + "name": "metric_giga_instructions_per_sec", + "expression": "[instructions] / 1000000000", + "origin": "perfspect" + } +] \ No newline at end of file diff --git a/events/srf.txt b/events/srf.txt new file mode 100644 index 0000000..b57637d --- /dev/null +++ b/events/srf.txt @@ -0,0 +1,22 @@ +########################################################################################################### +# Copyright (C) 2021-2023 Intel Corporation +# SPDX-License-Identifier: BSD-3-Clause +########################################################################################################### + +# SierraForest event list + +cpu-cycles, +ref-cycles, +instructions; + +cpu-cycles:k, +ref-cycles:k, +instructions:k; + +#C6 +cstate_core/c6-residency/; +cstate_pkg/c6-residency/; + +#power +power/energy-pkg/, +power/energy-ram/; \ No newline at end of file diff --git a/perf-collect.py b/perf-collect.py index 3a37f3f..3a9ee61 100644 --- a/perf-collect.py +++ b/perf-collect.py @@ -27,6 +27,7 @@ "Icelake", "SapphireRapids", "EmeraldRapids", + "SierraForest", ] @@ -318,6 +319,8 @@ def validate_file(fname): elif arch == "emeraldrapids": eventfile = "spr.txt" have_uncore = False + elif arch == "sierraforest": + eventfile = "srf.txt" if eventfile is None: crash(f"failed to match architecture ({arch}) to event file name.") diff --git a/perf-collect.spec b/perf-collect.spec index 4de6f7a..da16dde 100644 --- a/perf-collect.spec +++ b/perf-collect.spec @@ -7,7 +7,7 @@ block_cipher = None a = Analysis( ['perf-collect.py'], pathex=[], - datas=[('./src/libtsc.so', '.'), ('./events/bdx.txt', '.'), ('./events/clx_skx.txt', '.'), ('./events/icx.txt', '.'), ('./events/spr.txt', '.')], + datas=[('./src/libtsc.so', '.'), ('./events/bdx.txt', '.'), ('./events/clx_skx.txt', '.'), ('./events/icx.txt', '.'), ('./events/spr.txt', '.'), ('./events/srf.txt', '.')], hiddenimports=[], hookspath=[], hooksconfig={}, diff --git a/perf-postprocess.py b/perf-postprocess.py index 49360bf..2f63880 100644 --- a/perf-postprocess.py +++ b/perf-postprocess.py @@ -416,6 +416,8 @@ def get_metric_file_name(microarchitecture): metric_file = "metric_icx.json" elif microarchitecture == "sapphirerapids" or microarchitecture == "emeraldrapids": metric_file = "metric_spr.json" + elif microarchitecture == "sierraforest": + metric_file = "metric_srf.json" else: crash("Suitable metric file not found") diff --git a/src/perf_helpers.py b/src/perf_helpers.py index 87eecd3..111b690 100644 --- a/src/perf_helpers.py +++ b/src/perf_helpers.py @@ -158,7 +158,8 @@ def disable_nmi_watchdog(): logging.info("nmi_watchdog disabled!") return nmi_watchdog_status except subprocess.CalledProcessError as e: - crash(e.output + "\nFailed to disable nmi_watchdog.") + logging.warning(e) + logging.warning("Failed to disable nmi_watchdog.") except ValueError as e: crash(f"Failed to disable watchdog: {e}") @@ -175,7 +176,8 @@ def enable_nmi_watchdog(): else: logging.info("nmi_watchdog enabled!") except subprocess.CalledProcessError as e: - logging.warning(e.output + "\nFailed to re-enable nmi_watchdog!") + logging.warning(e.output) + logging.warning("Failed to re-enable nmi_watchdog!") except ValueError as e: logging.warning(f"Failed to re-enable nmi_watchdog: {e}") @@ -281,6 +283,8 @@ def get_arch_and_name(procinfo): arch = "sapphirerapids" elif model == 207 and cpufamily == 6: arch = "emeraldrapids" + elif model == 175 and cpufamily == 6: + arch = "sierraforest" return arch, modelname