qemu-trace-stap.texi 3.9 KB

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