From: Steven Rostedt <rostedt@goodmis.org>
To: Borislav Petkov <bp@amd64.org>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
"Luck, Tony" <tony.luck@intel.com>,
Linux Edac Mailing List <linux-edac@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Doug Thompson <norsk5@yahoo.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH v22] edac, ras/hw_event.h: use events to handle hw issues
Date: Wed, 16 May 2012 08:48:12 -0400 [thread overview]
Message-ID: <1337172492.6724.36.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20120515163855.GE27806@aftab.osrc.amd.com>
On Tue, 2012-05-15 at 18:38 +0200, Borislav Petkov wrote:
> On Tue, May 15, 2012 at 01:05:48PM -0300, Mauro Carvalho Chehab wrote:
> > > Here's what an error looks like on my system here:
> > >
> > > mcegen.py-2868 [007] .N.. 178.261607: mc_event: Corrected error:amd64_edac on memory stick "unknown memory" (mc:0 csrow:3 channel:1 page:0x5bac7 offset:0x388 grain:0 syndrome:0x34ed )
> > >
> > > There's still this trailing " " at the end of the error line which
> > > shouldn't be there and also two spaces between "channel" and "page".
> >
> > If you take a look at the trace printk:
> >
> > + TP_printk("%s error:%s on memory stick \"%s\" (mc:%d %s %s %s)",
> > + (__entry->err_type == HW_EVENT_ERR_CORRECTED) ? "Corrected" :
> > + ((__entry->err_type == HW_EVENT_ERR_FATAL) ?
> > +
> > + __get_str(msg),
> > + __get_str(label),
> > + __entry->mc_index,
> > + __get_str(location),
> > + __get_str(detail),
> > + __get_str(driver_detail))
> >
> > There are not extra spaces there. The first extra space is probably because
> > there is an extra space at the label string. This should be easy to fix.
> >
> > The other extra space at the end is because amd64 currently doesn't provide
> > driver_detail information.
>
> Remind me again why do we need two strings: detail and driver_detail?
>
> Because they could very well be lumped together with a single "%s"
> format - "(mc:%d %s)" - and be printed.
>
> And detail will always contain something which is not the empty string,
> so problem solved.
Here's another trick if you want to get rid of the space and keep both
fields:
TP_printk("%s error:%s on memory stick \"%s\" (mc:%d %s %s%s%s)",
(__entry->err_type == HW_EVENT_ERR_CORRECTED) ? "Corrected" :
((__entry->err_type == HW_EVENT_ERR_FATAL) ?
"Fatal" : "Uncorrected"),
__get_str(msg),
__get_str(label),
__entry->mc_index,
__get_str(location),
__get_str(detail),
strlen(__get_str(detail)) &&
strlen(__get_str(driver_detail) ? " ": "",
__get_str(driver_detail))
-- Steve
next prev parent reply other threads:[~2012-05-16 12:48 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 19:56 Mauro Carvalho Chehab
2012-05-10 20:40 ` Borislav Petkov
2012-05-10 20:55 ` Mauro Carvalho Chehab
2012-05-10 22:46 ` Steven Rostedt
2012-05-10 23:16 ` Mauro Carvalho Chehab
2012-05-10 21:00 ` [PATCHv23] RAS: " Mauro Carvalho Chehab
2012-05-11 10:04 ` Borislav Petkov
2012-05-11 14:54 ` [PATCH v.23-2] RAS: use tracepoint " Mauro Carvalho Chehab
2012-05-11 17:02 ` Luck, Tony
2012-05-11 18:53 ` Mauro Carvalho Chehab
2012-05-11 20:07 ` Tony Luck
2012-05-11 17:06 ` Borislav Petkov
2012-05-11 17:10 ` Mauro Carvalho Chehab
2012-05-11 22:31 ` Borislav Petkov
2012-05-11 22:35 ` Luck, Tony
2012-05-12 14:13 ` [PATCH v24] RAS: Add a tracepoint for reporting memory controller events Mauro Carvalho Chehab
2012-05-10 21:10 ` [PATCH v22] edac, ras/hw_event.h: use events to handle hw issues Luck, Tony
2012-05-10 22:07 ` Mauro Carvalho Chehab
2012-05-10 22:37 ` Luck, Tony
2012-05-11 1:48 ` Mauro Carvalho Chehab
2012-05-11 10:25 ` Borislav Petkov
2012-05-11 12:37 ` Mauro Carvalho Chehab
2012-05-11 17:24 ` Borislav Petkov
2012-05-11 18:38 ` Mauro Carvalho Chehab
2012-05-14 13:34 ` Borislav Petkov
2012-05-14 14:27 ` Mauro Carvalho Chehab
2012-05-15 15:09 ` Borislav Petkov
2012-05-15 16:05 ` Mauro Carvalho Chehab
2012-05-15 16:38 ` Borislav Petkov
2012-05-16 11:22 ` Mauro Carvalho Chehab
2012-05-16 13:16 ` Borislav Petkov
2012-05-16 13:27 ` Steven Rostedt
2012-05-16 13:32 ` Borislav Petkov
2012-05-16 13:47 ` Steven Rostedt
2012-05-16 15:16 ` Mauro Carvalho Chehab
2012-05-16 15:47 ` Borislav Petkov
2012-05-16 16:52 ` Mauro Carvalho Chehab
2012-05-16 19:59 ` Borislav Petkov
2012-05-16 20:27 ` Luck, Tony
2012-05-16 21:05 ` Borislav Petkov
2012-05-16 12:48 ` Steven Rostedt [this message]
2012-05-16 15:24 ` Mauro Carvalho Chehab
2012-05-16 17:05 ` 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=1337172492.6724.36.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=bp@amd64.org \
--cc=fweisbec@gmail.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mingo@redhat.com \
--cc=norsk5@yahoo.com \
--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®