All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Song Liu <songliubraving@fb.com>
Cc: Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	"quentin@isovalent.com" <quentin@isovalent.com>,
	Kernel Team <Kernel-team@fb.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"arnaldo.melo@gmail.com" <arnaldo.melo@gmail.com>,
	"jolsa@kernel.org" <jolsa@kernel.org>
Subject: Re: [PATCH v4 bpf-next 0/4] bpftool: introduce prog profile
Date: Fri, 6 Mar 2020 09:51:58 +0100	[thread overview]
Message-ID: <20200306085158.GC248782@krava> (raw)
In-Reply-To: <8855C490-F3E3-4FEB-B59E-C529667BDC30@fb.com>

On Thu, Mar 05, 2020 at 08:03:53PM +0000, Song Liu wrote:

SNIP

> >> 	prog.c:1650:29: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1650 |  __u32 m, cpu, num_cpu = obj->rodata->num_cpu;
> >> 	      |                             ^~
> >> 	prog.c: In function ‘profile_open_perf_events’:
> >> 	prog.c:1810:19: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1810 |   sizeof(int), obj->rodata->num_cpu * obj->rodata->num_metric);
> >> 	      |                   ^~
> >> 	prog.c:1810:42: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1810 |   sizeof(int), obj->rodata->num_cpu * obj->rodata->num_metric);
> >> 	      |                                          ^~
> >> 	prog.c:1825:26: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1825 |   for (cpu = 0; cpu < obj->rodata->num_cpu; cpu++) {
> >> 	      |                          ^~
> >> 	prog.c: In function ‘do_profile’:
> >> 	prog.c:1904:13: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1904 |  profile_obj->rodata->num_cpu = num_cpu;
> >> 	      |             ^~
> >> 	prog.c:1905:13: error: ‘struct profiler_bpf’ has no member named ‘rodata’
> >> 	 1905 |  profile_obj->rodata->num_metric = num_metric;
> >> 	      |             ^~
> >> 	make: *** [Makefile:129: prog.o] Error 1
> > 
> > I guess you need a newer version of clang that supports global data in BPF programs. 
> 
> Hi Jiri,
> 
> Have you got chance to test this with latest clang? 

yep, got it compiled with new clang

I was testing in on bpftrace programs and couldn't made it work,
because it relies on BTF info.. so I got stuck ;-)

  # bpftool prog profile id 241 duration 3 cycles instructions llc_misses
  Error: prog FD 3 doesn't have valid btf

nit.. ^^^ you could display ID instead of FD in here

I need to check if we can provide BTF info for bpftrace programs

jirka


  reply	other threads:[~2020-03-06  8:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04 18:07 [PATCH v4 bpf-next 0/4] bpftool: introduce prog profile Song Liu
2020-03-04 18:07 ` [PATCH v4 bpf-next 1/4] bpftool: introduce "prog profile" command Song Liu
2020-03-04 19:21   ` Jiri Olsa
2020-03-04 21:17     ` Song Liu
2020-03-04 20:38   ` Jiri Olsa
2020-03-05 20:03     ` Song Liu
2020-03-04 18:07 ` [PATCH v4 bpf-next 2/4] bpftool: Documentation for bpftool prog profile Song Liu
2020-03-04 18:07 ` [PATCH v4 bpf-next 3/4] bpftool: bash completion for "bpftool prog profile" Song Liu
2020-03-04 18:07 ` [PATCH v4 bpf-next 4/4] bpftool: fix typo in bash-completion Song Liu
2020-03-04 19:08 ` [PATCH v4 bpf-next 0/4] bpftool: introduce prog profile Jiri Olsa
2020-03-04 20:41   ` Jiri Olsa
2020-03-04 21:16     ` Song Liu
2020-03-04 21:29       ` Jiri Olsa
2020-03-04 21:39         ` Song Liu
2020-03-05 20:03           ` Song Liu
2020-03-06  8:51             ` Jiri Olsa [this message]
2020-03-09 18:04           ` Quentin Monnet
2020-03-09 18:24             ` Song Liu
2020-03-09 19:30               ` Jiri Olsa
2020-03-04 19:13 ` 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=20200306085158.GC248782@krava \
    --to=jolsa@redhat.com \
    --cc=Kernel-team@fb.com \
    --cc=arnaldo.melo@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=jolsa@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=quentin@isovalent.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.