ftrace: Add ftrace_rec_counter() macro to simplify the code

The ftrace dynamic record has a flags element that also has a counter.
Instead of hard coding "rec->flags & ~FTRACE_FL_MASK" all over the
place. Use a macro instead.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Steven Rostedt (Red Hat)
2014-05-07 13:46:45 -04:00
committed by Steven Rostedt
parent cf2cb0b271
commit 0376bde11b
2 changed files with 8 additions and 6 deletions

View File

@@ -328,6 +328,8 @@ enum {
#define FTRACE_FL_MASK (FTRACE_FL_MASKED_BITS << FTRACE_REF_MAX_SHIFT)
#define FTRACE_REF_MAX ((1UL << FTRACE_REF_MAX_SHIFT) - 1)
#define ftrace_rec_count(rec) ((rec)->flags & ~FTRACE_FL_MASK)
struct dyn_ftrace {
unsigned long ip; /* address of mcount call-site */
unsigned long flags;