Commit a068a034 authored by Sandipan Das's avatar Sandipan Das

Fix 'tools/syscount' from using incorrect fallback values

This prevents 'tools/syscount' from using incorrect system
call descriptions if the 'ausyscall' command is not found.
In this case, it uses a lookup table as a fallback. This,
however, is compliant with x86_64 only.

For now, we fix this by raising an exception and exiting if
the 'ausyscall' executable is not available for non-x86_64
systems instead of having additional lookup tables for other
architectures.
Signed-off-by: default avatarSandipan Das <sandipan@linux.vnet.ibm.com>
parent 54a5b4d1
......@@ -15,6 +15,7 @@ import argparse
import itertools
import subprocess
import sys
import platform
if sys.version_info.major < 3:
izip_longest = itertools.izip_longest
......@@ -362,7 +363,10 @@ try:
out = subprocess.check_output('ausyscall --dump | tail -n +2', shell=True)
syscalls = dict(map(parse_syscall, out.strip().split('\n')))
except Exception as e:
pass
if platform.machine() == "x86_64":
pass
else:
raise Exception("ausyscall: command not found")
parser = argparse.ArgumentParser(
description="Summarize syscall counts and latencies.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment