diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-22 14:27:53 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-07-22 14:27:53 +0200 |
commit | 4323693e69da14a28485afb4ada327491d78e8c2 (patch) | |
tree | d2b2a64171fe72b6886816c3c91c038e672cd166 /lib/runner.py | |
parent | f519d3c9500e4b5a56f8400f18e97dcc70a8718c (diff) |
fix runner.get_counter_limits_us for non-default cpu frequencies
Diffstat (limited to 'lib/runner.py')
-rw-r--r-- | lib/runner.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/runner.py b/lib/runner.py index 96569a8..e45630a 100644 --- a/lib/runner.py +++ b/lib/runner.py @@ -422,12 +422,12 @@ def sleep_ms(duration: int, arch: str, cpu_freq: int = None) -> str: return f"arch.sleep_ms({duration});\n" -def get_counter_limits_us(arch: str) -> tuple: +def get_counter_limits_us(arch: str, opts=list()) -> tuple: """Return duration of one counter step and one counter overflow in us.""" cpu_freq = 0 overflow_value = 0 max_overflow = 0 - for line in get_info(arch): + for line in get_info(arch, opts): match = re.match(r"CPU\s+Freq:\s+(.*)\s+Hz", line) if match: cpu_freq = int(match.group(1)) |