summaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-05-07 13:46:45 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-06-30 10:09:56 -0400
commit0376bde11be5b87c9fd7d6813ac5fd7e1798b1bf (patch)
treee987fcaca66f89e8aae59b780f1310f83b6c9972 /include/linux/ftrace.h
parentcf2cb0b27116883c23761e974acba5f3bd719d21 (diff)
downloadop-kernel-dev-0376bde11be5b87c9fd7d6813ac5fd7e1798b1bf.zip
op-kernel-dev-0376bde11be5b87c9fd7d6813ac5fd7e1798b1bf.tar.gz
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>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index e4e7df4..e5baa6b 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -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;
OpenPOWER on IntegriCloud