summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/tracing/rtla/sample/timerlat_load.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/tracing/rtla/sample/timerlat_load.py b/tools/tracing/rtla/sample/timerlat_load.py
index 785e9a83539a..d7341ed5127a 100644
--- a/tools/tracing/rtla/sample/timerlat_load.py
+++ b/tools/tracing/rtla/sample/timerlat_load.py
@@ -25,13 +25,12 @@ import sys
import os
parser = argparse.ArgumentParser(description='user-space timerlat thread in Python')
-parser.add_argument("cpu", help='CPU to run timerlat thread')
-parser.add_argument("-p", "--prio", help='FIFO priority')
-
+parser.add_argument("cpu", type=int, help='CPU to run timerlat thread')
+parser.add_argument("-p", "--prio", type=int, help='FIFO priority')
args = parser.parse_args()
try:
- affinity_mask = { int(args.cpu) }
+ affinity_mask = {args.cpu}
except:
print("Invalid cpu: " + args.cpu)
exit(1)
@@ -44,7 +43,7 @@ except:
if args.prio:
try:
- param = os.sched_param(int(args.prio))
+ param = os.sched_param(args.prio)
os.sched_setscheduler(0, os.SCHED_FIFO, param)
except:
print("Error setting priority")