aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 6faa7e549de4..37bcb50a4d7c 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -76,7 +76,8 @@ struct ftrace_branch_data {
76 * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code 76 * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
77 * to disable branch tracing on a per file basis. 77 * to disable branch tracing on a per file basis.
78 */ 78 */
79#if defined(CONFIG_TRACE_BRANCH_PROFILING) && !defined(DISABLE_BRANCH_PROFILING) 79#if defined(CONFIG_TRACE_BRANCH_PROFILING) \
80 && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__)
80void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); 81void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
81 82
82#define likely_notrace(x) __builtin_expect(!!(x), 1) 83#define likely_notrace(x) __builtin_expect(!!(x), 1)
@@ -114,7 +115,9 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
114 * "Define 'is'", Bill Clinton 115 * "Define 'is'", Bill Clinton
115 * "Define 'if'", Steven Rostedt 116 * "Define 'if'", Steven Rostedt
116 */ 117 */
117#define if(cond) if (__builtin_constant_p((cond)) ? !!(cond) : \ 118#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
119#define __trace_if(cond) \
120 if (__builtin_constant_p((cond)) ? !!(cond) : \
118 ({ \ 121 ({ \
119 int ______r; \ 122 int ______r; \
120 static struct ftrace_branch_data \ 123 static struct ftrace_branch_data \