mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Borislav Petkov <bp@amd64.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Ingo Molnar <mingo@elte.hu>, Tony Luck <tony.luck@intel.com>,
	edac-devel <linux-edac@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: RAS trace event proto
Date: Mon, 20 Feb 2012 20:14:28 -0500	[thread overview]
Message-ID: <1329786868.25686.50.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20120220145920.GB5728@aftab>

On Mon, 2012-02-20 at 15:59 +0100, Borislav Petkov wrote:

> * I'd like to have conditional printk-ing in trace_mce_record depending
> on the TP args, Steve probably knows what can be done:

/me is confused :-)

> 
> @Steven:
> 
> I'd like to do the following:
> 
> 	TP_printk("%s, ARG1: %d, ARG2: %c ...", str1, arg1, arg2)
> 
> and have it print only the first arg, i.e. the string and drop the rest
> of the args while still doing the TP_fast_assign into the ring buffer
> and carrying the stuff to its consumers. Background is that I want to
> dump the decoded string of a hardware error, if it is decoded, but carry
> the MCE info to userspace and only dump the fields of the MCE if I
> haven't managed to decode it, i.e. str1 == "".
> 
> So, my question is, can I do something like:
> 
> 	TP_printk("%s, ARG1: %d, ARG2: %c ...", __print_conditional(str1, arg1, arg2))

You want to affect the output of ftrace?

perf and even trace-cmd do the parsing later and can be overridden.
Well, perf can be when we finally get it to use the updated trace-cmd
parser.

-- Steve

> 
> where __print_conditional is a vararg macro which calls a
> ftrace_print_cond() which prints only str1 if strlen(str1) > 0 and
> otherwise calls a vsnprintf() variant to deal with the va_args?
> 



  reply	other threads:[~2012-02-21  1:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 14:59 Borislav Petkov
2012-02-21  1:14 ` Steven Rostedt [this message]
2012-02-21 10:15   ` Borislav Petkov
2012-02-21 12:24 ` Mauro Carvalho Chehab
2012-02-21 14:12   ` Borislav Petkov
2012-02-21 14:48     ` Steven Rostedt
2012-02-21 14:59       ` Borislav Petkov
2012-02-21 16:18         ` Mauro Carvalho Chehab
2012-02-22  0:58         ` Luck, Tony
2012-02-22 10:43           ` Borislav Petkov
2012-02-22 12:02             ` Mauro Carvalho Chehab
2012-02-22 12:25               ` Borislav Petkov
2012-02-22 13:32                 ` Mauro Carvalho Chehab
2012-02-22 14:05                   ` Borislav Petkov
2012-02-22 14:25                     ` Mauro Carvalho Chehab
2012-02-22 14:26                   ` Steven Rostedt
2012-02-22 15:59             ` Borislav Petkov
2012-02-27 15:54               ` Borislav Petkov
2012-02-21 17:28     ` Mauro Carvalho Chehab

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=1329786868.25686.50.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=bp@amd64.org \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=mingo@elte.hu \
    --cc=tony.luck@intel.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

all inboxes | Powered by JetHome®