Re: [PATCH v3 perf,bpf 10/11] perf, bpf: enable annotation of bpf program

2019-02-17 Thread Jiri Olsa
On Fri, Feb 15, 2019 at 01:53:53PM -0800, Song Liu wrote: SNIP > int machine__process_bpf_event(struct machine *machine __maybe_unused, > union perf_event *event, > struct perf_sample *sample __maybe_unused) > { > if (dump_trace) >

Re: [PATCH v3 perf,bpf 10/11] perf, bpf: enable annotation of bpf program

2019-02-17 Thread Jiri Olsa
On Fri, Feb 15, 2019 at 01:53:53PM -0800, Song Liu wrote: > This patch enables the annotation of bpf program. > > A new dso type DSO_BINARY_TYPE__BPF_PROG_INFO is introduced to for BPF > programs. In symbol__disassemble(), DSO_BINARY_TYPE__BPF_PROG_INFO dso > calls into a new function symbol__disa

Re: [PATCH v3 perf,bpf 10/11] perf, bpf: enable annotation of bpf program

2019-02-17 Thread Jiri Olsa
On Fri, Feb 15, 2019 at 01:53:53PM -0800, Song Liu wrote: SNIP > +static int symbol__disassemble_bpf(struct symbol *sym, > +struct annotate_args *args) > +{ > + struct annotation *notes = symbol__annotation(sym); > + struct annotation_options *opts = args->

Re: [PATCH v3 perf,bpf 10/11] perf, bpf: enable annotation of bpf program

2019-02-17 Thread Jiri Olsa
On Fri, Feb 15, 2019 at 01:53:53PM -0800, Song Liu wrote: SNIP > diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c > index 52507435c464..6c363adc781a 100644 > --- a/tools/perf/util/bpf-event.c > +++ b/tools/perf/util/bpf-event.c > @@ -25,12 +25,60 @@ static int snprintf_hex(c

Re: [PATCH v3 perf,bpf 10/11] perf, bpf: enable annotation of bpf program

2019-02-17 Thread Jiri Olsa
On Fri, Feb 15, 2019 at 01:53:53PM -0800, Song Liu wrote: SNIP > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c > index 70de8f6b3aee..078017d31ca9 100644 > --- a/tools/perf/util/annotate.c > +++ b/tools/perf/util/annotate.c > @@ -22,6 +22,7 @@ > #include "annotate.h" > #in