From 6e2b99a0870e467e35c8b4b95aeb1e665dded413 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Thu, 21 Feb 2013 18:32:24 -0500 Subject: Many bugfixes motivated by some end-to-end testing. --- run/litmus_util.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'run/litmus_util.py') diff --git a/run/litmus_util.py b/run/litmus_util.py index ec1700e..8a7f87d 100644 --- a/run/litmus_util.py +++ b/run/litmus_util.py @@ -4,7 +4,6 @@ import subprocess import os import stat import config.config as conf -from common import get_config_option def num_cpus(): '''Return the number of CPUs in the system.''' @@ -19,11 +18,12 @@ def num_cpus(): return cpus def ft_freq(): - '''The frequency (in MHz) of the clock used by feather trace.''' - if get_config_option('CPU_V7') == 'y': + umachine = subprocess.check_output(["uname", "-m"]) + + if re.match("armv7", umachine): # Arm V7s use a millisecond timer freq = 1000.0 - elif get_config_option('X86') == 'y': + elif re.match("x86", umachine): # X86 timer is equal to processor clock reg = re.compile(r'^cpu MHz\s*:\s*(?P\d+)', re.M) with open('/proc/cpuinfo', 'r') as f: @@ -76,7 +76,7 @@ def is_device(dev): return not (not mode & stat.S_IFCHR) def waiting_tasks(): - reg = re.compile(r'^ready.*(?P\d+)$', re.M) + reg = re.compile(r'^ready.*?(?P\d+)$', re.M) with open('/proc/litmus/stats', 'r') as f: data = f.read() -- cgit v1.2.2