From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Song Liu <songliubraving@fb.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 16:52:03 -0300 [thread overview]
Message-ID: <20190110195203.GP22483@kernel.org> (raw)
In-Reply-To: <CCB26BF8-9FF5-4BBF-84BE-878CF0D3882A@fb.com>
Em Thu, Jan 10, 2019 at 07:30:22PM +0000, Song Liu escreveu:
>
>
> > 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
Thanks! I'm juggling a lot of stuff right now, so I didn't read all
patches in the series, just the first one and when I couldn't find where
perf_event_ksymbol() was being called in that patch nor by looking at
just the Subject for the others, I gave up and got back to pahole day :-)
> >> 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.
With that 3/7 split I guess we can go on with what is in this patchset
if PeterZ is happy with it.
- Arnaldo
next prev parent reply other threads:[~2019-01-10 19:52 UTC|newest]
Thread overview: 30+ 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 ` Song Liu
2019-01-09 19:21 ` [PATCH v6 perf, bpf-next 1/7] perf, bpf: Introduce PERF_RECORD_KSYMBOL Song Liu
2019-01-09 19:21 ` Song Liu
2019-01-10 18:24 ` Arnaldo Carvalho de Melo
2019-01-10 18:24 ` Arnaldo Carvalho de Melo
2019-01-10 18:40 ` Song Liu
2019-01-10 18:40 ` Song Liu
2019-01-10 18:55 ` Arnaldo Carvalho de Melo
2019-01-10 18:55 ` Arnaldo Carvalho de Melo
2019-01-10 19:30 ` Song Liu
2019-01-10 19:30 ` Song Liu
2019-01-10 19:45 ` Song Liu
2019-01-10 19:45 ` Song Liu
2019-01-11 1:05 ` David Ahern
2019-01-11 1:05 ` David Ahern
2019-01-10 19:52 ` Arnaldo Carvalho de Melo [this message]
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 ` 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-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 ` 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 ` 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 ` 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=20190110195203.GP22483@kernel.org \
--to=acme@kernel.org \
--cc=Kernel-team@fb.com \
--cc=ast@kernel.org \
--cc=daniel@iogearbox.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.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).