From: Shuah Khan <shuah@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>,
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH 2/4] ftrace/instances: Clear function triggers when removing instances
Date: Tue, 6 Jun 2017 11:06:41 -0600 [thread overview]
Message-ID: <f3533520-4ff8-12ad-b260-2dc8059eecf0@kernel.org> (raw)
In-Reply-To: <20170516143358.49b64ed5@gandalf.local.home>
On 05/16/2017 12:33 PM, Steven Rostedt wrote:
> On Tue, 16 May 2017 23:14:23 +0530
> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
>
>> On 2017/05/16 07:31PM, Naveen N. Rao wrote:
>>> On 2017/05/15 10:20PM, Steven Rostedt wrote:
>>>> On Sun, 14 May 2017 01:01:02 +0530
>>>> "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
>>>>
>>>
>>> [snip]
>>>
>>>>> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
>>>>> index c4536c449021..3f2aed4ad1ed 100644
>>>>> --- a/kernel/trace/trace.c
>>>>> +++ b/kernel/trace/trace.c
>>>>> @@ -7550,6 +7550,7 @@ static int instance_rmdir(const char *name)
>>>>> }
>>>>>
>>>>> tracing_set_nop(tr);
>>>>> + clear_ftrace_function_probes(tr);
>>>>> event_trace_del_tracer(tr);
>>>>> ftrace_clear_pids(tr);
>>>>> ftrace_destroy_function_files(tr);
>>>>> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
>>>>> index 291a1bca5748..98e0845f7235 100644
>>>>> --- a/kernel/trace/trace.h
>>>>> +++ b/kernel/trace/trace.h
>>>>> @@ -980,6 +980,7 @@ register_ftrace_function_probe(char *glob, struct trace_array *tr,
>>>>> extern int
>>>>> unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr,
>>>>> struct ftrace_probe_ops *ops);
>>>>> +extern void clear_ftrace_function_probes(struct trace_array *tr);
>>>>
>>>> This needs to have a stub function when CONFIG_DYNAMIC_FTRACE is not
>>>> defined. Otherwise we have:
>>>>
>>>> kernel/trace/trace.c:7553:2: error: implicit declaration of function 'clear_ftrace_function_probes' [-Werror=implicit-function-declaration]
>>>> clear_ftrace_function_probes(tr);
>>>> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> The prototype in trace.h is actually guarded by:
>> #if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE)
>>
>> So, I will guard the call to clear_ftrace_function_probes() in trace.c
>> with the same.
>>
>
> No, the proper thing to do is to make a stub function in the else part
> of the #if that the prototype was declared in.
>
> static inline void clear_ftrace_function_probes(struct trace_array *tr)
> {
> }
>
> Please, lets limit the #ifdef ugliness from the code.
>
> -- Steve
>
>
Hi Steve,
Are you good with this patch series. I am looking to see which
of these should go into 4.13-rc1 - please ack individual patches
that should be pulled into 4.13-rc1
thanks,
-- Shuah
next prev parent reply other threads:[~2017-06-06 17:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 19:31 [PATCH 0/4] ftrace: Fix a few issues Naveen N. Rao
2017-05-13 19:31 ` [PATCH 1/4] ftrace: Simplify glob handling in unregister_ftrace_function_probe_func() Naveen N. Rao
2017-05-15 17:22 ` Steven Rostedt
2017-05-16 8:07 ` Naveen N. Rao
2017-05-13 19:31 ` [PATCH 2/4] ftrace/instances: Clear function triggers when removing instances Naveen N. Rao
2017-05-15 15:21 ` Steven Rostedt
2017-05-15 16:11 ` Steven Rostedt
2017-05-16 16:11 ` Masami Hiramatsu
2017-05-16 2:20 ` Steven Rostedt
2017-05-16 14:01 ` Naveen N. Rao
2017-05-16 17:44 ` Naveen N. Rao
2017-05-16 18:33 ` Steven Rostedt
2017-06-06 17:06 ` Shuah Khan [this message]
2017-06-06 17:37 ` Naveen N. Rao
2017-05-13 19:31 ` [PATCH 3/4] selftests/ftrace: Fix bashisms Naveen N. Rao
2017-05-15 15:16 ` Steven Rostedt
2017-05-16 14:25 ` Masami Hiramatsu
2017-05-13 19:31 ` [PATCH 4/4] selftests/ftrace: Add test to remove instance with active event triggers Naveen N. Rao
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=f3533520-4ff8-12ad-b260-2dc8059eecf0@kernel.org \
--to=shuah@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=rostedt@goodmis.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
Powered by JetHome