linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Whitchurch <vincent.whitchurch@axis.com>
To: <rostedt@goodmis.org>
Cc: <linux-trace-devel@vger.kernel.org>, <kernel@axis.com>,
	Vincent Whitchurch <vincent.whitchurch@axis.com>
Subject: [PATCH] trace-cmd libtraceevent: Fix bprint '#' parsing
Date: Fri, 13 Nov 2020 14:29:53 +0100	[thread overview]
Message-ID: <20201113132953.2371-1-vincent.whitchurch@axis.com> (raw)

Fix handling of '#' in bprint format specifiers.

For example, with this:

 trace_printk("jiffies %lu pending %#x\n", jiffies, pending);

Before:

  bprint: __do_softirq: jiffies 4294919108 pending x
  ...
  bprint: [FAILED TO PARSE] ip=... fmt=... buf=ARRAY[]

After:

  bprint: __do_softirq: jiffies 4294919108 pending 0x4
  ...
  bprint: __do_softirq: jiffies 4294919109 pending 0x4

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
---
 lib/traceevent/event-parse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/traceevent/event-parse.c b/lib/traceevent/event-parse.c
index 06fa3dd..a62d2f7 100644
--- a/lib/traceevent/event-parse.c
+++ b/lib/traceevent/event-parse.c
@@ -4456,6 +4456,8 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s
 				goto process_again;
 			case '.':
 				goto process_again;
+			case '#':
+				goto process_again;
 			case 'z':
 			case 'Z':
 				ls = 1;
-- 
2.28.0


             reply	other threads:[~2020-11-13 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 13:29 Vincent Whitchurch [this message]
2020-11-13 14:25 ` [PATCH] trace-cmd libtraceevent: Fix bprint '#' parsing Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201113132953.2371-1-vincent.whitchurch@axis.com \
    --to=vincent.whitchurch@axis.com \
    --cc=kernel@axis.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).