]>
Witch of Git - ivy/blob - tools/trace.py
9 def get_trace(command
):
10 result
= subprocess
.run(
11 ["lldb", "-b", "-o", "run", command
],
12 env
={"IVY_RT_TRACE": "1"},
16 lines
= result
.stdout
.split("\n")
20 def trace(command
, only_debug
):
21 syms
= format_trace
.get_syms(command
)
22 lines
= get_trace(command
)
23 format_trace
.handle_trace(lines
, syms
, only_debug
)
27 parser
= argparse
.ArgumentParser(
28 description
="Run an Ivy executable and format its runtime trace.",
32 help="The command to execute.",
38 help="If set, only print the DEBUG outputs",
40 if len(sys
.argv
) <= 1:
43 args
= parser
.parse_args()
44 trace(args
.command
, args
.only_debug
)
47 if __name__
== "__main__":