From: Steven Rostedt <rostedt@goodmis.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Ingo Molnar <mingo@redhat.com>, Jonathan Corbet <corbet@lwn.net>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Xuefeng Li <lixuefeng@loongson.cn>
Subject: Re: [RFC PATCH 1/2] ftrace: Introduce cmdline argument ftrace_disabled
Date: Sat, 19 Jun 2021 11:22:02 -0400 [thread overview]
Message-ID: <20210619112202.0a2c7196@gandalf.local.home> (raw)
In-Reply-To: <1624084160-3342-2-git-send-email-yangtiezhu@loongson.cn>
On Sat, 19 Jun 2021 14:29:19 +0800
Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
> If set CONFIG_FUNCTION_TRACER=y, we can use the following command to
> disable ftrace after boot up:
> echo 0 > /proc/sys/kernel/ftrace_enabled
I'd love to just remove that. It's original purpose was to stop function
tracing when the latency tracers were active. That's now done via a tracefs
option. The "ftrace_enabled" really has no use anymore.
>
> ftrace_disabled is much stronger than ftrace_enabled, introduce a new
> cmdline argument ftrace_disabled for user to control whether to disable
> ftrace when boot up.
"ftrace_disabled" is triggered when an anomaly is detected, and for the
safety of the system, ftrace shuts down. It was never meant to be a user
triggered event.
You have no rationale for this change. What's the purpose of this?
-- Steve
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> kernel/trace/ftrace.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 72ef4dc..a015699 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -5517,6 +5517,14 @@ static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata;
> /* Used by function selftest to not test if filter is set */
> bool ftrace_filter_param __initdata;
>
> +static int __init set_ftrace_disabled(char *str)
> +{
> + pr_info("Set ftrace_disabled to disable ftrace\n");
> + ftrace_disabled = 1;
> + return 1;
> +}
> +__setup("ftrace_disabled", set_ftrace_disabled);
> +
> static int __init set_ftrace_notrace(char *str)
> {
> ftrace_filter_param = true;
next prev parent reply other threads:[~2021-06-19 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-19 6:29 [RFC PATCH 0/2] Introduce ftrace_disabled Tiezhu Yang
2021-06-19 6:29 ` [RFC PATCH 1/2] ftrace: Introduce cmdline argument ftrace_disabled Tiezhu Yang
2021-06-19 15:22 ` Steven Rostedt [this message]
2021-06-21 1:21 ` Tiezhu Yang
2021-06-21 14:00 ` Steven Rostedt
2021-06-22 1:19 ` Tiezhu Yang
2021-06-19 6:29 ` [RFC PATCH 2/2] docs: kernel-parameters: Add ftrace_disabled Tiezhu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210619112202.0a2c7196@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lixuefeng@loongson.cn \
--cc=mingo@redhat.com \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox