bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Monnet <quentin@isovalent.com>
To: Song Liu <songliubraving@fb.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: john.fastabend@gmail.com, kernel-team@fb.com, ast@kernel.org,
	daniel@iogearbox.net, arnaldo.melo@gmail.com, jolsa@kernel.org
Subject: Re: [PATCH v2 bpf-next 1/3] bpftool: only build bpftool-prog-profile if supported by clang
Date: Thu, 12 Mar 2020 11:46:24 +0000	[thread overview]
Message-ID: <50a4f620-c9ad-d17f-07ee-d7c901cb76ed@isovalent.com> (raw)
In-Reply-To: <20200311221844.3089820-2-songliubraving@fb.com>

2020-03-11 15:18 UTC-0700 ~ Song Liu <songliubraving@fb.com>
> 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@fb.com>

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

  reply	other threads:[~2020-03-12 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 22:18 [PATCH v2 bpf-next 0/3] Fixes for bpftool-prog-profile Song Liu
2020-03-11 22:18 ` [PATCH v2 bpf-next 1/3] bpftool: only build bpftool-prog-profile if supported by clang Song Liu
2020-03-12 11:46   ` Quentin Monnet [this message]
2020-03-11 22:18 ` [PATCH v2 bpf-next 2/3] bpftool: skeleton should depend on libbpf Song Liu
2020-03-12 11:46   ` Quentin Monnet
2020-03-12 12:34     ` Quentin Monnet
2020-03-11 22:18 ` [PATCH v2 bpf-next 3/3] bpftool: add _bpftool and profiler.skel.h to .gitignore Song Liu
2020-03-12 11:47   ` Quentin Monnet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50a4f620-c9ad-d17f-07ee-d7c901cb76ed@isovalent.com \
    --to=quentin@isovalent.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).