From patchwork Tue Jan 24 20:22:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 4474 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2358000wrn; Tue, 24 Jan 2023 12:27:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXvrJhb/aKWrxsPDU+WEqzXvk/fJvpyQJcgJwnA+InL1ZL/5uw2VbfBF2bKtsxNUpRcIP7r4 X-Received: by 2002:a17:906:2582:b0:877:573d:e91c with SMTP id m2-20020a170906258200b00877573de91cmr26281639ejb.63.1674592068126; Tue, 24 Jan 2023 12:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674592068; cv=none; d=google.com; s=arc-20160816; b=o9UOCdUNvjNgyFaFFZfzdMi3g/TdeYL52Eo3HiEjSqGyiGgLF2fmrmjvzwDRva2yfm ahsCCraw5Tc+vv/DwDjvTrKfW4fYus0ISWGB8AWXWv+LYMgM9Jz4PMEASQsQJeBXL9F5 4XF2tXR9ykHt6v942ZfrI9iAoRBYGrCxAZaWHbDfdLg6TdO5W21Ela0+ZkVWgQ0RccZg M2wLShVSzNwqspmYDsjDS1MOd1u5KpFHA706rbBQa4022W8gNjXz/wCwmGVdH7GpR0Ei 1AHo8kiRKh/eZ2QqquqNIBzydytZr2L4n8pRPN+q/DHWj2cJIRa5TGLrRiwxWv5KkVJj 1bCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:user-agent:message-id; bh=6SCA6TOZYl7ATrzUPVHvCKC/dE64tDMQB3Ga4FeQ79Q=; b=S6xlp2GtYsudW1FVo+BHHvT4x5EhTFGO1o4Lmq+PQNtXf6m4tJbRKhChpMtVcpuRZl vL/MevT0+6hznwiorxqMF1/XcL+bLZskznQUNEACClVbgxMZswAv6J09MXrdMQ6Ea2vq a2VWn4LNlWprJiNrRQdPgr1+DNKTLbwJNZzZ/nej6Icy0H9Y7nkl29rt/sIYFonU5o1P 88iS5xAYpSdCRGHxZYe/3VTTTIbYfREGuaVWu2qNxtE47v93lUftFaTuxpcXTR5kA1oa rv2eaOhgQMR+NHeD2zf7V3wqAW3Cvi5HeJNMdtmKB4Cq+HKCdpAJvvhtjntFI+shAGnF W2TQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id we21-20020a170907235500b0084d0ebd704bsi3271412ejb.71.2023.01.24.12.27.24; Tue, 24 Jan 2023 12:27:48 -0800 (PST) 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 S233206AbjAXUZW (ORCPT + 99 others); Tue, 24 Jan 2023 15:25:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbjAXUZU (ORCPT ); Tue, 24 Jan 2023 15:25:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAAC83E9; Tue, 24 Jan 2023 12:25:19 -0800 (PST) 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 3A51AB816AD; Tue, 24 Jan 2023 20:25:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E49CFC433EF; Tue, 24 Jan 2023 20:25:16 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.96) (envelope-from ) id 1pKPr1-003dz3-2D; Tue, 24 Jan 2023 15:25:15 -0500 Message-ID: <20230124202238.563854686@goodmis.org> User-Agent: quilt/0.66 Date: Tue, 24 Jan 2023 15:22:38 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Andrew Morton , Linyu Yuan , Peter Zijlstra , Alexei Starovoitov , Daniel Borkmann , bpf@vger.kernel.org Subject: [PATCH 0/2] tracing: Have bpf and perf reuse the tracefs TRACE_EVENT macros 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755937052464867220?= X-GMAIL-MSGID: =?utf-8?q?1755937052464867220?= When reviewing Linyu Yuan patches[1] where the change was to move most the macros from perf and bpf into stages, I realized that the macros that makes up perf and bpf events are duplicated from the tracefs macros that were moved into the stages directory. One reason to move them into that directory was to remove duplicate code. Remove the macros that are duplicated in the bpf and perf code and use stage 6, which is the macros used to build the data needed to record the TRACE_EVENT() TP_fast_assign() into the trace. This will mean they will pick up bug fixes, as well as any enhacements that are added. [1] https://lore.kernel.org/lkml/1671181385-5719-1-git-send-email-quic_linyyuan@quicinc.com/ Steven Rostedt (Google) (2): perf/tracing: Use stage6 of tracing to not duplicate macros bpf/tracing: Use stage6 of tracing to not duplicate macros ---- include/trace/bpf_probe.h | 45 +-------------------------- include/trace/perf.h | 46 +--------------------------- include/trace/stages/stage6_event_callback.h | 3 ++ 3 files changed, 5 insertions(+), 89 deletions(-)