aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-02-19 16:44:12 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-19 16:44:12 +0000
commitafd3397a8149d8b645004e459bf2002d78f5e267 (patch)
tree5e957f9f3793ab5c3ab68e5da7044030aef730fc /scripts
parent299a2e6fac397be9b82c66583d53d1daaa3ffe6c (diff)
parent7f1d87ab0fd94cef5086e2879716958303281054 (diff)
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
# gpg: Signature made Mon 19 Feb 2018 16:19:46 GMT # gpg: using RSA key 9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: trace: avoid SystemTap "char const" warnings tracetool: For ust trace bool type as ctf_integer tracetool: Update argument format regex to non-greedy star Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/tracetool/__init__.py5
-rw-r--r--scripts/tracetool/format/ust_events_h.py3
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py
index 1a9733da9a..3646c2b9fc 100644
--- a/scripts/tracetool/__init__.py
+++ b/scripts/tracetool/__init__.py
@@ -261,8 +261,9 @@ class Event(object):
self.name,
self.args,
fmt)
-
- _FMT = re.compile("(%[\d\.]*\w+|%.*PRI\S+)")
+ # Star matching on PRI is dangerous as one might have multiple
+ # arguments with that format, hence the non-greedy version of it.
+ _FMT = re.compile("(%[\d\.]*\w+|%.*?PRI\S+)")
def formats(self):
"""List conversion specifiers in the argument print format string."""
diff --git a/scripts/tracetool/format/ust_events_h.py b/scripts/tracetool/format/ust_events_h.py
index 514294c2cc..4e95e9b3f9 100644
--- a/scripts/tracetool/format/ust_events_h.py
+++ b/scripts/tracetool/format/ust_events_h.py
@@ -79,7 +79,8 @@ def generate(events, backend, group):
out(' ctf_integer_hex('+ t + ', ' + n + ', ' + n + ')')
elif ("ptr" in t) or ("*" in t):
out(' ctf_integer_hex('+ t + ', ' + n + ', ' + n + ')')
- elif ('int' in t) or ('long' in t) or ('unsigned' in t) or ('size_t' in t):
+ elif ('int' in t) or ('long' in t) or ('unsigned' in t) \
+ or ('size_t' in t) or ('bool' in t):
out(' ctf_integer(' + t + ', ' + n + ', ' + n + ')')
elif ('double' in t) or ('float' in t):
out(' ctf_float(' + t + ', ' + n + ', ' + n + ')')