perf annotate: Adopt methods from hists
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 18 Dec 2013 20:10:15 +0000 (17:10 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 19 Dec 2013 14:34:27 +0000 (11:34 -0300)
Those are just wrappers to annotation methods, so move them to
annotate.c

Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-336h7z0bi2k51cbfi6mkpo5k@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/annotate.c
tools/perf/util/annotate.h
tools/perf/util/hist.c
tools/perf/util/hist.h

index 2812e7b78d0f3757180e17ede30d40ea3e4d5254..91e25269bb2774c2702ba638e2891df63e0099e2 100644 (file)
@@ -508,6 +508,11 @@ int addr_map_symbol__inc_samples(struct addr_map_symbol *ams, int evidx)
        return symbol__inc_addr_samples(ams->sym, ams->map, evidx, ams->al_addr);
 }
 
+int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 ip)
+{
+       return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip);
+}
+
 static void disasm_line__init_ins(struct disasm_line *dl)
 {
        dl->ins = ins__find(dl->name);
@@ -1393,3 +1398,8 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
 
        return 0;
 }
+
+int hist_entry__annotate(struct hist_entry *he, size_t privsize)
+{
+       return symbol__annotate(he->ms.sym, he->ms.map, privsize);
+}
index 8de10b1ef0273e7b81c5c179145f0b40709374ba..43727a9b93cd0d678f6161b4f9c45f968085184e 100644 (file)
@@ -137,10 +137,15 @@ int symbol__inc_addr_samples(struct symbol *sym, struct map *map,
 
 int addr_map_symbol__inc_samples(struct addr_map_symbol *ams, int evidx);
 
+int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 addr);
+
 int symbol__alloc_hist(struct symbol *sym);
 void symbol__annotate_zero_histograms(struct symbol *sym);
 
 int symbol__annotate(struct symbol *sym, struct map *map, size_t privsize);
+
+int hist_entry__annotate(struct hist_entry *he, size_t privsize);
+
 int symbol__annotate_init(struct map *map __maybe_unused, struct symbol *sym);
 int symbol__annotate_printf(struct symbol *sym, struct map *map,
                            struct perf_evsel *evsel, bool full_paths,
index 63234e37583cc61abb3ea0a38bafd187d648a0e3..6cd4823a7a8bed9781d1f81a1affe76a0011798d 100644 (file)
@@ -1,4 +1,3 @@
-#include "annotate.h"
 #include "util.h"
 #include "build-id.h"
 #include "hist.h"
@@ -807,16 +806,6 @@ void hists__filter_by_symbol(struct hists *hists)
        }
 }
 
-int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 ip)
-{
-       return symbol__inc_addr_samples(he->ms.sym, he->ms.map, evidx, ip);
-}
-
-int hist_entry__annotate(struct hist_entry *he, size_t privsize)
-{
-       return symbol__annotate(he->ms.sym, he->ms.map, privsize);
-}
-
 void events_stats__inc(struct events_stats *stats, u32 type)
 {
        ++stats->nr_events[0];
index b621347a1585db4a469b8a08d10acb107406c20f..a59743fa3ef73d3aeb8c5c832a32aa2e04773a4c 100644 (file)
@@ -111,9 +111,6 @@ size_t events_stats__fprintf(struct events_stats *stats, FILE *fp);
 size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
                      int max_cols, float min_pcnt, FILE *fp);
 
-int hist_entry__inc_addr_samples(struct hist_entry *he, int evidx, u64 addr);
-int hist_entry__annotate(struct hist_entry *he, size_t privsize);
-
 void hists__filter_by_dso(struct hists *hists);
 void hists__filter_by_thread(struct hists *hists);
 void hists__filter_by_symbol(struct hists *hists);