Skip to content

Commit ce31532

Browse files
committed
Merge tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu into staging
Pull request # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmesuKsACgkQnKSrs4Gr # c8hK6Qf/bsHjBdZ38SFdusrTsAILBMI+A6KWtofbXk5qAo+A5dFLqMoVc+c1x/Cc # GNccrlUXkqbNSVn2WsrARddTvy1s1o2B4zMjdBI/J6cUeeFGRU+YoMA2uBO7XRke # qwma5j9Rrx5TX/dZG4PSlhJl4WM4sbbknjjX3G8ySiKTGBuK5rLeeexYSjk/TOYQ # +LD8CnurrZ7ZbyLt4zzJu02s18/T3Rg50tmM81HVz8DpUZRE3Waz82tSqNZsHWva # oh3cwKDimuxYcQYp9ePZxIwSkWjkUlHVJPj+zvHna8kkR76Ww+5Nvo2XvwSh4SCs # SuJtB9HPo2FmdqmUp0lPDbknhc3CzA== # =opYd # -----END PGP SIGNATURE----- # gpg: Signature made Wed 12 Feb 2025 10:05:15 EST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <[email protected]>" [ultimate] # gpg: aka "Stefan Hajnoczi <[email protected]>" [ultimate] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * tag 'tracing-pull-request' of https://gitlab.com/stefanha/qemu: scripts: improve error from qemu-trace-stap on missing 'stap' Signed-off-by: Stefan Hajnoczi <[email protected]>
2 parents de278e5 + 9976be3 commit ce31532

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/qemu-trace-stap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def tapset_dir(binary):
5656

5757

5858
def cmd_run(args):
59+
stap = which("stap")
5960
prefix = probe_prefix(args.binary)
6061
tapsets = tapset_dir(args.binary)
6162

@@ -76,14 +77,15 @@ def cmd_run(args):
7677

7778
# We request an 8MB buffer, since the stap default 1MB buffer
7879
# can be easily overflowed by frequently firing QEMU traces
79-
stapargs = ["stap", "-s", "8", "-I", tapsets ]
80+
stapargs = [stap, "-s", "8", "-I", tapsets ]
8081
if args.pid is not None:
8182
stapargs.extend(["-x", args.pid])
8283
stapargs.extend(["-e", script])
8384
subprocess.call(stapargs)
8485

8586

8687
def cmd_list(args):
88+
stap = which("stap")
8789
tapsets = tapset_dir(args.binary)
8890

8991
if args.verbose:
@@ -96,7 +98,7 @@ def cmd_list(args):
9698

9799
if verbose:
98100
print("Listing probes with name '%s'" % script)
99-
proc = subprocess.Popen(["stap", "-I", tapsets, "-l", script],
101+
proc = subprocess.Popen([stap, "-I", tapsets, "-l", script],
100102
stdout=subprocess.PIPE,
101103
universal_newlines=True)
102104
out, err = proc.communicate()

0 commit comments

Comments
 (0)