Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp548788lqr; Wed, 5 Jun 2024 13:39:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWWLgSJnTf+GTNp0t6rvec7R7tX8TpxRkeywgy1T59hO5w6r3Ur7DFyrqOrbNmjP6vuWUInU2eR1FyeGhJIuq+y9kIWW4pBehz28V9H5Q== X-Google-Smtp-Source: AGHT+IHcylSvlMsAn4kYfQ3v9tSTF4JkfaDB7kCfqkA0ffcDp4hMYCV+WLYmG4PeLypuUyzNzjjC X-Received: by 2002:a17:903:27cb:b0:1f6:fa0:da71 with SMTP id d9443c01a7336-1f6a5a06fbbmr32387455ad.18.1717619966388; Wed, 05 Jun 2024 13:39:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717619966; cv=pass; d=google.com; s=arc-20160816; b=JN0TgiU9LQdU4c5agCYtq1fUDvBAcMmbIhZza+s8ReKMnLQt+hxESPyRop/PkujGB3 pIAgtOTSeK1jlPCGBOsch3+qMSxYZ4Ddvhd+oxoidzoTYb3uVsymBpGVmr5Z1sTU3NJF cunhCnj/eBeWN13RuOIPqUlLjhiIQ2SBYLA8LVT3gV+5FD0GcTalUjgURhgNWrEwqi7z s/dNqtW01CUdoUU4bKaON/EwOCJQTtwRqYFqV9HVztkPL9JtbHKdETOaPXn9qMd+1VMD 1d7ZG73DRARF8uRdtJz8hkBzMgSiwYIU+wheaTYdsKolnFSBTs2Fq4zqjakYdBtIkss3 2L3w== 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=USCTpG2V2TZCCBzool69ewSn4niZKiFpxq/aSq82vjE=; fh=BN3k1SVmJgv7qUoz+vlA0xMJLY/7qKHFnjdMRugw0Xs=; b=YOXG6+3Hny8QljENlrmST/KPjdv3cN5QNyDfDqEKgfDQkazyhNXCFLoNmow8Ms2EP6 KI9SLNcIeiD1CWN5fAf6aC4aPUmBSGxjkdxc/ZF//sOjIeL0fNdKZ59FCN6YDLpO+FnW bhsXMildSTI4iIj8gP37nx8S+bVSXgeFh5mWAbVGna3qSA6XnUyVq06mtKV1N34aef+a R2KuZk98UivftmMXmQGf9sS9pK3gjVChA2MCX5DvysRQt+2QLc6tkZueo5iyxSWkglhf UaojHg1WFhssNl3ym5F738ATBcKAsPx4XzQiEfX95P0EPLHzWljjVXOGNyxHQucDxEXf 96GQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-203174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203174-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-1f6324013a2si2079235ad.466.2024.06.05.13.39.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 13:39:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203174-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-203174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203174-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 752BBB22981 for ; Wed, 5 Jun 2024 20:27:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DE54515EFD0; Wed, 5 Jun 2024 20:27:06 +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 5712215ECF3; Wed, 5 Jun 2024 20:27:06 +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=1717619226; cv=none; b=ka6xQRBCZHP9Cap7n2Vp54VYo9g0Ay3cPKLTb3EcGKWuv6YJnLJEdEFOIoCJ6gNhh0dBgwUJwrm/D5p7fG86Fa5jlRAupsRJ9lcp4sYPDXX5VrkORt/I/kUqHHOXv2Mw+De4Sd1TopYvvJGEusYS2hhb/X4C3e04o+Q3m9uV0s0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717619226; c=relaxed/simple; bh=4Q9p3K5GndKyfNAahJjpQzFGmcIsZnywwComrYPdA8Y=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=uqL2V0YDiyFVdn64x71E4JtiJ3tX0oF2P3fyMKkOR/R4pHQtvymTwa/14sDvhiGsBZjN2KQwvTX6cwYkCpTbV3o2CarBLtRns3NrIKSoBi/chtyDFPp4F/Oc95yE1jaXRozB3HwGkW5CYJmVgNaIqn1XNdg1kQnbXSMx8L6hiXc= 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 3A85AC4AF0A; Wed, 5 Jun 2024 20:27:06 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sExDx-00000000i9M-0zcE; Wed, 05 Jun 2024 16:27:09 -0400 Message-ID: <20240605202709.096020676@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 05 Jun 2024 16:26:50 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , kernel test robot Subject: [PATCH 6/6] function_graph: Do not update pid func if CONFIG_DYNAMIC_FTRACE not enabled References: <20240605202644.293295925@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). 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/ 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