Linux Perf
llvm.c File Reference
#include <stdio.h>
#include <bpf/libbpf.h>
#include <util/llvm-utils.h>
#include <util/cache.h>
#include "llvm.h"
#include "tests.h"
#include "debug.h"
#include "util.h"
Include dependency graph for llvm.c:

Go to the source code of this file.

Functions

static int test__bpf_parsing (void *obj_buf __maybe_unused, size_t obj_buf_sz __maybe_unused)
 
int test_llvm__fetch_bpf_obj (void **p_obj_buf, size_t *p_obj_buf_sz, enum test_llvm__testcase idx, bool force, bool *should_load_fail)
 
int test__llvm (struct test *test __maybe_unused, int subtest)
 
int test__llvm_subtest_get_nr (void)
 
const char * test__llvm_subtest_get_desc (int subtest)
 

Variables

struct {
   const char *   source
 
   const char *   desc
 
   bool   should_load_fail
 
bpf_source_table [__LLVM_TESTCASE_MAX]
 

Function Documentation

◆ test__bpf_parsing()

static int test__bpf_parsing ( void *obj_buf  __maybe_unused,
size_t obj_buf_sz  __maybe_unused 
)
static

Definition at line 23 of file llvm.c.

◆ test__llvm()

int test__llvm ( struct test *test  __maybe_unused,
int  subtest 
)

Definition at line 136 of file llvm.c.

Here is the call graph for this function:

◆ test__llvm_subtest_get_desc()

const char* test__llvm_subtest_get_desc ( int  subtest)

Definition at line 166 of file llvm.c.

◆ test__llvm_subtest_get_nr()

int test__llvm_subtest_get_nr ( void  )

Definition at line 161 of file llvm.c.

◆ test_llvm__fetch_bpf_obj()

int test_llvm__fetch_bpf_obj ( void **  p_obj_buf,
size_t *  p_obj_buf_sz,
enum test_llvm__testcase  idx,
bool  force,
bool *  should_load_fail 
)

Definition at line 56 of file llvm.c.

Here is the call graph for this function:

Variable Documentation

◆ bpf_source_table

struct { ... } bpf_source_table[__LLVM_TESTCASE_MAX]
Initial value:
= {
.desc = "Basic BPF llvm compile",
},
.desc = "kbuild searching",
},
.desc = "Compile source for BPF prologue generation",
},
.desc = "Compile source for BPF relocation",
.should_load_fail = true,
},
}
const char test_llvm__bpf_base_prog[]
Definition: llvm-src-base.c:2
const char test_llvm__bpf_test_prologue_prog[]
const char test_llvm__bpf_test_kbuild_prog[]
const char test_llvm__bpf_test_relocation[]

◆ desc

const char* desc

Definition at line 33 of file llvm.c.

◆ should_load_fail

bool should_load_fail

Definition at line 34 of file llvm.c.

◆ source

const char* source

Definition at line 32 of file llvm.c.