qemu-trace2txt 790 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python3
  2. import os
  3. import common
  4. from shell_helpers import LF
  5. class Main(common.LkmcCliFunction):
  6. def __init__(self):
  7. super().__init__(
  8. description='''\
  9. Convert a QEMU `-trace exec_tb` to text form.
  10. '''
  11. )
  12. def timed_main(self):
  13. return self.sh.run_cmd(
  14. [
  15. os.path.join(self.env['qemu_source_dir'], 'scripts/simpletrace.py'), LF,
  16. os.path.join(self.env['qemu_build_dir'], 'trace-events-all'), LF,
  17. os.path.join(self.env['qemu_trace_file']), LF,
  18. ],
  19. cmd_file=os.path.join(self.env['run_dir'], 'qemu-trace2txt'),
  20. out_file=self.env['qemu_trace_txt_file'],
  21. show_stdout=False,
  22. )
  23. if __name__ == '__main__':
  24. Main().cli()