@@ -84,9 +84,16 @@ if Build.environment.has("perf") then
84
84
measurements["decoded"] = tonumber(insts)
85
85
measurements["elapsed_ms"] = tonumber(ms)
86
86
87
- ipc = measurements["instructions:u"] / measurements["cycles:u"]
87
+ local instructions_name = "instructions:u"
88
+ local cycles_name = "cycles:u"
89
+ if measurements[instructions_name] == nil then
90
+ instructions_name = "instructions"
91
+ cycles_name = "cycles"
92
+ end
93
+
94
+ ipc = measurements[instructions_name] / measurements[cycles_name]
88
95
Build.metric("no-fmt IPC", string.format("%.3f", ipc))
89
- inst_per_decode = measurements["instructions:u" ] / measurements["decoded"]
96
+ inst_per_decode = measurements[instructions_name ] / measurements["decoded"]
90
97
Build.metric("no-fmt instructions/decode", string.format("%.1f", inst_per_decode))
91
98
ms_per_decode = measurements["elapsed_ms"] / measurements["decoded"]
92
99
Build.metric("no-fmt ns/decode", string.format("%.2f", ms_per_decode * 1000000))
@@ -105,7 +112,7 @@ if Build.environment.has("perf") then
105
112
measurements["decoded"] = tonumber(insts)
106
113
measurements["elapsed_ms"] = tonumber(ms)
107
114
108
- ipc = measurements["instructions:u" ] / measurements["cycles:u" ]
115
+ ipc = measurements[instructions_name ] / measurements[cycles_name ]
109
116
Build.metric("fmt IPC", string.format("%.3f", ipc))
110
117
inst_per_decode = measurements["instructions:u"] / measurements["decoded"]
111
118
Build.metric("fmt instructions/decode", string.format("%.1f", inst_per_decode))
0 commit comments