Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1868968rwi; Sat, 15 Oct 2022 04:33:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vc7IKVk8bVfc7XdF1y0uKPmSDz+NdUkwfqpb/eaJkqKDu5DduknoLtYYKwOgluhU04JMZ X-Received: by 2002:a05:6402:254d:b0:45d:3ed3:8aa9 with SMTP id l13-20020a056402254d00b0045d3ed38aa9mr1890334edb.157.1665833598835; Sat, 15 Oct 2022 04:33:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665833598; cv=none; d=google.com; s=arc-20160816; b=JBu6Hgq5NRcE1v9ney8kPiiBEUh3w52nviKJDQCAi2MBOvkobgomLrQ9PK1X7X6Juo dccHrX8e38UqMzeToUlayzQLgALVbwDiCH4ZPP3JH4NI4S+w643h7RHtVLuxoUnMxkmU +qqxr+tO9FATHMJColf0W+CwXBOHVkD3AGuZhzHRMm9nS3vm2zvtA5HwrD4ZQvjSE69t YEj/Z73f1qZCmRstQJYibKnadcVd1/J/PXlA61u0TiTRFfbPIGZ21pc08YfpB9EPjgxf ma1F4woyQjg5EOGWM1DegBs74M6i7A1/KVK2gvNK07Gf680lorZrvvjZxbYmJRLbr/NY hmfw== 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=4PTbhl1pULtksce9JN/YKt+18l74HzCDj5v32Qvfh18=; b=oLZ7K/6JDBeUMLhn10HAEgebtopRguEYNs+u+IhvgEGCFgez3gWaPW/2BMSdUzbFTz zApKbHdEp8aGVvbgg0MtJSjehRjydIxJ6gMcQAswZntbEFsFkBUPqJAovXZr/XYFpkeU x3fSn0tnm/eUGUvUwnXlp8d/PEEUYoKs9UX97LGdiC1VgEC8OcB7h/imy+HEohhtOmZk 1ZUSTPzf7N4lCNtgP/aHLmdyOg99kViBWYmPZtfysqKVAAujhwbdb5Q7RzLV5/BAWQVL Ds1DnWtYhoiZNEWczZTTmJimIQ8vGhSr05NFe4/HxHq3PpErmpOaL+wv3G9r93Vqs70w MgBA== 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 hg5-20020a1709072cc500b00777581091d9si4506252ejc.634.2022.10.15.04.32.53; Sat, 15 Oct 2022 04:33:18 -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 S229666AbiJOLar (ORCPT + 99 others); Sat, 15 Oct 2022 07:30:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229537AbiJOLaq (ORCPT ); Sat, 15 Oct 2022 07:30:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A20554CB0; Sat, 15 Oct 2022 04:30:45 -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 ams.source.kernel.org (Postfix) with ESMTPS id D3B77B80916; Sat, 15 Oct 2022 11:30:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65B1FC433D6; Sat, 15 Oct 2022 11:30:40 +0000 (UTC) Date: Sat, 15 Oct 2022 07:30:36 -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 05/11] cxl/mem: Trace General Media Event Record Message-ID: <20221015073036.529f7650@rorschach.local.home> In-Reply-To: <20221010224131.1866246-6-ira.weiny@intel.com> References: <20221010224131.1866246-1-ira.weiny@intel.com> <20221010224131.1866246-6-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:25 -0700 ira.weiny@intel.com wrote: > +static void cxl_trace_event_record(const char *dev_name, > + enum cxl_event_log_type type, > + struct cxl_get_event_payload *payload) > +{ > + uuid_t *id = &payload->record.hdr.id; > + Perhaps you want to add here: if (!trace_cxl_general_media_enabled() && !trace_clx_generic_event_enabled()) return; This way the below logic is only executed if either event is enabled. The above uses static_branches, so if the architecture supports them, they are not compare and branch, but jumps and/or nops. -- Steve > + if (uuid_equal(id, &gen_media_event_uuid)) { > + struct cxl_event_gen_media *rec = > + (struct cxl_event_gen_media *)&payload->record; > + > + trace_general_media(dev_name, type, rec); > + return; > + } > + > + /* For unknown record types print just the header */ > + trace_generic_event(dev_name, type, &payload->record); > +}