Skip to content

Commit

Permalink
adding mini srf (#51)
Browse files Browse the repository at this point in the history
* update html report

* improve VM filtering

* move acknowledgements and compress metric table

* adding mini sierra forest
  • Loading branch information
hilldani authored Aug 16, 2023
1 parent 79002fe commit ee60713
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 40 additions & 0 deletions events/metric_srf.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
22 changes: 22 additions & 0 deletions events/srf.txt
Original file line number Diff line number Diff line change
@@ -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/;
3 changes: 3 additions & 0 deletions perf-collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"Icelake",
"SapphireRapids",
"EmeraldRapids",
"SierraForest",
]


Expand Down Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion perf-collect.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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={},
Expand Down
2 changes: 2 additions & 0 deletions perf-postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
8 changes: 6 additions & 2 deletions src/perf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand All @@ -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}")

Expand Down Expand Up @@ -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


Expand Down

0 comments on commit ee60713

Please sign in to comment.