Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marco Perronet
rbf-trace
Commits
94cc689f
Commit
94cc689f
authored
Nov 23, 2021
by
Marco Perronet
Browse files
Add script to run trace-sched-event with rtspin
parent
f24ea4d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/run_with_rtspin.py
0 → 100644
View file @
94cc689f
#!/usr/bin/env python3
import
subprocess
import
time
import
os
import
argparse
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--output"
,
required
=
True
)
args
=
parser
.
parse_args
()
# workload = "scripts/evaluation/workloads/uniprocessor_double/1_uni_double_slow.json"
# workload = "scripts/evaluation/workloads/uniprocessor_double/2_uni_double.json"
# workload = "scripts/evaluation/workloads/uniprocessor_double/3_uni_double_fast.json"
# workload = "scripts/evaluation/workloads/uniprocessor_double/4_uni_double_veryfast.json"
workload
=
"scripts/evaluation/workloads/uniprocessor_all/8_uni_stress_veryfast.json"
print
()
print
(
"*** RUNNING WORKLOAD: "
+
os
.
path
.
basename
(
workload
)
+
" ***"
)
print
()
# Spawn threads to be traced
proc1
=
subprocess
.
Popen
([
"python3"
,
"scripts/evaluation/generate_workload.py"
,
"--workload"
,
workload
])
# Skip rtspin init phase
time
.
sleep
(
1
)
# Get pids to trace and call trace-sched-event
proc2
=
subprocess
.
Popen
([
"pgrep"
,
"rtspin"
],
stdout
=
subprocess
.
PIPE
)
proc3
=
subprocess
.
run
([
"xargs"
,
"./src/tools/trace-sched-event"
,
"--output"
,
args
.
output
,
"--pids"
],
stdin
=
proc2
.
stdout
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment