The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Ingo Molnar <mingo@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: don't macro-expand arguments before stringification in TP_printk
Date: Mon, 22 Feb 2016 22:23:08 -0500	[thread overview]
Message-ID: <20160222222308.12bdfeb3@grimm.local.home> (raw)
In-Reply-To: <87io3z6xur.fsf@rasmusvillemoes.dk>

On Wed, 16 Dec 2015 01:28:12 +0100
Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:

> Bah, just found 0462b5664b (ftrace: Output REC->var instead of
> __entry->var for trace format). There's some magic here I don't
> understand, but I'm wondering if '__entry' wouldn't do just as well as
> 'REC' for the tools that try to parse these strings.
> 
>

Sorry for the late reply, but I just found this in my INBOX :-)

Several tools already exist that use REC to parse. It would be ABI
breakage to suddenly convert it to __entry.

Not to mention, even in your example of:

  ((unsigned int) ((REC->dev) >> 20)), ((unsigned int) ((REC->dev) & ((1U << 20) - 1)))

which came from

  MAJOR(__entry->dev), MINOR(__entry->dev),


The parsing tools don't know how to parse MAJOR or MINOR but they do
know how to do the above macro expansions.

Just an FYI,

-- Steve

      reply	other threads:[~2016-02-23  3:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 23:59 [PATCH] tracing: don't macro-expand arguments before stringification in TP_printk Rasmus Villemoes
2015-12-16  0:28 ` Rasmus Villemoes
2016-02-23  3:23   ` 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=20160222222308.12bdfeb3@grimm.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=mingo@redhat.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