Skip to content
Snippets Groups Projects
Commit cb2c236e authored by Tomasz Grabiec's avatar Tomasz Grabiec Committed by Pekka Enberg
Browse files

run.py: allow multiple arguments to --trace


Allow to pass --trace multiple times to run.py so that the command
line interface is the same as for OSv's loader, eg:

  scripts/run.py --trace sched_wait* --trace memory_*

Reviewed-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarTomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent 257194a2
No related branches found
No related tags found
No related merge requests found
...@@ -55,7 +55,7 @@ def set_imgargs(options): ...@@ -55,7 +55,7 @@ def set_imgargs(options):
execute = execute.replace('java.so', 'java.so ' + debug_options) execute = execute.replace('java.so', 'java.so ' + debug_options)
if options.trace: if options.trace:
execute = '--trace=%s %s' % (options.trace, execute) execute = ' '.join('--trace=%s' % name for name in options.trace) + ' ' + execute
if options.trace_backtrace: if options.trace_backtrace:
execute = '--trace-backtrace ' + execute execute = '--trace-backtrace ' + execute
...@@ -354,8 +354,8 @@ if (__name__ == "__main__"): ...@@ -354,8 +354,8 @@ if (__name__ == "__main__"):
help = "redirect the API port (8000) for user-mode networking") help = "redirect the API port (8000) for user-mode networking")
parser.add_argument("--pass-args", action="append", parser.add_argument("--pass-args", action="append",
help = "pass arguments to underlying hypervisor (e.g. qemu)") help = "pass arguments to underlying hypervisor (e.g. qemu)")
parser.add_argument("--trace", action="store", parser.add_argument("--trace", default=[], action='append',
help="enable tracepoint") help="enable tracepoints")
parser.add_argument("--trace-backtrace", action="store_true", parser.add_argument("--trace-backtrace", action="store_true",
help="enable collecting of backtrace at tracepoints") help="enable collecting of backtrace at tracepoints")
cmdargs = parser.parse_args() cmdargs = parser.parse_args()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment