perf symbols: Introduce map_symbol.h
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 9f4e8ff27a807dd6919faa0ecb2a152c57cfa5b2 Gitweb: https://git.kernel.org/tip/9f4e8ff27a807dd6919faa0ecb2a152c57cfa5b2 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Sun, 27 Jan 2019 12:02:41 +0100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 6 Feb 2019 10:00:38 -0300
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 <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/util/callchain.h | 2 +- tools/perf/util/hist.h | 1 + tools/perf/util/map_symbol.h | 22 ++++++++++++++++++++++ tools/perf/util/sort.h | 3 ++- tools/perf/util/symbol.h | 14 +------------- 5 files changed, 27 insertions(+), 15 deletions(-)
tools/perf/util/callchain.h +1 -1
@@ -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 ;
tools/perf/util/hist.h +1 -0
@@ -8,6 +8,7 @@#include "evsel.h" #include "header.h" #include "color.h" +#include "symbol.h" #include "ui/progress.h" struct hist_entry ;
tools/perf/util/map_symbol.h new file +22 -0
@@ -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
tools/perf/util/sort.h +2 -1
@@ -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"
tools/perf/util/symbol.h +1 -13
@@ -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;