lkml.org 
[lkml]   [2010]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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;


\
 
 \ /
  Last update: 2010-02-10 06:35    [W:0.033 / U:26.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site