trace: avoid SystemTap dtrace(1) warnings on empty files
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: 23c3d569f4
("target/hppa: add TLB trace events")
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Message-id: 20190321170831.6539-3-stefanha@redhat.com
Message-Id: <20190321170831.6539-3-stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fd9858317a
commit
b33b890cd0
@ -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 {')
|
||||
|
Loading…
Reference in New Issue
Block a user