Re: [PATCH v2 bpf-next 1/3] bpftool: only build bpftool-prog-profile if supported by clang

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2020-03-11 15:18 UTC-0700 ~ Song Liu <songliubraving@xxxxxx>
> bpftoo-prog-profile requires clang to generate BTF for global variables.

Typo: bpftool (missing "l")

> When compared with older clang, skip this command. This is achieved by
> adding a new feature, clang-bpf-global-var, to tools/build/feature.
> 
> Signed-off-by: Song Liu <songliubraving@xxxxxx>

Works great when clang is either too old or missing, thanks!

> diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c
> index 576ddd82bc96..03b1979dfad8 100644
> --- a/tools/bpf/bpftool/prog.c
> +++ b/tools/bpf/bpftool/prog.c
> @@ -1545,6 +1545,8 @@ static int do_loadall(int argc, char **argv)
>  
>  static int do_profile(int argc, char **argv)
>  {
> +	fprintf(stdout, "bpftool prog profile command is not supported.\n"
> +		"Please build bpftool with clang >= 10.0.0\n");

Nit: Can we use p_err() instead of fprintf(), and a single-line error
message please? To remain consistent and work with JSON output.

Thanks,
Quentin



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux