Home
last modified time | relevance | path

Searched refs:obj_buf (Results 1 – 8 of 8) sorted by relevance

/tools/perf/tests/
Dllvm.c12 static int test__bpf_parsing(void *obj_buf, size_t obj_buf_sz) in test__bpf_parsing() argument
16 obj = bpf_object__open_buffer(obj_buf, obj_buf_sz, NULL); in test__bpf_parsing()
23 static int test__bpf_parsing(void *obj_buf __maybe_unused, in test__bpf_parsing()
139 void *obj_buf = NULL; in test__llvm() local
146 ret = test_llvm__fetch_bpf_obj(&obj_buf, &obj_buf_sz, in test__llvm()
150 ret = test__bpf_parsing(obj_buf, obj_buf_sz); in test__llvm()
156 free(obj_buf); in test__llvm()
Dbpf.c213 prepare_bpf(void *obj_buf, size_t obj_buf_sz, const char *name) in prepare_bpf() argument
217 obj = bpf__prepare_load_buffer(obj_buf, obj_buf_sz, name); in prepare_bpf()
228 void *obj_buf; in __test__bpf() local
232 ret = test_llvm__fetch_bpf_obj(&obj_buf, &obj_buf_sz, in __test__bpf()
235 if (ret != TEST_OK || !obj_buf || !obj_buf_sz) { in __test__bpf()
244 obj = prepare_bpf(obj_buf, obj_buf_sz, in __test__bpf()
286 free(obj_buf); in __test__bpf()
/tools/perf/util/
Dllvm-utils.c395 void llvm__dump_obj(const char *path, void *obj_buf, size_t size) in llvm__dump_obj() argument
422 if (fwrite(obj_buf, size, 1, fp) != 1) in llvm__dump_obj()
434 void *obj_buf = NULL; in llvm__compile_bpf() local
559 err = read_from_pipe(template, &obj_buf, &obj_buf_sz); in llvm__compile_bpf()
577 free(obj_buf); in llvm__compile_bpf()
579 *p_obj_buf = obj_buf; in llvm__compile_bpf()
588 free(obj_buf); in llvm__compile_bpf()
Dllvm-utils.h68 void llvm__dump_obj(const char *path, void *obj_buf, size_t size);
Dbpf-loader.h56 struct bpf_object *bpf__prepare_load_buffer(void *obj_buf, size_t obj_buf_sz,
99 bpf__prepare_load_buffer(void *obj_buf __maybe_unused, in bpf__prepare_load_buffer()
Dbpf-loader.c52 bpf__prepare_load_buffer(void *obj_buf, size_t obj_buf_sz, const char *name) in bpf__prepare_load_buffer() argument
61 obj = bpf_object__open_buffer(obj_buf, obj_buf_sz, name); in bpf__prepare_load_buffer()
81 void *obj_buf; in bpf__prepare_load() local
85 err = perf_clang__compile_bpf(filename, &obj_buf, &obj_buf_sz); in bpf__prepare_load()
89 err = llvm__compile_bpf(filename, &obj_buf, &obj_buf_sz); in bpf__prepare_load()
94 obj = bpf_object__open_buffer(obj_buf, obj_buf_sz, filename); in bpf__prepare_load()
97 llvm__dump_obj(filename, obj_buf, obj_buf_sz); in bpf__prepare_load()
99 free(obj_buf); in bpf__prepare_load()
/tools/lib/bpf/
Dlibbpf.c258 void *obj_buf; member
495 void *obj_buf, in bpf_object__new() argument
521 obj->efile.obj_buf = obj_buf; in bpf_object__new()
553 obj->efile.obj_buf = NULL; in bpf_object__elf_finish()
572 obj->efile.elf = elf_memory(obj->efile.obj_buf, in bpf_object__elf_init()
3613 __bpf_object__open(const char *path, void *obj_buf, size_t obj_buf_sz, in __bpf_object__open() argument
3624 obj = bpf_object__new(path, obj_buf, obj_buf_sz); in __bpf_object__open()
3671 struct bpf_object *bpf_object__open_buffer(void *obj_buf, in bpf_object__open_buffer() argument
3678 if (!obj_buf || obj_buf_sz <= 0) in bpf_object__open_buffer()
3683 (unsigned long)obj_buf, in bpf_object__open_buffer()
[all …]
Dlibbpf.h75 LIBBPF_API struct bpf_object *bpf_object__open_buffer(void *obj_buf,