tools: Adopt noinline from kernel sources
To have a more compact way to ask the compiler not to inline a function and to make tools/ source code look like kernel code. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-bis4pqxegt6gbm5dlqs937tn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -62,8 +62,7 @@ static void __test_function(volatile long *ptr)
|
||||
}
|
||||
#endif
|
||||
|
||||
__attribute__ ((noinline))
|
||||
static int test_function(void)
|
||||
static noinline int test_function(void)
|
||||
{
|
||||
__test_function(&the_var);
|
||||
the_var++;
|
||||
|
Reference in New Issue
Block a user