[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] [PULL 2/7] trace: avoid SystemTap dtrace(1) warnings on empty files
- To: qemu-devel@xxxxxxxxxx
- From: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
- Date: Mon, 25 Mar 2019 15:58:52 +0000
- Cc: Fam Zheng <fam@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx, David Hildenbrand <david@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Mark Cave-Ayland <mark.cave-ayland@xxxxxxxxxxxx>, Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>, Gerd Hoffmann <kraxel@xxxxxxxxxx>, Eric Blake <eblake@xxxxxxxxxx>, Liam Merwick <liam.merwick@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, qemu-block@xxxxxxxxxx, Juan Quintela <quintela@xxxxxxxxxx>, Aleksandar Rikalo <arikalo@xxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, Halil Pasic <pasic@xxxxxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx>, Artyom Tarasenko <atar4qemu@xxxxxxxxx>, Eduardo Habkost <ehabkost@xxxxxxxxxx>, Riku Voipio <riku.voipio@xxxxxx>, "Dr. David Alan Gilbert" <dgilbert@xxxxxxxxxx>, Yuval Shaia <yuval.shaia@xxxxxxxxxx>, Greg Kurz <groug@xxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Paul Durrant <paul.durrant@xxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Igor Mammedov <imammedo@xxxxxxxxxx>, John Snow <jsnow@xxxxxxxxxx>, Richard Henderson <rth@xxxxxxxxxxx>, Kevin Wolf <kwolf@xxxxxxxxxx>, Laurent Vivier <laurent@xxxxxxxxx>, Daniel P. Berrangé <berrange@xxxxxxxxxx>, Cornelia Huck <cohuck@xxxxxxxxxx>, qemu-s390x@xxxxxxxxxx, Max Reitz <mreitz@xxxxxxxxxx>, qemu-arm@xxxxxxxxxx, qemu-ppc@xxxxxxxxxx, Aleksandar Markovic <amarkovic@xxxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Andreas Färber <afaerber@xxxxxxx>, Aurelien Jarno <aurelien@xxxxxxxxxxx>, Stefan Berger <stefanb@xxxxxxxxxxxxx>
- Delivery-date: Mon, 25 Mar 2019 15:59:44 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 <armbru@xxxxxxxxxx>
Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
Reviewed-by: Markus Armbruster <armbru@xxxxxxxxxx>
Reviewed-by: Liam Merwick <liam.merwick@xxxxxxxxxx>
Message-id: 20190321170831.6539-3-stefanha@xxxxxxxxxx
Message-Id: <20190321170831.6539-3-stefanha@xxxxxxxxxx>
Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx>
---
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|