perf symbols: Introduce map_symbol.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 27 Jan 2019 11:02:41 +0000 (12:02 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2019 13:00:38 +0000 (10:00 -0300)
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>
tools/perf/util/callchain.h
tools/perf/util/hist.h
tools/perf/util/map_symbol.h [new file with mode: 0644]
tools/perf/util/sort.h
tools/perf/util/symbol.h

index b6f18c2d4b14331c2534c26e32b14fbe1546c71a..80e056a3d882106702563149ffc6d611b0df672f 100644 (file)
@@ -5,7 +5,7 @@
 #include <linux/list.h>
 #include <linux/rbtree.h>
 #include "event.h"
-#include "symbol.h"
+#include "map_symbol.h"
 #include "branch.h"
 
 struct map;
index 08267af7439c8a4b2eccdabff079d390576fe91e..f50aad24928e7e837956c491064718452a28304c 100644 (file)
@@ -8,6 +8,7 @@
 #include "evsel.h"
 #include "header.h"
 #include "color.h"
+#include "symbol.h"
 #include "ui/progress.h"
 
 struct hist_entry;
diff --git a/tools/perf/util/map_symbol.h b/tools/perf/util/map_symbol.h
new file mode 100644 (file)
index 0000000..5a1aed9
--- /dev/null
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef __PERF_MAP_SYMBOL
+#define __PERF_MAP_SYMBOL 1
+
+#include <linux/types.h>
+
+struct map;
+struct symbol;
+
+struct map_symbol {
+       struct map    *map;
+       struct symbol *sym;
+};
+
+struct addr_map_symbol {
+       struct map    *map;
+       struct symbol *sym;
+       u64           addr;
+       u64           al_addr;
+       u64           phys_addr;
+};
+#endif // __PERF_MAP_SYMBOL
index dd63128764924f3f1fb1e43063b8ac798653e42f..2fbee0b1011c6a68d4cafefe9d0fc13d67f9c226 100644 (file)
@@ -9,7 +9,8 @@
 #include <linux/list.h>
 #include "cache.h"
 #include <linux/rbtree.h>
-#include "symbol.h"
+#include "map_symbol.h"
+#include "symbol_conf.h"
 #include "string.h"
 #include "callchain.h"
 #include "values.h"
index 56e2bcb907cc21dc5e9e9671d017e49bb26cb565..9a8fe012910a736d49e2054406bc976c8281115d 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/list.h>
 #include <linux/rbtree.h>
 #include <stdio.h>
+#include "map_symbol.h"
 #include "branch.h"
 #include "path.h"
 #include "symbol_conf.h"
@@ -115,19 +116,6 @@ struct ref_reloc_sym {
        u64             unrelocated_addr;
 };
 
-struct map_symbol {
-       struct map    *map;
-       struct symbol *sym;
-};
-
-struct addr_map_symbol {
-       struct map    *map;
-       struct symbol *sym;
-       u64           addr;
-       u64           al_addr;
-       u64           phys_addr;
-};
-
 struct branch_info {
        struct addr_map_symbol from;
        struct addr_map_symbol to;