Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-04-23 Thread Yonghong Song
Hi, Peter, I have a question regarding to one of your comments below. On 3/12/18 3:01 PM, Peter Zijlstra wrote: On Mon, Mar 12, 2018 at 01:39:56PM -0700, Song Liu wrote: +static void stack_map_get_build_id_offset(struct bpf_map *map, + struct

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-13 Thread Song Liu
> On Mar 12, 2018, at 3:47 PM, Song Liu wrote: > > > >> On Mar 12, 2018, at 2:31 PM, Alexei Starovoitov wrote: >> >> On 3/12/18 2:12 PM, Song Liu wrote: >>> On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: On 3/12/18

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-13 Thread kbuild test robot
Hi Song, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [also build test WARNING on v4.16-rc5] [cannot apply to linus/master v4.16-rc4 v4.16-rc3 v4.16-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Song Liu
> On Mar 12, 2018, at 2:31 PM, Alexei Starovoitov wrote: > > On 3/12/18 2:12 PM, Song Liu wrote: >> >>> On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: >>> >>> On 3/12/18 1:39 PM, Song Liu wrote: + page = find_get_page(vma->vm_file->f_mapping, 0); >>>

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Peter Zijlstra
On Mon, Mar 12, 2018 at 01:39:56PM -0700, Song Liu wrote: > +static void stack_map_get_build_id_offset(struct bpf_map *map, > + struct stack_map_bucket *bucket, > + u64 *ips, u32 trace_nr) > +{ > + int i; > +

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Alexei Starovoitov
On 3/12/18 2:12 PM, Song Liu wrote: On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: On 3/12/18 1:39 PM, Song Liu wrote: + page = find_get_page(vma->vm_file->f_mapping, 0); did you test it with config_debug_atomic_sleep ? it should have complained... Yeah, I

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Song Liu
> On Mar 12, 2018, at 2:00 PM, Alexei Starovoitov wrote: > > On 3/12/18 1:39 PM, Song Liu wrote: >> +page = find_get_page(vma->vm_file->f_mapping, 0); > > did you test it with config_debug_atomic_sleep ? > it should have complained... Yeah, I have CONFIG_DEBUG_ATOMIC_SLEEP=y.

Re: [PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Alexei Starovoitov
On 3/12/18 1:39 PM, Song Liu wrote: + page = find_get_page(vma->vm_file->f_mapping, 0); did you test it with config_debug_atomic_sleep ? it should have complained...

[PATCH bpf-next v4 1/2] bpf: extend stackmap to save binary_build_id+offset instead of address

2018-03-12 Thread Song Liu
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