From: Daniel Borkmann <daniel@iogearbox.net>
To: Song Liu <songliubraving@fb.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"ast@kernel.org" <ast@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>
Cc: Kernel Team <Kernel-team@fb.com>,
"hannes@cmpxchg.org" <hannes@cmpxchg.org>,
Teng Qin <qinteng@fb.com>
Subject: Re: [PATCH bpf-next v6 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address
Date: Wed, 14 Mar 2018 18:39:26 +0100 [thread overview]
Message-ID: <1f960b89-e8ef-7117-ac48-ec9a4159db84@iogearbox.net> (raw)
In-Reply-To: <15D381AB-87EE-4056-A5E1-9BF588710801@fb.com>
On 03/14/2018 06:36 PM, Song Liu wrote:
>> On Mar 14, 2018, at 10:23 AM, Song Liu <songliubraving@fb.com> wrote:
>>
>> Currently, bpf stackmap store address for each entry in the call trace.
>> To map these addresses to user space files, it is necessary to maintain
>> the mapping from these virtual address to symbols in the binary. Usually,
>> the user space profiler (such as perf) has to scan /proc/pid/maps at the
>> beginning of profiling, and monitor mmap2() calls afterwards. Given the
>> cost of maintaining the address map, this solution is not practical for
>> system wide profiling that is always on.
>>
>> This patch tries to solve this problem with a variation of stackmap. This
>> variation is enabled by flag BPF_F_STACK_BUILD_ID. Instead of storing
>> addresses, the variation stores ELF file build_id + offset.
>>
>> Build_id is
>> only meaningful for user stack. If a kernel stack is added to a stackmap
>> with BPF_F_STACK_BUILD_ID, it will automatically fallback to only store
>> ip (status == BPF_STACK_BUILD_ID_IP).
>
> I forgot to delete the paragraph above. Please let me know if I should
> resend (or it can be removed when you apply it).
We can fix it up when applying, no problem.
Thanks,
Daniel
next prev parent reply other threads:[~2018-03-14 17:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-14 17:23 [PATCH bpf-next v6 0/2] bpf stackmap with build_id+offset Song Liu
2018-03-14 17:23 ` [PATCH bpf-next v6 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address Song Liu
2018-03-14 17:36 ` Song Liu
2018-03-14 17:39 ` Daniel Borkmann [this message]
2018-03-14 17:23 ` [PATCH bpf-next v6 2/2] bpf: add selftest for stackmap with BPF_F_STACK_BUILD_ID Song Liu
2018-03-15 0:29 ` [PATCH bpf-next v6 0/2] bpf stackmap with build_id+offset Daniel Borkmann
2018-03-15 0:34 ` 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=1f960b89-e8ef-7117-ac48-ec9a4159db84@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=Kernel-team@fb.com \
--cc=ast@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=qinteng@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox