Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 1 | #ifndef PERF_TEST_LLVM_H |
| 2 | #define PERF_TEST_LLVM_H |
| 3 | |
Wang Nan | e67d52d | 2016-11-26 07:03:37 +0000 | [diff] [blame^] | 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 8 | #include <stddef.h> /* for size_t */ |
| 9 | #include <stdbool.h> /* for bool */ |
| 10 | |
| 11 | extern const char test_llvm__bpf_base_prog[]; |
Wang Nan | 7af3f3d | 2015-11-06 13:49:42 +0000 | [diff] [blame] | 12 | extern const char test_llvm__bpf_test_kbuild_prog[]; |
Wang Nan | bbb7d49 | 2015-11-16 12:10:14 +0000 | [diff] [blame] | 13 | extern const char test_llvm__bpf_test_prologue_prog[]; |
Wang Nan | 7b6982c | 2016-01-25 09:55:48 +0000 | [diff] [blame] | 14 | extern const char test_llvm__bpf_test_relocation[]; |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 15 | |
| 16 | enum test_llvm__testcase { |
| 17 | LLVM_TESTCASE_BASE, |
Wang Nan | 7af3f3d | 2015-11-06 13:49:42 +0000 | [diff] [blame] | 18 | LLVM_TESTCASE_KBUILD, |
Wang Nan | bbb7d49 | 2015-11-16 12:10:14 +0000 | [diff] [blame] | 19 | LLVM_TESTCASE_BPF_PROLOGUE, |
Wang Nan | 7b6982c | 2016-01-25 09:55:48 +0000 | [diff] [blame] | 20 | LLVM_TESTCASE_BPF_RELOCATION, |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 21 | __LLVM_TESTCASE_MAX, |
| 22 | }; |
| 23 | |
| 24 | int test_llvm__fetch_bpf_obj(void **p_obj_buf, size_t *p_obj_buf_sz, |
Wang Nan | 7b6982c | 2016-01-25 09:55:48 +0000 | [diff] [blame] | 25 | enum test_llvm__testcase index, bool force, |
| 26 | bool *should_load_fail); |
Wang Nan | e67d52d | 2016-11-26 07:03:37 +0000 | [diff] [blame^] | 27 | #ifdef __cplusplus |
| 28 | } |
| 29 | #endif |
Wang Nan | b31de01 | 2015-11-06 13:49:41 +0000 | [diff] [blame] | 30 | #endif |