From: Song Liu <songliubraving@fb.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
David Ahern <dsahern@gmail.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"ast@kernel.org" <ast@kernel.org>,
"daniel@iogearbox.net" <daniel@iogearbox.net>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH v6 perf, bpf-next 1/7] perf, bpf: Introduce PERF_RECORD_KSYMBOL
Date: Thu, 10 Jan 2019 19:45:09 +0000 [thread overview]
Message-ID: <E220DFC6-A2E2-4B3A-B52B-3B194315D2A0@fb.com> (raw)
In-Reply-To: <CCB26BF8-9FF5-4BBF-84BE-878CF0D3882A@fb.com>
> On Jan 10, 2019, at 11:30 AM, Song Liu <songliubraving@fb.com> wrote:
>
>
>
>> On Jan 10, 2019, at 10:55 AM, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>>
>> Em Thu, Jan 10, 2019 at 06:40:37PM +0000, Song Liu escreveu:
>>>
>>>
>>>> On Jan 10, 2019, at 10:24 AM, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>>>>
>>>> Em Wed, Jan 09, 2019 at 11:21:05AM -0800, Song Liu escreveu:
>>>>> For better performance analysis of dynamically JITed and loaded kernel
>>>>> functions, such as BPF programs, this patch introduces
>>>>> PERF_RECORD_KSYMBOL, a new perf_event_type that exposes kernel symbol
>>>>> register/unregister information to user space.
>>>>>
>>>>> The following data structure is used for PERF_RECORD_KSYMBOL.
>>>>>
>>>>> /*
>>>>> * struct {
>>>>> * struct perf_event_header header;
>>>>> * u64 addr;
>>>>> * u32 len;
>>>>> * u16 ksym_type;
>>>>> * u16 flags;
>>>>> * char name[];
>>>>> * struct sample_id sample_id;
>>>>> * };
>>>>> */
>>>>
>>>> So, I couldn't find where this gets used, the intention here is just to
>>>> add the interfaces and afterwards is that you will wire this up? I would
>>>> like to test the whole shebang to see it working.
>>>
>>> I guess you meant PERF_RECORD_BPF_EVENT not being used?
>>>
>>> PERF_RECORD_KSYMBOL is used by BPF in 3/7 and 5/7. I tested
>>
>> Oops, I didn't look at 3/7, just read its cset summary line and as it
>> says:
>>
>> Subject: [PATCH v6 perf, bpf-next 3/7] perf, bpf: introduce PERF_RECORD_BPF_EVENT
>>
>> I didn't thought it was related, perhaps break it down into one that
>> states that it is wiring up PERF_RECORD_KSYMBOL, and at that point we
>> could just test it, getting the notifications for new kallsyms related
>> to BPF?
>
> Good idea! I will split it into two patches as:
>
> [3/8] perf, bpf: generate PERF_RECORD_KSYMBOL for BPF program
> [4/8] perf, bpf: introduce PERF_RECORD_BPF_EVENT
>
>>
>>> PERF_RECORD_BPF_EVENT with dump_trace. As we separate RECORD_KSYMBOL from
>>> RECORD_BPF_EVENT, user space won't use BPF_EVENT until annotation support.
>>
>> Right, so why not just introduce PERF_RECORD_KSYMBOL, make it be used by
>> tooling, etc, then move on to PERF_RECORD_BPF_EVENT?
>
> I'd like to make sure we all agree on the new ABI for RECORD_KSYMBOL and
> RECORD_BPF_EVENT. Multiple user space tools dependent on RECORD_BPF_EVENT,
> for example, bcc and auditing. Finalizing RECORD_BPF_EVENT will unblock the
> development of these tools. On perf side, it will take us quite some time
> to finish annotation. Ideally, I don't want to block the development of
> other tools for so long.
>
> Thanks,
> Song
+ DavidA
Hi David,
Could you please share your feedback on PERF_RECORD_BPF_EVENT for auditing
use cases?
Thanks,
Song
next prev parent reply other threads:[~2019-01-10 19:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-09 19:21 [PATCH v6 perf, bpf-next 0/7] reveal invisible bpf programs Song Liu
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 1/7] perf, bpf: Introduce PERF_RECORD_KSYMBOL Song Liu
2019-01-10 18:24 ` Arnaldo Carvalho de Melo
2019-01-10 18:40 ` Song Liu
2019-01-10 18:55 ` Arnaldo Carvalho de Melo
2019-01-10 19:30 ` Song Liu
2019-01-10 19:45 ` Song Liu [this message]
2019-01-11 1:05 ` David Ahern
2019-01-10 19:52 ` Arnaldo Carvalho de Melo
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 2/7] sync tools/include/uapi/linux/perf_event.h Song Liu
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 3/7] perf, bpf: introduce PERF_RECORD_BPF_EVENT Song Liu
2019-01-10 3:06 ` Alexei Starovoitov
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 4/7] sync tools/include/uapi/linux/perf_event.h Song Liu
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 5/7] perf util: handle PERF_RECORD_KSYMBOL Song Liu
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 6/7] perf util: handle PERF_RECORD_BPF_EVENT Song Liu
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 7/7] perf tools: synthesize PERF_RECORD_* for loaded BPF programs Song Liu
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=E220DFC6-A2E2-4B3A-B52B-3B194315D2A0@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=acme@kernel.org \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
/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).