[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6211135B-6A7F-443A-9444-27F61C56A437@fb.com>
Date: Fri, 15 Mar 2019 19:31:45 +0000
From: Song Liu <songliubraving@...com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
CC: "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
Networking <netdev@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Kernel Team <Kernel-team@...com>,
Peter Zijlstra <peterz@...radead.org>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
"Jiri Olsa" <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
"sdf@...ichev.me" <sdf@...ichev.me>
Subject: Re: [PATCH v9 perf,bpf 09/15] perf, bpf: save btf information as
headers to perf.data
Sorry for replying from the phone.
Sent from my iPhone
> On Mar 15, 2019, at 12:26 PM, Arnaldo Carvalho de Melo <arnaldo.melo@...il.com> wrote:
>
> Em Fri, Mar 15, 2019 at 04:06:51PM -0300, Arnaldo Carvalho de Melo escreveu:
>> And yes, there are BPF programs with BTF information associated:
>
>> [root@...co perf]# bpftool map dump pids_filtered
>> [{
>> "key": 2592,
>> "value": true
>> },{
>> "key": 20511,
>> "value": true
>> }
>> ]
>> [root@...co perf]#
>
>> I.e. bpftool can find the BTF info and thus is able to show the
>> 'pids_filtered' map keys and values pretty printed, not just as hex raw
>> data.
>
>> I'm trying to find out why 'bpftool map dump' finds the BTF info while
>> perf_event__synthesize_one_bpf_prog() doesn't.
>
> Humm, the BTF info above is for BPF _maps_ not for _programs_, I think
> you haven't added BTF info for maps in the perf.data header, right?
>
> - Arnaldo
That’s right. We iterate all BPF programs, and fetch BTF referred by the programs.
Thanks,
Song
Powered by blists - more mailing lists