[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/7] trace: avoid SystemTap dtrace(1) warnings on emp
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 2/7] trace: avoid SystemTap dtrace(1) warnings on empty files |
Date: |
Mon, 25 Mar 2019 15:58:52 +0000 |
target/hppa/trace-events only contains disabled events, resulting in a
trace-dtrace.dtrace file that says "provider qemu {}". SystemTap's
dtrace(1) tool prints a warning when processing this input file.
This patch avoids the error by emitting an empty file instead of
"provider qemu {}" when there are no enabled trace events.
Fixes: 23c3d569f44284066714ff7c46bc4f19e630583f ("target/hppa: add TLB trace
events")
Reported-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Reviewed-by: Liam Merwick <address@hidden>
Message-id: address@hidden
Message-Id: <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
scripts/tracetool/format/d.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py
index 78397c24d2..c7cb2a93a6 100644
--- a/scripts/tracetool/format/d.py
+++ b/scripts/tracetool/format/d.py
@@ -33,6 +33,11 @@ def generate(events, backend, group):
events = [e for e in events
if "disable" not in e.properties]
+ # SystemTap's dtrace(1) warns about empty "provider qemu {}" but is happy
+ # with an empty file. Avoid the warning.
+ if not events:
+ return
+
out('/* This file is autogenerated by tracetool, do not edit. */'
'',
'provider qemu {')
--
2.20.1
- [Qemu-devel] [PULL 0/7] Tracing patches, Stefan Hajnoczi, 2019/03/25
- [Qemu-devel] [PULL 7/7] trace-events: Fix attribution of trace points to source, Stefan Hajnoczi, 2019/03/25
- [Qemu-devel] [PULL 5/7] scripts/cleanup-trace-events: Update for current practice, Stefan Hajnoczi, 2019/03/25
- [Qemu-devel] [PULL 6/7] trace-events: Delete unused trace points, Stefan Hajnoczi, 2019/03/25
- [Qemu-devel] [PULL 4/7] trace-events: Shorten file names in comments, Stefan Hajnoczi, 2019/03/25
- [Qemu-devel] [PULL 3/7] trace-events: Consistently point to docs/devel/tracing.txt, Stefan Hajnoczi, 2019/03/25
- [Qemu-devel] [PULL 2/7] trace: avoid SystemTap dtrace(1) warnings on empty files,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 1/7] trace: handle tracefs path truncation, Stefan Hajnoczi, 2019/03/25
- Re: [Qemu-devel] [PULL 0/7] Tracing patches, Peter Maydell, 2019/03/25