Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3064549rdh; Mon, 27 Nov 2023 05:57:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHjmNYiQRkRGKJlNP81NR/7MFeyG40eTyM7e84T16EJG5LX4gb1ZJFpSOHM71RVPyy7UNZ0 X-Received: by 2002:a05:6a20:4425:b0:18b:cb93:ebd9 with SMTP id ce37-20020a056a20442500b0018bcb93ebd9mr12341182pzb.54.1701093427549; Mon, 27 Nov 2023 05:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701093427; cv=none; d=google.com; s=arc-20160816; b=nKs5qhm1RMFDAbItXe9Kfg5e9QxWRKDbsGBcYihdBrVnXsz6NWYgGzAGcsp/hj+noD +bLRcjTOvdcmzAIRphYT9tAikqO8MLQx8bQfJ6ZTywb6ToKpY8oUyDBe8uS5mAwskoEn gcNXizoZK2u34ERgHWsPVOq55xTKV5kjGi+Mj9TzQ+JLpF8pxaxgnvsfYwO4u3Z/Fl1D iEtUBQS66IdePcbcjyH6fMkBAwUnrfWSXrw4v93EU7T4SHmGQQoy60mJNM1bAI/wP1YL jZP1ZgK/jpe/8cgnwrCKz5WoijZz/GilFVjvPDULmx0CuDxOgZjyTDz3yVlF+amBpuIl 01jw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8FG1EfTvjghHx0E3OCkHobbbNVNqEcUAtmh9UlmGtc4=; fh=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=H4KJwTwX6Q0ZwJzd7j6SvrdKVuQxpDHUh7LNedKmAZo+8xH3SwzW3weFwxoWDcsb+j Gn8+daUfYMvWzoJanZu/XgdtWCoSyaPycxMT78MTnVCKQzItSUSPbf+RyO2gj4pumVuz 9IA5SpYo1UC1I+39Y7dvNPpswsWEX1mDLLhfKB+45q4msXVqOh0RkzUkz3nmnJukhqpe Ydy8RirZOh8kNNwcJL+AEkznP2z4JRLyXesUrEZVo8EGUnjHt21YEnDnAwy0hudE8PUM FZ5evwvDHCOUz8PKOp8i+Uu38H6pvHY/GyEXhNCpNYVyRZeTBoksYXOnyTQRLXnzqKth qQpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=InfdeYoK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id ck21-20020a056a02091500b005bd03d2fda6si10288729pgb.350.2023.11.27.05.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 05:57:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=InfdeYoK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5E5D2801B788; Mon, 27 Nov 2023 05:57:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233725AbjK0N4o (ORCPT + 99 others); Mon, 27 Nov 2023 08:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233369AbjK0N4Z (ORCPT ); Mon, 27 Nov 2023 08:56:25 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA09D1BB for ; Mon, 27 Nov 2023 05:55:16 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D2E7C433C7; Mon, 27 Nov 2023 13:55:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701093316; bh=6ERBwQiaxIIDNTVWPQkxDhl1p/zo1tlsKma+ZLC6cPI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=InfdeYoK/y2VllHqqyuUR/zrdyimXufJGapAUBhCgPsMsg+n2oWKxEP69Q0bFwZfg es9Po9cmiJra9aMWLxdJuaV9GEdtUAQFzv+BUqNkRr/35hUX//I6etAnPdUB7DN98f 85XsG6sFG0Y3zxabNvXz4Sni/cECM3KJNgULHeeE3fHxGcrX8z57C7IPle5aSjMw9P 6+mAsEc138Qq7PP4+nfKNIoxgL201mwpru0JMw/KIx6I3d/V0N56O7Bug6mnGuK6/Z jD0ihsZ/71U9oFMqWGto01EiqeTidq/EwOGY9kZ3vlbNoc+Hv5BQl7/QghOGyGH0PI joYwrKeqYlybg== 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 v3 11/33] ftrace: Allow ftrace startup flags exist without dynamic ftrace Date: Mon, 27 Nov 2023 22:55:09 +0900 Message-Id: <170109330957.343914.4603643031632118062.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170109317214.343914.4784420430328654397.stgit@devnote2> References: <170109317214.343914.4784420430328654397.stgit@devnote2> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 05:57:02 -0800 (PST) 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 0955baccbb87..7b08169aa51d 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()