diff options
author | Wang Nan <wangnan0@huawei.com> | 2016-11-26 07:03:37 +0000 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-12-05 15:51:44 -0300 |
commit | e67d52d411c3562263735479db2efd2ebd178db9 (patch) | |
tree | a88eae1461ecd9c0cfc84cb0f69faf9bbbfda859 /tools/perf/tests/llvm.h | |
parent | a9495fe9dc63bee1166772b6f10e199ef1747892 (diff) | |
download | linux-e67d52d411c3562263735479db2efd2ebd178db9.tar.bz2 |
perf clang: Update test case to use real BPF script
Allow C++ code to use util.h and tests/llvm.h. Let 'perf test' compile a
real BPF script.
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@fb.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Joe Stringer <joe@ovn.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/20161126070354.141764-14-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/llvm.h')
-rw-r--r-- | tools/perf/tests/llvm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/tests/llvm.h b/tools/perf/tests/llvm.h index 0eaa604be99d..b83571758d83 100644 --- a/tools/perf/tests/llvm.h +++ b/tools/perf/tests/llvm.h @@ -1,6 +1,10 @@ #ifndef PERF_TEST_LLVM_H #define PERF_TEST_LLVM_H +#ifdef __cplusplus +extern "C" { +#endif + #include <stddef.h> /* for size_t */ #include <stdbool.h> /* for bool */ @@ -20,4 +24,7 @@ enum test_llvm__testcase { int test_llvm__fetch_bpf_obj(void **p_obj_buf, size_t *p_obj_buf_sz, enum test_llvm__testcase index, bool force, bool *should_load_fail); +#ifdef __cplusplus +} +#endif #endif |