linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Vincent Whitchurch <vincent.whitchurch@axis.com>
Cc: <linux-trace-devel@vger.kernel.org>, <kernel@axis.com>
Subject: Re: [PATCH] trace-cmd libtraceevent: Fix bprint '#' parsing
Date: Fri, 13 Nov 2020 09:25:50 -0500	[thread overview]
Message-ID: <20201113092550.349af46e@gandalf.local.home> (raw)
In-Reply-To: <20201113132953.2371-1-vincent.whitchurch@axis.com>

On Fri, 13 Nov 2020 14:29:53 +0100
Vincent Whitchurch <vincent.whitchurch@axis.com> wrote:

> 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

Thanks Vincent!

Note, I'll be adding this to both the trace-cmd tree and the
libtraceevent.git repo (I need to update the website to reflect this).

  git://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git

-- Steve


> 
> 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;


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

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

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=20201113092550.349af46e@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=kernel@axis.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=vincent.whitchurch@axis.com \
    /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).