diff options
author | Peter Maydell | 2020-09-10 12:45:13 +0200 |
---|---|---|
committer | Peter Maydell | 2020-09-10 12:45:13 +0200 |
commit | 922781b7b37de22a06269f25c9c1ae66293c5991 (patch) | |
tree | bf94f80cb7aa2336878e4c1b48a438f0ac11ff33 /scripts/tracetool/format | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/sirius/ipxe-20200908-pull-r... (diff) | |
parent | trace-events: Fix attribution of trace points to source (diff) | |
download | qemu-922781b7b37de22a06269f25c9c1ae66293c5991.tar.gz qemu-922781b7b37de22a06269f25c9c1ae66293c5991.tar.xz qemu-922781b7b37de22a06269f25c9c1ae66293c5991.zip |
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Pull request
v2:
* Rebased after meson and resolved conflict in "softmmu: Add missing trace-events file"
* Dropped "meson: Don't make object files for dtrace on macOS" (already merged via Paolo's tree)
# gpg: Signature made Thu 10 Sep 2020 09:09:47 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/tracing-pull-request:
trace-events: Fix attribution of trace points to source
trace-events: Delete unused trace points
scripts/cleanup-trace-events: Emit files in alphabetical order
scripts/cleanup-trace-events: Fix for vcpu property
net/colo: Match is-enabled probe to tracepoint
scripts/tracetool: Use void pointer for vcpu
scripts/tracetool: Fix dtrace generation for macOS
softmmu: Add missing trace-events file
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts/tracetool/format')
-rw-r--r-- | scripts/tracetool/format/d.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/tracetool/format/d.py b/scripts/tracetool/format/d.py index 0afb5f3f47..353722f89c 100644 --- a/scripts/tracetool/format/d.py +++ b/scripts/tracetool/format/d.py @@ -13,6 +13,7 @@ __email__ = "stefanha@redhat.com" from tracetool import out +from sys import platform # Reserved keywords from @@ -34,7 +35,8 @@ def generate(events, backend, group): # SystemTap's dtrace(1) warns about empty "provider qemu {}" but is happy # with an empty file. Avoid the warning. - if not events: + # But dtrace on macOS can't deal with empty files. + if not events and platform != "darwin": return out('/* This file is autogenerated by tracetool, do not edit. */' @@ -44,6 +46,17 @@ def generate(events, backend, group): for e in events: args = [] for type_, name in e.args: + if platform == "darwin": + # macOS dtrace accepts only C99 _Bool + if type_ == 'bool': + type_ = '_Bool' + if type_ == 'bool *': + type_ = '_Bool *' + # It converts int8_t * in probe points to char * in header + # files and introduces [-Wpointer-sign] warning. + # Avoid it by changing probe type to signed char * beforehand. + if type_ == 'int8_t *': + type_ = 'signed char *' if name in RESERVED_WORDS: name += '_' args.append(type_ + ' ' + name) |