From: Li Zefan <lizf@cn.fujitsu.com>
To: rostedt@goodmis.org
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ftrace: Allow to remove a single function from function graph filter
Date: Wed, 10 Feb 2010 13:33:48 +0800 [thread overview]
Message-ID: <4B72453C.2090603@cn.fujitsu.com> (raw)
In-Reply-To: <1265773753.24386.51.camel@gandalf.stny.rr.com>
>> do_for_each_ftrace_rec(pg, rec) {
>>
>> - if (*idx >= FTRACE_GRAPH_MAX_FUNCS)
>> - break;
>> -
>> if (rec->flags & (FTRACE_FL_FAILED | FTRACE_FL_FREE))
>> continue;
>>
>> if (ftrace_match_record(rec, search, search_len, type)) {
>> - /* ensure it is not already in the array */
>> + /* if it is in the array */
>> exists = false;
>> - for (i = 0; i < *idx; i++)
>> + for (i = 0; i < *idx; i++) {
>> if (array[i] == rec->ip) {
>> exists = true;
>> break;
>> }
>> - if (!exists)
>> - array[(*idx)++] = rec->ip;
>> - found = 1;
>> + }
>> +
>> + if (!not) {
>> + if (!exists) {
>> + array[(*idx)++] = rec->ip;
>> + if (*idx >= FTRACE_GRAPH_MAX_FUNCS)
>> + goto out;
>
> The fail = 0 needs to be first. I just tested this and on the 32'cd
> function added, it gives a failed message but still adds the function.
>
Will fix. Thanks!
>
>> + }
>> + fail = 0;
next prev parent reply other threads:[~2010-02-10 5:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 6:56 Li Zefan
2010-02-10 3:49 ` Steven Rostedt
2010-02-10 5:33 ` Li Zefan [this message]
2010-02-10 7:43 Li Zefan
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=4B72453C.2090603@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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