Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp565415lqh; Tue, 7 May 2024 07:36:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUofMIc0myS9Lh0bLk08WvTotWh55TK4w8z8KyqhuI/qJ25ziGhK+UjuVYGjf4w0N66Dy4r7Abmr491HuA6oALD9e4A1m6qOeHFeqAbHA== X-Google-Smtp-Source: AGHT+IFvtglm9BU6A8w60gEGU8GCEbMk93nYSje7zm+HepP/klA4BcnPUjtlU05Jm2btxz2dDR6n X-Received: by 2002:a05:6a00:ac5:b0:6ea:bdbc:614 with SMTP id c5-20020a056a000ac500b006eabdbc0614mr14301125pfl.13.1715092590233; Tue, 07 May 2024 07:36:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715092590; cv=pass; d=google.com; s=arc-20160816; b=xC229YCXDQkDIVDyC2fVYWPo7m4KpGy0XM7oadnPt4OXjqyqX1hmj+cMpV5+UQqlUV rFjYy+O8xrggYlqHXttcZKVry3R4pP5BgzYuEEBcm5v/UOUlqqU7WvgGF9g5tSAiE7Ay xkBpF8hsyKwCFgETFzpxBwsI6nvZP0mSmn/xw8ePRc7Xu+x/oDFe+AE94WgyCDrwnv5f n69K5ANaUV8VfQhzK5ysckVY4elUM3Ab2GGkJi7GwvemP3ibHfYUXbbqu1rihr81CMaZ 4E3CNNH9rh5G8zDUMmeRJXmiiAu0A0kZRv6A3GeaVy5k6vdghEwWe1He6uRrjBb3PNm9 E+Hw== ARC-Message-Signature: i=2; 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:user-agent:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=S+U68ZuLhwQpahr+ubjcXJztDw49AXVlULrvkxV0EvA=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=X+Bfks2UQmPrRGmXbmLgOm8Vecjcdc5G9vr8E3lzYvLEcG0V3lxI23WyIlKUOPMMzM jtOQjOVJJZkIKzvpuPGiv2vPFjA/K1fKHs1dSRitL6RRHYjJIokwRut3gtRyQ/i1AvWd BhCI/f7JQSNz0nIgcYIn+I+EBzCLtn/0ASw3kLqTFjC181WkI5K3ERo9Ku+Ligns1TFX FFKlA1JNsEVAFgrE/VqnskhbRcEy4g8pUcuMF4H773wCkBxbTbsnXNVmht/7gXbwzK8f JljSYxspV5oeDZ+viXehWuWBNL+VBifm40qFYBz5sub+8XzYDayBIzmDUW/qhp0zQuBA qpcg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=izkDLFTV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 n5-20020a056a000d4500b006f448d4e6c7si9130973pfv.62.2024.05.07.07.36.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 07:36:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-171516-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=izkDLFTV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-171516-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-171516-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 E0A56B2ACC7 for ; Tue, 7 May 2024 14:11:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EBA4161305; Tue, 7 May 2024 14:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="izkDLFTV" 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 A2C0815E7E4; Tue, 7 May 2024 14:10:15 +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=1715091015; cv=none; b=BM2ik9sz4WQinIwbZB+dgLW8UWerJ4/ntldJe/aJTXUBCzIr++DtZb3mBMxsR7vAGoY+PrSUjjW/ec1Wy8TkeJhdNNj6hpXK91e6UEK+3F8CVmp6xWwuFKJl40DZpKc3Ak3DJI/rQBVPFM8wGFDgZWlk+e6we9rJICvDssJvxYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715091015; c=relaxed/simple; bh=kn+FavdmZ0cQRYA93YtUn/IHxRXsn+QJq7iaDsZtevI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=uuaNK0pTn5bmpTrjaP/ol8uqpepLqrNOMBdHDpf/87ySTbJXslIpJeihg26N4wPhLRrtiTAajgOWFJHcAU0Dam3uqL1W/N0OoxSpE68Z4RkoF1YMOAWkmKsc+viccKN1NQuo7FQRNtoHrHs/MATpjQAc8Zb1l+ea867KTZcA9JQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=izkDLFTV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7661EC2BBFC; Tue, 7 May 2024 14:10:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715091015; bh=kn+FavdmZ0cQRYA93YtUn/IHxRXsn+QJq7iaDsZtevI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=izkDLFTVrTogceKOu6nxOU512EY4I9RhZrFeUb8BI/UEC+eCIOBRDvm7uYbucpPQS zh+pP1ins2onTDMVbRLWMA/HhLWWkaA8OnRzwohv1M3zuwuNCdw156vnVhxrTl5uCK 2763c7LYchCoeV1Bww+EaB+6GooXyeeJNK/xRokztUGd1rQzkyLl9W3Ic1kpy8GYwX JB28r7fgOaUPg8mMp3UAQ7TSyR+LovO2gv5kkIZ6MIAYCl9hqtSx84NmpLje6GvcG6 MEdTKM8l0WIV/X6acfSh91Q3ZUPWzmfJQmO9F5Bf7g5oEHMDCju1jPkFxtriJ7Huyn S1RCmlTC8JdAg== From: "Masami Hiramatsu (Google)" To: Alexei Starovoitov , Steven Rostedt , Florent Revest Cc: linux-trace-kernel@vger.kernel.org, LKML , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Mark Rutland , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: [PATCH v10 11/36] ftrace: Allow ftrace startup flags exist without dynamic ftrace Date: Tue, 7 May 2024 23:10:09 +0900 Message-Id: <171509100890.162236.4362350342549122222.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <171509088006.162236.7227326999861366050.stgit@devnote2> References: <171509088006.162236.7227326999861366050.stgit@devnote2> User-Agent: StGit/0.19 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" Content-Transfer-Encoding: 8bit From: Steven Rostedt (VMware) Some of the flags for ftrace_startup() may be exposed even when CONFIG_DYNAMIC_FTRACE is not configured in. This is fine as the difference between dynamic ftrace and static ftrace is done within the internals of ftrace itself. No need to have use cases fail to compile because dynamic ftrace is disabled. This change is needed to move some of the logic of what is passed to ftrace_startup() out of the parameters of ftrace_startup(). Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) --- include/linux/ftrace.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index ff70ee437209..c4d81e0ec862 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -538,6 +538,15 @@ static inline void stack_tracer_disable(void) { } static inline void stack_tracer_enable(void) { } #endif +enum { + FTRACE_UPDATE_CALLS = (1 << 0), + FTRACE_DISABLE_CALLS = (1 << 1), + FTRACE_UPDATE_TRACE_FUNC = (1 << 2), + FTRACE_START_FUNC_RET = (1 << 3), + FTRACE_STOP_FUNC_RET = (1 << 4), + FTRACE_MAY_SLEEP = (1 << 5), +}; + #ifdef CONFIG_DYNAMIC_FTRACE void ftrace_arch_code_modify_prepare(void); @@ -632,15 +641,6 @@ void ftrace_set_global_notrace(unsigned char *buf, int len, int reset); void ftrace_free_filter(struct ftrace_ops *ops); void ftrace_ops_set_global_filter(struct ftrace_ops *ops); -enum { - FTRACE_UPDATE_CALLS = (1 << 0), - FTRACE_DISABLE_CALLS = (1 << 1), - FTRACE_UPDATE_TRACE_FUNC = (1 << 2), - FTRACE_START_FUNC_RET = (1 << 3), - FTRACE_STOP_FUNC_RET = (1 << 4), - FTRACE_MAY_SLEEP = (1 << 5), -}; - /* * The FTRACE_UPDATE_* enum is used to pass information back * from the ftrace_update_record() and ftrace_test_record()