Messages in this thread | | | From | Hao Luo <> | Date | Wed, 23 Feb 2022 15:40:16 -0800 | Subject | Re: [PATCH bpf-next] bpf: Cache the last valid build_id. |
| |
On Wed, Feb 23, 2022 at 3:16 PM Greg Thelen <gthelen@google.com> wrote: > > Andrii Nakryiko <andrii.nakryiko@gmail.com> wrote: > > > > > as a further optimization, shouldn't we first check if ips[i] is > > within prev_vma and avoid rbtree walk altogether? Would this work: > > > > if (prev_vma && range_in_vma(prev_vma, ips[i])) { > > /* reuse build_id */ > > } > > vma = find_vma(current->mm, ips[i]); > > > > > > ? > > Yes, that's a nice addition. Good idea.
Yes, great point!
I noticed range_in_vma() already has a check on the null-ness of prev_vma. I am going to send a v2.
| |