diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-05-01 12:44:50 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-05-14 11:37:28 -0400 |
commit | 68f40969f0173c02ddc22a40df865c81c29070e4 (patch) | |
tree | 79a6312ecb0ed728adb66f731bc88f1d55632904 /kernel/trace | |
parent | 19eab4a472cfe4a3ae51cff1711d795e3f9bb564 (diff) |
ftrace: Always inline ftrace_hash_empty() helper function
The ftrace_hash_empty() function is a simple test:
return !hash || !hash->count;
But gcc seems to want to make it a call. As this is in an extreme
hot path of the function tracer, there's no reason it needs to be
a call. I only wrote it to be a helper function anyway, otherwise
it would have been inlined manually.
Force gcc to inline it, as it could have also been a macro.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 61f39f8b62e1..98fa931b6864 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1105,7 +1105,7 @@ struct ftrace_page { | |||
1105 | static struct ftrace_page *ftrace_pages_start; | 1105 | static struct ftrace_page *ftrace_pages_start; |
1106 | static struct ftrace_page *ftrace_pages; | 1106 | static struct ftrace_page *ftrace_pages; |
1107 | 1107 | ||
1108 | static bool ftrace_hash_empty(struct ftrace_hash *hash) | 1108 | static bool __always_inline ftrace_hash_empty(struct ftrace_hash *hash) |
1109 | { | 1109 | { |
1110 | return !hash || !hash->count; | 1110 | return !hash || !hash->count; |
1111 | } | 1111 | } |