diff options
author | Ian Rogers <irogers@google.com> | 2020-05-30 01:20:13 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-06-01 12:24:21 -0300 |
commit | 21f2b7c13335eeec498569927d87c7381c3b54fa (patch) | |
tree | abb274291b945d3690e9e10622b82e26c0f7902d /tools/include/linux/compiler.h | |
parent | 9300acc6fed8e957c8d60f6f8e4451b508feea2c (diff) | |
download | linux-21f2b7c13335eeec498569927d87c7381c3b54fa.tar.gz linux-21f2b7c13335eeec498569927d87c7381c3b54fa.tar.bz2 linux-21f2b7c13335eeec498569927d87c7381c3b54fa.zip |
tools compiler.h: Add attribute to disable tail calls
Tail call optimizations can remove stack frames that are used in
unwinding tests. Add an attribute that can be used to disable the tail
call optimization. Tested on clang and GCC.
Committer notes:
Old versions of clang don't like that __attribute__((optimize)), so add
an ifdef to make it go away.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: clang-built-linux@googlegroups.com
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Quentin Monnet <quentin@isovalent.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200530082015.39162-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/include/linux/compiler.h')
-rw-r--r-- | tools/include/linux/compiler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h index 180f7714a5f1..9f9002734e19 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h @@ -47,6 +47,9 @@ #ifndef noinline #define noinline #endif +#ifndef __no_tail_call +#define __no_tail_call +#endif /* Are two types/vars the same type (ignoring qualifiers)? */ #ifndef __same_type |