aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/tracetool/format/log_stap.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/tracetool/format/log_stap.py b/scripts/tracetool/format/log_stap.py
index 3e1186ae9c..0b6549d534 100644
--- a/scripts/tracetool/format/log_stap.py
+++ b/scripts/tracetool/format/log_stap.py
@@ -78,7 +78,12 @@ def c_fmt_to_stap(fmt):
elif state == STATE_LITERAL:
bits.append(literal)
- fmt = re.sub("%(\d*)z(x|u|d)", "%\\1\\2", "".join(bits))
+ # All variables in systemtap are 64-bit in size
+ # The "%l" integer size qualifier is thus redundant
+ # and "%ll" is not valid at all. Similarly the size_t
+ # based "%z" size qualifier is not valid. We just
+ # strip all size qualifiers for sanity.
+ fmt = re.sub("%(\d*)(l+|z)(x|u|d)", "%\\1\\3", "".join(bits))
return fmt
def generate(events, backend, group):