From 5ddd1efeda26fafb9bb3fe573fd9b4d1c548786c Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Fri, 20 Sep 2024 20:27:21 +0000 Subject: [PATCH] Don't assert on ticks overshoot during record on AMD On AMD, we regularly overshoot the programmed ticks counter. We print this as a warning earlier in the function. However, the warning is ineffective, because we have an assert with the same condition later in the function. Adjust the check for that error condition to only fire during replay, not record (where it is supposed to be non-fatal). --- src/PerfCounters.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PerfCounters.cc b/src/PerfCounters.cc index ff4ea00bbc9..d16c2db66bf 100644 --- a/src/PerfCounters.cc +++ b/src/PerfCounters.cc @@ -1066,7 +1066,7 @@ Ticks PerfCounters::read_ticks(Task* t, Error* error) { ret = measure_val; } } - if (ret > adjusted_counting_period) { + if (!t->session().is_recording() && ret > adjusted_counting_period) { if (error && (perf_attrs[pmu_index].pmu_flags & PMU_SKID_UNBOUNDED)) { *error = Error::Transient; } else {