Now, ftrace only calculate the dyn_ftrace number in the adding
breakpoint loop, not in adding update and finish update loop.
Calculate the correct dyn_ftrace, once ftrace reports the failure message
to the userspace.
Link: http://lkml.kernel.org/r/1442420382-13130-1-git-send-email-mnfhuang@gmail.com
Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
        run_sync();
 
        report = "updating code";
+       count = 0;
 
        for_ftrace_rec_iter(iter) {
                rec = ftrace_rec_iter_record(iter);
                ret = add_update(rec, enable);
                if (ret)
                        goto remove_breakpoints;
+               count++;
        }
 
        run_sync();
 
        report = "removing breakpoints";
+       count = 0;
 
        for_ftrace_rec_iter(iter) {
                rec = ftrace_rec_iter_record(iter);
                ret = finish_update(rec, enable);
                if (ret)
                        goto remove_breakpoints;
+               count++;
        }
 
        run_sync();