qemu-trace-stap.rst 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. =========================
  2. QEMU SystemTap trace tool
  3. =========================
  4. Synopsis
  5. --------
  6. **qemu-trace-stap** [*GLOBAL-OPTIONS*] *COMMAND* [*COMMAND-OPTIONS*] *ARGS*...
  7. Description
  8. -----------
  9. The ``qemu-trace-stap`` program facilitates tracing of the execution
  10. of QEMU emulators using SystemTap.
  11. It is required to have the SystemTap runtime environment installed to use
  12. this program, since it is a wrapper around execution of the ``stap``
  13. program.
  14. Options
  15. -------
  16. .. program:: qemu-trace-stap
  17. The following global options may be used regardless of which command
  18. is executed:
  19. .. option:: --verbose, -v
  20. Display verbose information about command execution.
  21. The following commands are valid:
  22. .. option:: list BINARY PATTERN...
  23. List all the probe names provided by *BINARY* that match
  24. *PATTERN*.
  25. If *BINARY* is not an absolute path, it will be located by searching
  26. the directories listed in the ``$PATH`` environment variable.
  27. *PATTERN* is a plain string that is used to filter the results of
  28. this command. It may optionally contain a ``*`` wildcard to facilitate
  29. matching multiple probes without listing each one explicitly. Multiple
  30. *PATTERN* arguments may be given, causing listing of probes that match
  31. any of the listed names. If no *PATTERN* is given, the all possible
  32. probes will be listed.
  33. For example, to list all probes available in the |qemu_system|
  34. binary:
  35. .. parsed-literal::
  36. $ qemu-trace-stap list |qemu_system|
  37. To filter the list to only cover probes related to QEMU's cryptographic
  38. subsystem, in a binary outside ``$PATH``
  39. .. parsed-literal::
  40. $ qemu-trace-stap list /opt/qemu/|version|/bin/|qemu_system| 'qcrypto*'
  41. .. option:: run OPTIONS BINARY PATTERN...
  42. Run a trace session, printing formatted output any time a process that is
  43. executing *BINARY* triggers a probe matching *PATTERN*.
  44. If *BINARY* is not an absolute path, it will be located by searching
  45. the directories listed in the ``$PATH`` environment variable.
  46. *PATTERN* is a plain string that matches a probe name shown by the
  47. *LIST* command. It may optionally contain a ``*`` wildcard to
  48. facilitate matching multiple probes without listing each one explicitly.
  49. Multiple *PATTERN* arguments may be given, causing all matching probes
  50. to be monitored. At least one *PATTERN* is required, since stap is not
  51. capable of tracing all known QEMU probes concurrently without overflowing
  52. its trace buffer.
  53. Invocation of this command does not need to be synchronized with
  54. invocation of the QEMU process(es). It will match probes on all
  55. existing running processes and all future launched processes,
  56. unless told to only monitor a specific process.
  57. Valid command specific options are:
  58. .. program:: qemu-trace-stap-run
  59. .. option:: --pid=PID, -p PID
  60. Restrict the tracing session so that it only triggers for the process
  61. identified by *PID*.
  62. For example, to monitor all processes executing |qemu_system|
  63. as found on ``$PATH``, displaying all I/O related probes:
  64. .. parsed-literal::
  65. $ qemu-trace-stap run |qemu_system| 'qio*'
  66. To monitor only the QEMU process with PID 1732
  67. .. parsed-literal::
  68. $ qemu-trace-stap run --pid=1732 |qemu_system| 'qio*'
  69. To monitor QEMU processes running an alternative binary outside of
  70. ``$PATH``, displaying verbose information about setup of the
  71. tracing environment:
  72. .. parsed-literal::
  73. $ qemu-trace-stap -v run /opt/qemu/|version|/bin/|qemu_system| 'qio*'
  74. See also
  75. --------
  76. :manpage:`qemu(1)`, :manpage:`stap(1)`
  77. ..
  78. Copyright (C) 2019 Red Hat, Inc.
  79. This program is free software; you can redistribute it and/or modify
  80. it under the terms of the GNU General Public License as published by
  81. the Free Software Foundation; either version 2 of the License, or
  82. (at your option) any later version.