Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp165415lqb; Tue, 4 Jun 2024 08:03:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmI4CXd78af5fMNzY1RvoCfwSqR2hwKv+DuCpxDF36/twp8Bq5lBffGOQs8A9EK/GO8Pxw/ll9rb/Wgw9sd2UkoLeY7gVJMloO7Q81PQ== X-Google-Smtp-Source: AGHT+IHwEskPDqq3vvrLZbm8rnjvS8b7OxS76rTvJAuvXGYN3TmRJGqMT0HPRdSN2yTaw+nMYV1G X-Received: by 2002:a05:6870:2318:b0:250:7465:d223 with SMTP id 586e51a60fabf-2508c11960bmr10626875fac.39.1717513380797; Tue, 04 Jun 2024 08:03:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717513380; cv=pass; d=google.com; s=arc-20160816; b=wsFWnCd10a5cWYZ4Q8yrPloZz6hIfS9I1h+g0X9RyMXVyG640p36qN/u8dSzxbOyIQ kHO996nZoWbFcaj8SwFay+sgtyjy4QBmpgjytgj/riswIHJ1B9WJSYjH46eQMJWvvi5i vmkkoxVtfksMXYng/i2Ngbrs0sq1l1MLWlQCmnq8T+5xIt+Q8po8XRyr5CMNuGm3dIAT eRWToS+0efrZYe+jZg63QGxlPQof48Mn6x7otCCH9Lwj0jWEiFdrmY7rrUSIN181HU2y B2DPOa+3zlJtnFZCziOVbYMmQ55kDPFfwH7GAbFd7Y0MgScSUbvsMT6XzUUMPELgLQ2S yOwA== 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=/RsDlR+Nt70qP/jkjy1AFormnSBpdIQbT7rkhFQ0CrE=; fh=/wy5e/q+z2qlOMkv0QH/u80KV4ZXPtz68q6c1OyjqGY=; b=dfKX5E/QLKyczlSgtkaShxIvVbAl9I6TBY9Z3fVT9VowO00T34KpZgg0r8mxU/gxtu 0koSj3rGZ9iBSdKKLO1HLzn1cdZJWlsu1bmhmHuV5XJEpgBlTb7PWXUUaw9eDIlpqPPm KLCxwBbyohNsy1BTOZ7uxZY0O82k4fhHYNnYcvz4NzpcMticGGuPRhvAjxUIlaJIQpt6 NCKLKMl+fv054WmHoAwX/cwMosINP2zQY/hSKt79/7oPA+B5GpRD/4p+Jsmg1L3Rcm54 L0+tn4Dqx03mBeVabng9JufyaZjekkxlSXYzBUtZCr1W/hzHG2zf/3Sm0fJkiMmFkA5Q /icw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-200870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200870-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 71dfb90a1353d-4eafee38e61si1912558e0c.147.2024.06.04.08.03.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:03:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-200870-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200870-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 289A11C22FDB for ; Tue, 4 Jun 2024 14:45:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D9D2B149DE3; Tue, 4 Jun 2024 14:42:17 +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 494F814885D; Tue, 4 Jun 2024 14:42: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=1717512136; cv=none; b=O33WH8H07ldaXil43PtlcVHKiWLNAdYuozxEJ5XInrUplxgSxqdplGyySZHI+KCgrlXoWEYFlhegJLTqRsJTo3+dME5saadUSMfeYfpkE35vXSWVOXLwG6G3TlTQUb7RTkgAwqlqnga2F3JPZUeX8/Ij+RI3UreFhCYB9YK6EqE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717512136; c=relaxed/simple; bh=swTaasv8PXlkFiPSTEH7yV+crVt6cu1LbDP2CWCm4e4=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=VaCWNj4Ujw3iRYUXh2DDIEpwiRAINg4/pKPwMD0NYmUwIa/51W9473gIlqAcIZLu6W48KeM+n2vpqflYG9GfekhfHCgSMR9Va0yjrnishsRZaCY/vtab2cv5DcU9EFbdklOm+VWK9hnSCiaE8RYOdqIr6I6/hCMdaeVSCZ8Z0Yo= 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 D038EC4AF55; Tue, 4 Jun 2024 14:42:15 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.97) (envelope-from ) id 1sEVMd-00000000YxX-2Kl0; Tue, 04 Jun 2024 10:42:15 -0400 Message-ID: <20240604144215.418546634@goodmis.org> User-Agent: quilt/0.68 Date: Tue, 04 Jun 2024 10:41:12 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , Alexei Starovoitov , Florent Revest , Martin KaFai Lau , bpf , Sven Schnelle , Alexei Starovoitov , Jiri Olsa , Arnaldo Carvalho de Melo , Daniel Borkmann , Alan Maguire , Peter Zijlstra , Thomas Gleixner , Guo Ren Subject: [for-next][PATCH 09/27] ftrace: Allow ftrace startup flags to exist without dynamic ftrace References: <20240604144103.293353991@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 (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(). Link: https://lore.kernel.org/linux-trace-kernel/171509100890.162236.4362350342549122222.stgit@devnote2 Link: https://lore.kernel.org/linux-trace-kernel/20240603190822.350654104@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Alexei Starovoitov Cc: Florent Revest Cc: Martin KaFai Lau Cc: bpf Cc: Sven Schnelle Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Cc: Daniel Borkmann Cc: Alan Maguire Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Guo Ren Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (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 fd656e6d6b7c..586018744785 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -509,6 +509,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); @@ -603,15 +612,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() -- 2.43.0