Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1620343rdb; Mon, 8 Jan 2024 05:23:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGGwHUiqSnjv+kj1Y9yedB0TOTspNRwjKoGzolRsbLGniUUyfpttavHpciRTVMBZGYLo2Eg X-Received: by 2002:a17:903:98d:b0:1d5:36ea:f63e with SMTP id mb13-20020a170903098d00b001d536eaf63emr858649plb.22.1704720220360; Mon, 08 Jan 2024 05:23:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704720220; cv=none; d=google.com; s=arc-20160816; b=e1FmqgutxvlmkvQGSbw40YLAmDrIBk21kGUyUlPcVNYvQQwxxgiWWmKrLp+PxDyhdJ ohDItw9MFD3m5JeDOMRyjLjTlioHHfdToqmDrjtQ6YTTiT1XYWhTyitjH8zpDnPM0VvI kRxQ+M+KPjfZWZb1CCAr2X/ITouGvRKoVrCXMBtY1RMEDALo+h4+1YaBGTNEiMA/U5pS bd54LfAZ3HllGmAokBaKE9WWYon4qcRMjUxElqF74+I8RUPM1wnrDAptywRVssgFkbLw /0MPer/+VTXI8acgOM87aPjloSXhPZqvx7mBtv15uAN7uLc/CWOFCeGtaBa8SRRSucBx ENYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=qHbXasxxzj87vK/lljO740Yb/gQeIlxMhfcXYn9xuX8=; fh=D5/TWD7bHAbEssXha5Rv8uTbCnv9M/RndN6gMOTPHRM=; b=aq9cngJPzIbg4jSLjeNwenqEMb5CfDcr7XF5PDuPonQi8W+94G6W30bGgV3sapm8rc pAMKLn6EMFEKpF4tbDKP1pWsYzskBEiuDFyjvhZcNYg7t0ze2u2oMbCn0Q6Lx5TEpzST aAG6ErrPZ/iYMF2qy8v8uTMKDfk83sqBaDWBjL0uB+WAgG6Q/HTPXXs4nobgyx9Rz80E 7rgAuLkJBmBdFojxFluFasRA2kKMsF24ErA0cfGVBx7jqEUAtI1NZc2QJAHl9ARoFEly QtJq44k/xGrMh6N3DDdmEi/Vh0U+x8PtbcrIWup9CUxnODP51K2iZ8bJun1clKuzJo1/ AhgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19610-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n3-20020a170902968300b001d3ec56c584si5944949plp.569.2024.01.08.05.23.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 05:23:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19610-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-19610-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19610-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D14F283ED2 for ; Mon, 8 Jan 2024 13:23:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F091241752; Mon, 8 Jan 2024 13:23:32 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2FBC41760; Mon, 8 Jan 2024 13:23:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=Huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4T7vpK1Yzbz67vyB; Mon, 8 Jan 2024 21:21:13 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (unknown [7.191.163.240]) by mail.maildlp.com (Postfix) with ESMTPS id 5A1BD1400D9; Mon, 8 Jan 2024 21:23:27 +0800 (CST) Received: from localhost (10.202.227.76) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 8 Jan 2024 13:23:26 +0000 Date: Mon, 8 Jan 2024 13:23:25 +0000 From: Jonathan Cameron To: Ira Weiny CC: Dan Williams , Smita Koralahalli , Shiju Jose , Yazen Ghannam , "Davidlohr Bueso" , Dave Jiang , "Alison Schofield" , Vishal Verma , Ard Biesheuvel , , , Subject: Re: [PATCH v5 4/9] cxl/events: Remove passing a UUID to known event traces Message-ID: <20240108132325.00000e9c@Huawei.com> In-Reply-To: <20231220-cxl-cper-v5-4-1bb8a4ca2c7a@intel.com> References: <20231220-cxl-cper-v5-0-1bb8a4ca2c7a@intel.com> <20231220-cxl-cper-v5-4-1bb8a4ca2c7a@intel.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500002.china.huawei.com (7.191.160.78) To lhrpeml500005.china.huawei.com (7.191.163.240) On Wed, 20 Dec 2023 16:17:31 -0800 Ira Weiny wrote: > The UUID data is redundant in the known event trace types. The addition > of static defines allows the trace macros to create the UUID data inside > the trace thus removing unnecessary code. > > Have well known trace events use static data to set the uuid field based > on the event type. > > Suggested-by: Jonathan Cameron > Signed-off-by: Ira Weiny > > TP_STRUCT__entry( > CXL_EVT_TP_entry > @@ -422,7 +424,8 @@ TRACE_EVENT(cxl_dram, > ), > > TP_fast_assign( > - CXL_EVT_TP_fast_assign(cxlmd, log, uuid, rec->hdr); > + CXL_EVT_TP_fast_assign(cxlmd, log, rec->hdr); > + memcpy(&__entry->hdr_uuid, &CXL_EVENT_DRAM_UUID, sizeof(uuid_t)); Hmm. Why not __entry->hdr_uuid = CXL_EVENT_DRAM_UUID; ? Compiler should be able to squish the stuff in the define down to data as as the UUID generation logic is pretty simple. I've not emulated the cper records for these yet, so not tested that works beyond compiling. J