Skip to contentSkip to conversation

perf symbols: Move fprintf routines to separate object file

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Apr 16, 2016 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  bfbba189b681c86b9ae380358e5f50ce1e33d240
Gitweb:     http://git.kernel.org/tip/bfbba189b681c86b9ae380358e5f50ce1e33d240
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Thu, 14 Apr 2016 15:54:36 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Thu, 14 Apr 2016 19:46:53 -0300

perf symbols: Move fprintf routines to separate object file

To disentangle symbol printing from all the code related to symbol tables, resolution of addresses to symbols, etc.

---
 tools/perf/util/Build              |  1 +
 tools/perf/util/python-ext-sources |  1 +
 tools/perf/util/symbol.c           | 71 --------------------------------------
 tools/perf/util/symbol.h           |  5 +++
 tools/perf/util/symbol_fprintf.c   | 71 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 78 insertions(+), 71 deletions(-)
tools/perf/util/Build +1 -0
index ea4ac03..6102133 100644
@@ -29,6 +29,7 @@ libperf-y += usage.o
 libperf-y += wrapper.o
 libperf-y += dso.o
 libperf-y += symbol.o
+libperf-y += symbol_fprintf.o
 libperf-y += color.o
 libperf-y += header.o
 libperf-y += callchain.o
tools/perf/util/python-ext-sources +1 -0
index 8162ba0..36c6862 100644
@@ -23,3 +23,4 @@ util/strlist.c
 util/trace-event.c
 ../lib/rbtree.c
 util/string.c
+util/symbol_fprintf.c
tools/perf/util/symbol.c +0 -71

89 lines not on this page · raw message

tools/perf/util/symbol.h +5 -0
index e256256..1da7b10 100644
@@ -140,6 +140,11 @@ struct symbol_conf {
 
 extern struct symbol_conf symbol_conf;
 
+struct symbol_name_rb_node {
+	struct rb_node	rb_node;
+	struct symbol	sym;
+};
+
 static inline int __symbol__join_symfs(char *bf, size_t size, const char *path)
 {
 	return path__join(bf, size, symbol_conf.symfs, path);
tools/perf/util/symbol_fprintf.c new file +71 -0

71 lines not on this page · raw message