[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4B72453C.2090603@cn.fujitsu.com>
Date: Wed, 10 Feb 2010 13:33:48 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: rostedt@...dmis.org
CC: Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ftrace: Allow to remove a single function from function
graph filter
>> 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists