From: Ira Weiny <ira.weiny@intel.com>
To: Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Dave Jiang <dave.jiang@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-cxl@vger.kernel.org, Ira Weiny <ira.weiny@intel.com>
Subject: [PATCH RFC v2 1/3] cxl/trace: Remove uuid from event trace known events
Date: Thu, 26 Oct 2023 11:21:38 -0700 [thread overview]
Message-ID: <20230601-cxl-cper-v2-1-314d9c36ab02@intel.com> (raw)
In-Reply-To: <20230601-cxl-cper-v2-0-314d9c36ab02@intel.com>
The uuid printed in the well known events is redundant. The uuid
defines what the event was.
Remove the uuid from the known events and only report it in the generic
event as it remains informative there.
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
drivers/cxl/core/trace.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
index a0b5819bc70b..79ed03637604 100644
--- a/drivers/cxl/core/trace.h
+++ b/drivers/cxl/core/trace.h
@@ -189,7 +189,6 @@ TRACE_EVENT(cxl_overflow,
__string(memdev, dev_name(&cxlmd->dev)) \
__string(host, dev_name(cxlmd->dev.parent)) \
__field(int, log) \
- __field_struct(uuid_t, hdr_uuid) \
__field(u64, serial) \
__field(u32, hdr_flags) \
__field(u16, hdr_handle) \
@@ -203,7 +202,6 @@ TRACE_EVENT(cxl_overflow,
__assign_str(host, dev_name((cxlmd)->dev.parent)); \
__entry->log = (l); \
__entry->serial = (cxlmd)->cxlds->serial; \
- memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
__entry->hdr_length = (hdr).length; \
__entry->hdr_flags = get_unaligned_le24((hdr).flags); \
__entry->hdr_handle = le16_to_cpu((hdr).handle); \
@@ -212,12 +210,12 @@ TRACE_EVENT(cxl_overflow,
__entry->hdr_maint_op_class = (hdr).maint_op_class
#define CXL_EVT_TP_printk(fmt, ...) \
- TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu uuid=%pUb " \
+ TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu " \
"len=%d flags='%s' handle=%x related_handle=%x " \
"maint_op_class=%u : " fmt, \
__get_str(memdev), __get_str(host), __entry->serial, \
cxl_event_log_type_str(__entry->log), \
- __entry->hdr_timestamp, &__entry->hdr_uuid, __entry->hdr_length,\
+ __entry->hdr_timestamp, __entry->hdr_length, \
show_hdr_flags(__entry->hdr_flags), __entry->hdr_handle, \
__entry->hdr_related_handle, __entry->hdr_maint_op_class, \
##__VA_ARGS__)
@@ -231,15 +229,17 @@ TRACE_EVENT(cxl_generic_event,
TP_STRUCT__entry(
CXL_EVT_TP_entry
+ __field_struct(uuid_t, hdr_uuid)
__array(u8, data, CXL_EVENT_RECORD_DATA_LENGTH)
),
TP_fast_assign(
CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr);
+ memcpy(&__entry->hdr_uuid, &rec->hdr.id, sizeof(uuid_t));
memcpy(__entry->data, &rec->data, CXL_EVENT_RECORD_DATA_LENGTH);
),
- CXL_EVT_TP_printk("%s",
+ CXL_EVT_TP_printk("uuid=%pUb %s", &__entry->hdr_uuid,
__print_hex(__entry->data, CXL_EVENT_RECORD_DATA_LENGTH))
);
--
2.41.0
next prev parent reply other threads:[~2023-10-26 18:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 18:21 [PATCH RFC v2 0/3] efi/cxl-cper: Report CPER CXL component events through trace events Ira Weiny
2023-10-26 18:21 ` Ira Weiny [this message]
2023-10-26 20:55 ` [PATCH RFC v2 1/3] cxl/trace: Remove uuid from event trace known events Dan Williams
2023-10-30 16:58 ` Davidlohr Bueso
2023-10-26 18:21 ` [PATCH RFC v2 2/3] firmware/efi: Process CXL Component Events Ira Weiny
2023-10-26 21:02 ` Dan Williams
2023-10-31 16:46 ` Ira Weiny
2023-10-26 18:21 ` [PATCH RFC v2 3/3] cxl/memdev: Register for and process CPER events Ira Weiny
2023-10-26 22:56 ` Dan Williams
2023-10-31 17:13 ` Ira Weiny
2023-11-01 17:35 ` Jonathan Cameron
2023-10-30 21:03 ` Smita Koralahalli
2023-10-30 22:02 ` Dan Williams
2023-11-01 3:35 ` Ira Weiny
2023-11-01 21:59 ` Ira Weiny
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=20230601-cxl-cper-v2-1-314d9c36ab02@intel.com \
--to=ira.weiny@intel.com \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=alison.schofield@intel.com \
--cc=ardb@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vishal.l.verma@intel.com \
--cc=yazen.ghannam@amd.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