mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ftrace: fix updating of ftrace_update_cnt
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>
This commit is contained in:
parent
ffdaa3582b
commit
492a7ea5bc
1 changed files with 5 additions and 3 deletions
|
@ -453,7 +453,7 @@ static void ftrace_shutdown_replenish(void)
|
||||||
ftrace_pages->next = (void *)get_zeroed_page(GFP_KERNEL);
|
ftrace_pages->next = (void *)get_zeroed_page(GFP_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
ftrace_code_disable(struct dyn_ftrace *rec)
|
ftrace_code_disable(struct dyn_ftrace *rec)
|
||||||
{
|
{
|
||||||
unsigned long ip;
|
unsigned long ip;
|
||||||
|
@ -469,7 +469,9 @@ ftrace_code_disable(struct dyn_ftrace *rec)
|
||||||
if (failed) {
|
if (failed) {
|
||||||
rec->flags |= FTRACE_FL_FAILED;
|
rec->flags |= FTRACE_FL_FAILED;
|
||||||
ftrace_free_rec(rec);
|
ftrace_free_rec(rec);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __ftrace_modify_code(void *data)
|
static int __ftrace_modify_code(void *data)
|
||||||
|
@ -617,7 +619,7 @@ static int __ftrace_update_code(void *ignore)
|
||||||
|
|
||||||
/* all CPUS are stopped, we are safe to modify code */
|
/* all CPUS are stopped, we are safe to modify code */
|
||||||
hlist_for_each_entry(p, t, &head, node) {
|
hlist_for_each_entry(p, t, &head, node) {
|
||||||
ftrace_code_disable(p);
|
if (ftrace_code_disable(p))
|
||||||
ftrace_update_cnt++;
|
ftrace_update_cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue