linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: mingo@redhat.com, catalin.marinas@arm.com, will@kernel.org,
	tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com,
	x86@kernel.org, hpa@zytor.com, broonie@kernel.org,
	mark.rutland@arm.com, ardb@kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, duanxiongchun@bytedance.com,
	songmuchun@bytedance.com
Subject: Re: [External] Re: [PATCH RESEND v3 1/2] ftrace: cleanup ftrace_graph_caller enable and disable
Date: Sat, 9 Apr 2022 23:06:44 +0800	[thread overview]
Message-ID: <1d62e977-2142-e2b0-9d4e-f181ee62f6f1@bytedance.com> (raw)
In-Reply-To: <20220409102300.4cfc9589@gandalf.local.home>

On 2022/4/9 22:23, Steven Rostedt wrote:
> On Sat,  9 Apr 2022 16:54:59 +0800
> Chengming Zhou <zhouchengming@bytedance.com> wrote:
> 
>> --- a/kernel/trace/ftrace.c
>> +++ b/kernel/trace/ftrace.c
>> @@ -2721,6 +2721,26 @@ int __weak ftrace_arch_code_modify_post_process(void)
>>  	return 0;
>>  }
>>  
>> +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> 
> Actually, can you put this into fgraph.c instead. That only gets compiled
> if the above config is enabled. Thus, you do not even need to add the
> #ifdef around it.
> 
> I intend to move even more code into fgraph.c that is only for function
> graph. I don't want to add any new code to ftrace.c for it.

Ok, make sense. I will do it.

Thanks.

> 
> -- Steve
> 
> 
>> +/*
>> + * archs can override this function if they must do something
>> + * to enable hook for graph tracer.
>> + */
>> +int __weak ftrace_enable_ftrace_graph_caller(void)
>> +{
>> +	return 0;
>> +}
>> +
>> +/*
>> + * archs can override this function if they must do something
>> + * to disable hook for graph tracer.
>> + */
>> +int __weak ftrace_disable_ftrace_graph_caller(void)
>> +{
>> +	return 0;
>> +}
>> +#endif
>> +
>>  void ftrace_modify_all_code(int command)
>>  {
>>  	int update = command & FTRACE_UPDATE_TRACE_FUNC;
> 

      reply	other threads:[~2022-04-09 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-09  8:54 [PATCH RESEND v3 1/2] ftrace: cleanup ftrace_graph_caller enable and disable Chengming Zhou
2022-04-09  8:55 ` [PATCH RESEND v3 2/2] arm64/ftrace: Make function graph use ftrace directly Chengming Zhou
2022-04-09 14:23 ` [PATCH RESEND v3 1/2] ftrace: cleanup ftrace_graph_caller enable and disable Steven Rostedt
2022-04-09 15:06   ` Chengming Zhou [this message]

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=1d62e977-2142-e2b0-9d4e-f181ee62f6f1@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=duanxiongchun@bytedance.com \
    --cc=hpa@zytor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=songmuchun@bytedance.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).