Hi Ingo/Steven,
Ftrace currently maintains an update count which includes false updates,
i.e, updates which failed. If anything, such failures should be tracked
by some separate variable, but this patch provides a minimal fix.
Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
Cc: rostedt@goodmis.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
ftrace_pages->next = (void *)get_zeroed_page(GFP_KERNEL);
}
-static void
+static int
ftrace_code_disable(struct dyn_ftrace *rec)
{
unsigned long ip;
if (failed) {
rec->flags |= FTRACE_FL_FAILED;
ftrace_free_rec(rec);
+ return 0;
}
+ return 1;
}
static int __ftrace_modify_code(void *data)
/* all CPUS are stopped, we are safe to modify code */
hlist_for_each_entry(p, t, &head, node) {
- ftrace_code_disable(p);
- ftrace_update_cnt++;
+ if (ftrace_code_disable(p))
+ ftrace_update_cnt++;
}
}