Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp335019lqt; Thu, 6 Jun 2024 05:19:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUIfx0pT0a9CpCWiNYeVW6AkOOWm6WIhnLohXyKjqpfN9kTWZSdJrEXZC0WBN5u6g7YNeY81Du/5CARngY4kmojZM7wlD5IolauTFexRA== X-Google-Smtp-Source: AGHT+IEWpgqalWoIMX8QLs+8x7DC5EHRr3/+wiDLdxLLi6w6pvOi5SxWkKJPyf7g4CWMnY4GoJwR X-Received: by 2002:a17:902:e809:b0:1f6:74bb:4921 with SMTP id d9443c01a7336-1f6a5a69a0emr63932905ad.44.1717676356109; Thu, 06 Jun 2024 05:19:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717676356; cv=pass; d=google.com; s=arc-20160816; b=Ria2OzdUJ6lgUW60MOAOa3s4Trr93mXAhxCf2H583f42XOXMkwwNt3itcPeRhB812H wX6mUlr2Up5kqq6mduKhkYmARWMLdDe41WzWpPykOhEKfR5yFaDoaVvNGBOzQZGfU5Ns q6d+4byGzA+FWYo+uwBDSShUyK7ot1xPS9BzRi9faAhqTxB0Biu9P6GG62bqt/d26B61 6GTcuHnpuWRNaz1LzEh61SPxfu2zPVWEY5CnN0bBJoNHRNxPPrfMTZMkBgim2Rmsa/VX H7jPd5vwpPjP6sJ5m4tJgsAxO5pZScjt65uYcHRiNFxKCBySxBLQz1eLIVOyxehifFFT Nlcg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:subject:cc:to:from:date:user-agent:message-id; bh=8h3T6YpVx/RBQVVGS50NeYKFou5gMSihrOOVBgFN2GE=; fh=nKfoN7UdqOu/DvYTGAbUDlQOipRyyGAc9CYQlDoFez0=; b=bWuZ1LeP+FpL4cGNoUkxqYoFe1aM3YxCWMXP9+ta96SDiuWoh2RgGrI/Nf2kTYoDU1 6q+2r270OOT6/Clt5jvraBMEVsCXinTtlas9+ld69YOmV0sDSubdMKrFlpkhHS3e20SQ YCESsrh9G1agrudWdA4sanwKPAxxOKXLPyjrSOhtZTgv7OB/VeMGjvZfzyE5h5D0lxe6 2/wbBscWncy+oWv9h8lP/46Fkc1bFJjfvhno9qLdIVg1h7pn930kx2h+BxzQO+7zJcz9 R8gxZpntstj32Q0ZZFtLW4SwY3DlwVYE7Isrc6WeOkCQPKcOZAmOQpTQcnGUnM0HuyuD bcCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-204253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204253-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd7e5341si10561805ad.407.2024.06.06.05.19.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 05:19:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-204253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204253-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id CBBB0B23EC1 for ; Thu, 6 Jun 2024 12:14:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F04E3198A0F; Thu, 6 Jun 2024 12:11:03 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 612AF19752B for ; Thu, 6 Jun 2024 12:11:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717675862; cv=none; b=Vo04ryZySfb2bIMZfrsUDFcD/5F+VjHzF+v7iQ/st2Hp2svLD3w0hDCk9f/r99ValxBnBhcN5iZAKcBWs9RGd5bWS0A1AQs1LfGs7+0TQx38ATctC3D32uAKVTQ2j8XC1B57u1AXCnH1eW7x2Zgq3gjCJzlet8bT+sgkKXRTTYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717675862; c=relaxed/simple; bh=Vhl003s+9gkJi2wM8NFrJTGXuCSJLdVofnWPtxpbJjQ=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=RqzA6lfWzF/wYOQtslY+61qKEAS1eifWq1NcdhKFRqLdgFweDyeOfkVmeA9S5sa3Q/+WOWv72hML5UsZ2RiAWHyRttJdTMmLbzgyA4JaTHsevUWoB3IeLOp4dEu6kdOymGHPSSrmTM5HFUo1//LsHoOWC95se/fHV6YjfIZHIm8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06F37C4AF48; Thu, 6 Jun 2024 12:11:02 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sFBxS-00000000nOp-2WDi; Thu, 06 Jun 2024 08:11:06 -0400 Message-ID: <20240606121106.459468755@goodmis.org> User-Agent: quilt/0.68 Date: Thu, 06 Jun 2024 08:10:17 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , kernel test robot Subject: [for-next][PATCH 13/15] function_graph: Do not update pid func if CONFIG_DYNAMIC_FTRACE not enabled References: <20240606121004.857581251@goodmis.org> 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=UTF-8 From: "Steven Rostedt (Google)" The ftrace subops is only defined if CONFIG_DYNAMIC_FTRACE is enabled. If it is not, function tracing is extremely limited, and the subops in the ftrace_ops structure is not defined (and will fail to compile). If DYNAMIC_FTRACE is not enabled, then function graph filtering will not work (as it shouldn't). Link: https://lore.kernel.org/linux-trace-kernel/20240605202709.096020676@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Fixes: df3ec5da6a1e7 ("function_graph: Add pid tracing back to function graph tracer") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406051855.9VIYXbTB-lkp@intel.com/ Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- kernel/trace/fgraph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 63d828054c79..c0e428c87ea5 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -1177,6 +1177,7 @@ void fgraph_update_pid_func(void) if (!(graph_ops.flags & FTRACE_OPS_FL_INITIALIZED)) return; +#ifdef CONFIG_DYNAMIC_FTRACE list_for_each_entry(op, &graph_ops.subop_list, list) { if (op->flags & FTRACE_OPS_FL_PID) { gops = container_of(op, struct fgraph_ops, ops); @@ -1186,6 +1187,7 @@ void fgraph_update_pid_func(void) static_call_update(fgraph_func, gops->entryfunc); } } +#endif } /* Allocate a return stack for each task */ -- 2.43.0