aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-01-27 06:02:41 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-02-06 08:00:38 -0500
commit9f4e8ff27a807dd6919faa0ecb2a152c57cfa5b2 (patch)
tree742f609ad5a892ddbbd3f1f9e0b99a1ea485813c
parent7b644f9ad18f74aeac42360bee9c4c1cf874f4c0 (diff)
perf symbols: Introduce map_symbol.h
To allow headers just wanting this definition to be able to get it without all the things in symbol.h, to reduce the include dep tree. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-l32z2qyhs6fe8unf4gk2ead2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/callchain.h2
-rw-r--r--tools/perf/util/hist.h1
-rw-r--r--tools/perf/util/map_symbol.h22
-rw-r--r--tools/perf/util/sort.h3
-rw-r--r--tools/perf/util/symbol.h14
5 files changed, 27 insertions, 15 deletions
diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h
index b6f18c2d4b14..80e056a3d882 100644
--- a/tools/perf/util/callchain.h
+++ b/tools/perf/util/callchain.h
@@ -5,7 +5,7 @@
5#include <linux/list.h> 5#include <linux/list.h>
6#include <linux/rbtree.h> 6#include <linux/rbtree.h>
7#include "event.h" 7#include "event.h"
8#include "symbol.h" 8#include "map_symbol.h"
9#include "branch.h" 9#include "branch.h"
10 10
11struct map; 11struct map;
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 08267af7439c..f50aad24928e 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -8,6 +8,7 @@
8#include "evsel.h" 8#include "evsel.h"
9#include "header.h" 9#include "header.h"
10#include "color.h" 10#include "color.h"
11#include "symbol.h"
11#include "ui/progress.h" 12#include "ui/progress.h"
12 13
13struct hist_entry; 14struct hist_entry;
diff --git a/tools/perf/util/map_symbol.h b/tools/perf/util/map_symbol.h
new file mode 100644
index 000000000000..5a1aed9f6bb4
--- /dev/null
+++ b/tools/perf/util/map_symbol.h
@@ -0,0 +1,22 @@
1// SPDX-License-Identifier: GPL-2.0
2#ifndef __PERF_MAP_SYMBOL
3#define __PERF_MAP_SYMBOL 1
4
5#include <linux/types.h>
6
7struct map;
8struct symbol;
9
10struct map_symbol {
11 struct map *map;
12 struct symbol *sym;
13};
14
15struct addr_map_symbol {
16 struct map *map;
17 struct symbol *sym;
18 u64 addr;
19 u64 al_addr;
20 u64 phys_addr;
21};
22#endif // __PERF_MAP_SYMBOL
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index dd6312876492..2fbee0b1011c 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -9,7 +9,8 @@
9#include <linux/list.h> 9#include <linux/list.h>
10#include "cache.h" 10#include "cache.h"
11#include <linux/rbtree.h> 11#include <linux/rbtree.h>
12#include "symbol.h" 12#include "map_symbol.h"
13#include "symbol_conf.h"
13#include "string.h" 14#include "string.h"
14#include "callchain.h" 15#include "callchain.h"
15#include "values.h" 16#include "values.h"
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 56e2bcb907cc..9a8fe012910a 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -8,6 +8,7 @@
8#include <linux/list.h> 8#include <linux/list.h>
9#include <linux/rbtree.h> 9#include <linux/rbtree.h>
10#include <stdio.h> 10#include <stdio.h>
11#include "map_symbol.h"
11#include "branch.h" 12#include "branch.h"
12#include "path.h" 13#include "path.h"
13#include "symbol_conf.h" 14#include "symbol_conf.h"
@@ -115,19 +116,6 @@ struct ref_reloc_sym {
115 u64 unrelocated_addr; 116 u64 unrelocated_addr;
116}; 117};
117 118
118struct map_symbol {
119 struct map *map;
120 struct symbol *sym;
121};
122
123struct addr_map_symbol {
124 struct map *map;
125 struct symbol *sym;
126 u64 addr;
127 u64 al_addr;
128 u64 phys_addr;
129};
130
131struct branch_info { 119struct branch_info {
132 struct addr_map_symbol from; 120 struct addr_map_symbol from;
133 struct addr_map_symbol to; 121 struct addr_map_symbol to;