From: Steven Rostedt <rostedt@goodmis.org>
To: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
Borislav Petkov <bp@alien8.de>,
"m.chehab@samsung.com" <m.chehab@samsung.com>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/7 v6] trace, RAS: Add eMCA trace event interface
Date: Fri, 6 Jun 2014 11:21:27 -0400 [thread overview]
Message-ID: <20140606112127.37d2cf95@gandalf.local.home> (raw)
In-Reply-To: <20140606065141.GA10998@gchen.bj.intel.com>
On Fri, 6 Jun 2014 02:51:41 -0400
"Chen, Gong" <gong.chen@linux.intel.com> wrote:
> +/*
> + * MCE Extended Error Log trace event
> + *
> + * These events are generated when hardware detects a corrected or
> + * uncorrected event.
> + */
> +
> +/* memory trace event */
> +
> +TRACE_EVENT(extlog_mem_event,
> + TP_PROTO(struct cper_sec_mem_err *mem,
> + u32 err_seq,
> + const uuid_le *fru_id,
> + const char *fru_text,
> + u8 sev),
> +
> + TP_ARGS(mem, err_seq, fru_id, fru_text, sev),
> +
> + TP_STRUCT__entry(
> + __field(u32, err_seq)
> + __field(u8, etype)
> + __field(u8, sev)
> + __field(u64, pa)
> + __field(u8, pa_mask_lsb)
> + __dynamic_array(char, fru, 48)
> + __dynamic_array(u8, data, sizeof(struct cper_mem_err_compact))
For constant size arrays, don't use __dynamic_array() just use
__array().
Although I'd get rid of the fru and replace that with:
__field(unsigned long, fru_id)
__string(fru_text, fru_text)
> + ),
> +
> + TP_fast_assign(
> + __entry->err_seq = err_seq;
> + if (mem->validation_bits & CPER_MEM_VALID_ERROR_TYPE)
> + __entry->etype = mem->error_type;
> + else
> + __entry->etype = ~0;
> + __entry->sev = sev;
> + if (mem->validation_bits & CPER_MEM_VALID_PA)
> + __entry->pa = mem->physical_addr;
> + else
> + __entry->pa = ~0ull;
> +
> + if (mem->validation_bits & CPER_MEM_VALID_PA_MASK)
> + __entry->pa_mask_lsb =
> + (u8)__ffs64(mem->physical_addr_mask);
> + else
> + __entry->pa_mask_lsb = ~0;
> + snprintf(__get_dynamic_array(fru), 47,
> + "FRU: %pUl %.20s", fru_id, fru_text);
Although, why not just save the id and text straight? Why format it
here?
__entry->fru_id = fru_id;
__assign_str(fru_text, fru_text);
> + cper_mem_err_pack(mem, __get_dynamic_array(data));
> + ),
> +
> + TP_printk("{%d} %s error: %s physical addr: %016llx (mask lsb: %x) %s%s",
TP_printk("{%d} %s error: %s physical addr: %016llx (mask lsb: %x) %s FRU: %pUl %.20s",
> + __entry->err_seq,
> + cper_severity_str(__entry->sev),
> + cper_mem_err_type_str(__entry->etype),
> + __entry->pa,
> + __entry->pa_mask_lsb,
> + cper_mem_err_unpack(p, __get_dynamic_array(data)),
> + __get_str(fru))
__entry->fru_id,
__get_str(fru_text))
-- Steve
> +);
>
> /*
> * Hardware Events Report
next prev parent reply other threads:[~2014-06-06 15:21 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 8:30 New eMCA trace event interface Chen, Gong
2014-05-15 8:30 ` [PATCH 1/7 v5] trace, RAS: Add basic RAS trace event Chen, Gong
2014-05-15 8:30 ` [PATCH 2/7 v3] trace, AER: Move trace into unified interface Chen, Gong
2014-05-21 10:19 ` Borislav Petkov
2014-05-22 0:03 ` Chen, Gong
2014-05-22 10:41 ` Borislav Petkov
2014-05-15 8:30 ` [PATCH 3/7 v4] CPER: Adjust code flow of some functions Chen, Gong
2014-05-21 11:05 ` Borislav Petkov
2014-05-21 23:51 ` Chen, Gong
2014-05-22 10:52 ` Borislav Petkov
2014-05-23 1:49 ` Chen, Gong
2014-05-23 9:37 ` Borislav Petkov
2014-05-23 10:11 ` Borislav Petkov
2014-05-26 1:59 ` Chen, Gong
2014-05-26 10:21 ` Borislav Petkov
2014-05-26 10:42 ` Chen, Gong
2014-05-26 2:07 ` Chen, Gong
2014-05-26 10:23 ` Borislav Petkov
2014-05-15 8:30 ` [PATCH 4/7 v2] RAS, debugfs: Add debugfs interface for RAS subsystem Chen, Gong
2014-05-15 8:30 ` [PATCH 5/7 v5] trace, RAS: Add eMCA trace event interface Chen, Gong
2014-05-15 8:30 ` [PATCH 6/7 v3] trace, eMCA: Add a knob to adjust where to save event log Chen, Gong
2014-05-21 11:06 ` Borislav Petkov
2014-05-21 23:46 ` Chen, Gong
2014-05-22 11:11 ` Borislav Petkov
2014-05-23 1:40 ` Chen, Gong
2014-05-28 3:27 ` [PATCH 6/7 v4] " Chen, Gong
2014-05-15 8:30 ` [PATCH 7/7] RAS, extlog: Adjust init flow Chen, Gong
2014-05-28 3:32 ` new trace output format Chen, Gong
2014-05-28 3:32 ` [PATCH 5/7 v6] trace, RAS: Add eMCA trace event interface Chen, Gong
2014-05-28 15:28 ` Steven Rostedt
2014-05-28 16:34 ` Borislav Petkov
2014-05-28 16:56 ` Steven Rostedt
2014-05-29 7:43 ` Chen, Gong
2014-05-29 10:35 ` Borislav Petkov
2014-05-29 13:12 ` Steven Rostedt
2014-05-30 2:56 ` Chen, Gong
2014-05-30 9:22 ` Chen, Gong
2014-05-30 10:07 ` Borislav Petkov
2014-05-30 21:16 ` Tony Luck
2014-05-30 21:26 ` Borislav Petkov
2014-05-30 23:03 ` Luck, Tony
2014-05-31 1:07 ` Steven Rostedt
2014-06-02 16:22 ` Luck, Tony
2014-06-02 16:57 ` Steven Rostedt
2014-06-03 8:36 ` Chen, Gong
2014-06-03 14:35 ` Steven Rostedt
2014-06-04 18:32 ` Steven Rostedt
2014-06-06 6:51 ` Chen, Gong
2014-06-06 15:21 ` Steven Rostedt [this message]
2014-06-09 1:10 ` Chen, Gong
2014-06-09 10:22 ` Borislav Petkov
2014-05-28 16:23 ` new trace output format Borislav Petkov
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=20140606112127.37d2cf95@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bp@alien8.de \
--cc=gong.chen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.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;
as well as URLs for NNTP newsgroup(s).