perf annotate: __symbol__acount_cycles doesn't need notes
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 24 May 2018 18:20:18 +0000 (15:20 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Jun 2018 13:28:51 +0000 (10:28 -0300)
It only operates on the notes->src->cyc_hist, just pass that to it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-zd1cu4zwmu21k0cxlr83y6vr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c

index 0f5ed60..a7221f9 100644 (file)
@@ -741,14 +741,11 @@ void symbol__annotate_zero_histograms(struct symbol *sym)
        pthread_mutex_unlock(&notes->lock);
 }
 
-static int __symbol__account_cycles(struct annotation *notes,
+static int __symbol__account_cycles(struct cyc_hist *ch,
                                    u64 start,
                                    unsigned offset, unsigned cycles,
                                    unsigned have_start)
 {
-       struct cyc_hist *ch;
-
-       ch = notes->src->cycles_hist;
        /*
         * For now we can only account one basic block per
         * final jump. But multiple could be overlapping.
@@ -870,7 +867,7 @@ static int symbol__account_cycles(u64 addr, u64 start,
                        start = 0;
        }
        offset = addr - sym->start;
-       return __symbol__account_cycles(notes,
+       return __symbol__account_cycles(notes->src->cycles_hist,
                                        start ? start - sym->start : 0,
                                        offset, cycles,
                                        !!start);