mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
perf bpf: Rename perf_include_dir to libbpf_include_dir
As this is where we expect to find bpf/bpf_helpers.h, etc. This needs more work to make it follow LIBBPF_DYNAMIC=1 usage, i.e. when not using the system libbpf it should use the headers in the in-kernel sources libbpf in tools/lib/bpf. We need to do that anyway to avoid this mixup system libbpf and in-kernel files, so we'll get this sorted out that way. And this also may become moot as we move to using BPF skels for this feature. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -463,7 +463,7 @@ int llvm__compile_bpf(const char *path, void **p_obj_buf,
|
||||
char *pipe_template = NULL;
|
||||
const char *opts = llvm_param.opts;
|
||||
char *command_echo = NULL, *command_out;
|
||||
char *perf_include_dir = system_path(PERF_INCLUDE_DIR);
|
||||
char *libbpf_include_dir = system_path(LIBBPF_INCLUDE_DIR);
|
||||
|
||||
if (path[0] != '-' && realpath(path, abspath) == NULL) {
|
||||
err = errno;
|
||||
@@ -495,7 +495,7 @@ int llvm__compile_bpf(const char *path, void **p_obj_buf,
|
||||
|
||||
snprintf(linux_version_code_str, sizeof(linux_version_code_str),
|
||||
"0x%x", kernel_version);
|
||||
if (asprintf(&perf_bpf_include_opts, "-I%s/", perf_include_dir) < 0)
|
||||
if (asprintf(&perf_bpf_include_opts, "-I%s/", libbpf_include_dir) < 0)
|
||||
goto errout;
|
||||
force_set_env("NR_CPUS", nr_cpus_avail_str);
|
||||
force_set_env("LINUX_VERSION_CODE", linux_version_code_str);
|
||||
@@ -556,7 +556,7 @@ int llvm__compile_bpf(const char *path, void **p_obj_buf,
|
||||
free(kbuild_dir);
|
||||
free(kbuild_include_opts);
|
||||
free(perf_bpf_include_opts);
|
||||
free(perf_include_dir);
|
||||
free(libbpf_include_dir);
|
||||
|
||||
if (!p_obj_buf)
|
||||
free(obj_buf);
|
||||
@@ -572,7 +572,7 @@ errout:
|
||||
free(kbuild_include_opts);
|
||||
free(obj_buf);
|
||||
free(perf_bpf_include_opts);
|
||||
free(perf_include_dir);
|
||||
free(libbpf_include_dir);
|
||||
free(pipe_template);
|
||||
if (p_obj_buf)
|
||||
*p_obj_buf = NULL;
|
||||
|
||||
Reference in New Issue
Block a user