Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1882420rwi; Sat, 15 Oct 2022 04:47:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LHv0iCbTYIS+DnMu9Njz2DOtDgkyAkwkEFz/T41E+b1lr+Kc+kD4yNVMNxA21i5BFn1Zn X-Received: by 2002:a17:902:d48f:b0:180:c712:c664 with SMTP id c15-20020a170902d48f00b00180c712c664mr2511565plg.132.1665834465529; Sat, 15 Oct 2022 04:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665834465; cv=none; d=google.com; s=arc-20160816; b=lQOnuHg+UP1cK8uAw7PKrTHGDkZ14r+xzwWXmmfjhU/Y4txVDM3VtdlCdhcT37FnPm Cxh1eZ+HZZMzqq76KaADHTvJ4RZrJtl1pT6ND7wXtSGJHa9YVeinRPI+043yp1A79FXB VPMXze5AHx5fkzUeg3fiQF9inh/PJQrtrmoDtBFSCuIjneice7OBOU4nVqo98EEDhyjn BsCD5GDoNin2IBU93+JAAPboL2bUy9Pj8cbegRynEfsOT8VWcMiEx614OqRYZEOyUL3R h/Zlqo9gxNy3+2CyjjVL0D7cGBpoT0rlS8jFOH0JHACoa8icElMD25QD+EhMg+mwuOP/ HGeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Lx6QjylBpnx20eZmSTU8+3QBqmir2ycpF8WFHWfnvII=; b=zLXIH1sqDeXoF2roIqTbmrnOmupZZYq9HjkPdU+/RH1i1wYqMHtoZapaCCIyV1Cz5E PYxO5AdX62BxkFvFEKhZm7x+oWMQ1bjdGetDN3CZW/fIVAOKsKm9gvakxIJLwNk7XUYH QMSpRkVkSycfrStqt4dx8mMilj9HHW7zI6C8xteF5nz1VsyqBlGp2HSPO4Bs3vooP8+p vZ5beQz+6u3zYPfMhpTZcAxMydjNcmK/ohBwUa9vcpqf6vdB2kmuoamjORAIFYMMGyEt oIpRHSaxT2q0ptS81VrC4a+h9xv+WPEt1/C4gqyxH28xAsVTCQGpR/MP+JoHwmeoR1Rv tXfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o37-20020a634e65000000b0043bd8452080si5469794pgl.313.2022.10.15.04.47.32; Sat, 15 Oct 2022 04:47:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229633AbiJOL2t (ORCPT + 99 others); Sat, 15 Oct 2022 07:28:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229613AbiJOL2r (ORCPT ); Sat, 15 Oct 2022 07:28:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84731543D4; Sat, 15 Oct 2022 04:28:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1EF8160C95; Sat, 15 Oct 2022 11:28:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A872C433D6; Sat, 15 Oct 2022 11:28:43 +0000 (UTC) Date: Sat, 15 Oct 2022 07:28:40 -0400 From: Steven Rostedt To: ira.weiny@intel.com Cc: Dan Williams , Alison Schofield , Vishal Verma , Ben Widawsky , Jonathan Cameron , Davidlohr Bueso , linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org Subject: Re: [RFC V2 PATCH 02/11] cxl/mem: Implement Get Event Records command Message-ID: <20221015072840.5f31517b@rorschach.local.home> In-Reply-To: <20221010224131.1866246-3-ira.weiny@intel.com> References: <20221010224131.1866246-1-ira.weiny@intel.com> <20221010224131.1866246-3-ira.weiny@intel.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Oct 2022 15:41:22 -0700 ira.weiny@intel.com wrote: > new file mode 100644 > index 000000000000..318ba5fe046e > --- /dev/null > +++ b/include/trace/events/cxl.h > @@ -0,0 +1,130 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#undef TRACE_SYSTEM > +#define TRACE_SYSTEM cxl > + > +#if !defined(_CXL_TRACE_EVENTS_H) || defined(TRACE_HEADER_MULTI_READ) > +#define _CXL_TRACE_EVENTS_H > + > +#include > +#include > + > +TRACE_EVENT(overflow, Please do not use generic names for grouped events. As most tooling can use the name and not associate it with the group, it makes it ambiguous for what event it wants to enable. That is, call it "cxl_overflow" and not "overflow". > + > + TP_PROTO(const char *dev_name, enum cxl_event_log_type log, > + struct cxl_get_event_payload *payload), > + > + TP_ARGS(dev_name, log, payload), > + > + TP_STRUCT__entry( > + __string(dev_name, dev_name) > + __field(int, log) > + __field(u64, first) > + __field(u64, last) > + __field(u16, count) > + ), > + > + TP_fast_assign( > + __assign_str(dev_name, dev_name); > + __entry->log = log; > + __entry->count = le16_to_cpu(payload->overflow_err_count); > + __entry->first = le64_to_cpu(payload->first_overflow_timestamp); > + __entry->last = le64_to_cpu(payload->last_overflow_timestamp); > + ), > + > + TP_printk("%s: EVENT LOG OVERFLOW log=%s : %u records from %llu to %llu", > + __get_str(dev_name), cxl_event_log_type_str(__entry->log), > + __entry->count, __entry->first, __entry->last) > + > +); > + > +TRACE_EVENT(generic_event, Same here. It's a "cxl_generic_event" not a "generic_event" that will clash with any other subsystem that would (but shouldn't) use the same name. -- Steve > + > + TP_PROTO(const char *dev_name, enum cxl_event_log_type log, > + struct cxl_event_record_raw *rec), > + > + TP_ARGS(dev_name, log, rec), > + > + TP_STRUCT__entry( > + CXL_EVT_TP_entry > + __array(u8, data, CXL_EVENT_RECORD_DATA_LENGTH) > + ), > + > + TP_fast_assign( > + CXL_EVT_TP_fast_assign(dev_name, log, rec->hdr); > + memcpy(__entry->data, &rec->data, CXL_EVENT_RECORD_DATA_LENGTH); > + ), > + > + CXL_EVT_TP_printk("%s", > + __print_hex(__entry->data, CXL_EVENT_RECORD_DATA_LENGTH)) > +); > + > +#endif /* _CXL_TRACE_EVENTS_H */ >