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