mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 14:56:47 +07:00
e67d52d411
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>
31 lines
718 B
C
31 lines
718 B
C
#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 */
|
|
|
|
extern const char test_llvm__bpf_base_prog[];
|
|
extern const char test_llvm__bpf_test_kbuild_prog[];
|
|
extern const char test_llvm__bpf_test_prologue_prog[];
|
|
extern const char test_llvm__bpf_test_relocation[];
|
|
|
|
enum test_llvm__testcase {
|
|
LLVM_TESTCASE_BASE,
|
|
LLVM_TESTCASE_KBUILD,
|
|
LLVM_TESTCASE_BPF_PROLOGUE,
|
|
LLVM_TESTCASE_BPF_RELOCATION,
|
|
__LLVM_TESTCASE_MAX,
|
|
};
|
|
|
|
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
|