Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf symbols: Move mem_info and branch_info out of symbol.h

The mem_info struct goes to mem-events.h and branch_info goes to
branch.h, where they belong, this way we can remove several headers from
symbols.h and trim the include dependency tree more.

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-aupw71xnravcsu2xoabfmhpc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+47 -19
+1
tools/perf/arch/powerpc/util/mem-events.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #include "map_symbol.h" 2 3 #include "mem-events.h" 3 4 4 5 /* PowerPC does not support 'ldlat' parameter. */
+2
tools/perf/builtin-annotate.c
··· 33 33 #include "util/data.h" 34 34 #include "arch/common.h" 35 35 #include "util/block-range.h" 36 + #include "util/map_symbol.h" 37 + #include "util/branch.h" 36 38 37 39 #include <dlfcn.h> 38 40 #include <errno.h>
+1
tools/perf/builtin-c2c.c
··· 22 22 #include "builtin.h" 23 23 #include <subcmd/pager.h> 24 24 #include <subcmd/parse-options.h> 25 + #include "map_symbol.h" 25 26 #include "mem-events.h" 26 27 #include "session.h" 27 28 #include "hist.h"
+1
tools/perf/builtin-mem.c
··· 11 11 #include "util/tool.h" 12 12 #include "util/session.h" 13 13 #include "util/data.h" 14 + #include "util/map_symbol.h" 14 15 #include "util/mem-events.h" 15 16 #include "util/debug.h" 16 17 #include "util/dso.h"
+3
tools/perf/builtin-report.c
··· 19 19 #include <linux/zalloc.h> 20 20 #include "util/map.h" 21 21 #include "util/symbol.h" 22 + #include "util/map_symbol.h" 23 + #include "util/mem-events.h" 24 + #include "util/branch.h" 22 25 #include "util/callchain.h" 23 26 #include "util/values.h" 24 27
+1 -1
tools/perf/builtin-version.c
··· 2 2 #include "builtin.h" 3 3 #include "perf.h" 4 4 #include "color.h" 5 - #include <linux/compiler.h> 6 5 #include <tools/config.h> 6 + #include <stdbool.h> 7 7 #include <stdio.h> 8 8 #include <string.h> 9 9 #include <subcmd/parse-options.h>
+1
tools/perf/tests/mem.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #include "util/map_symbol.h" 2 3 #include "util/mem-events.h" 3 4 #include "util/symbol.h" 4 5 #include "linux/perf_event.h"
+1
tools/perf/tests/sample-parsing.c
··· 7 7 #include <linux/kernel.h> 8 8 #include <linux/types.h> 9 9 10 + #include "map_symbol.h" 10 11 #include "branch.h" 11 12 #include "util.h" 12 13 #include "event.h"
+2
tools/perf/ui/browsers/hists.c
··· 20 20 #include "../../util/hist.h" 21 21 #include "../../util/map.h" 22 22 #include "../../util/symbol.h" 23 + #include "../../util/map_symbol.h" 24 + #include "../../util/branch.h" 23 25 #include "../../util/pstack.h" 24 26 #include "../../util/sort.h" 25 27 #include "../../util/top.h"
+1
tools/perf/util/branch.c
··· 1 1 #include "util/util.h" 2 2 #include "util/debug.h" 3 + #include "util/map_symbol.h" 3 4 #include "util/branch.h" 4 5 #include <linux/kernel.h> 5 6
+8
tools/perf/util/branch.h
··· 16 16 u64 reserved:40; 17 17 }; 18 18 19 + struct branch_info { 20 + struct addr_map_symbol from; 21 + struct addr_map_symbol to; 22 + struct branch_flags flags; 23 + char *srcline_from; 24 + char *srcline_to; 25 + }; 26 + 19 27 struct branch_entry { 20 28 u64 from; 21 29 u64 to;
+2
tools/perf/util/cs-etm.c
··· 28 28 #include "map.h" 29 29 #include "perf.h" 30 30 #include "session.h" 31 + #include "map_symbol.h" 32 + #include "branch.h" 31 33 #include "symbol.h" 32 34 #include "tool.h" 33 35 #include "thread.h"
+3
tools/perf/util/hist.c
··· 5 5 #include "build-id.h" 6 6 #include "hist.h" 7 7 #include "map.h" 8 + #include "map_symbol.h" 9 + #include "branch.h" 10 + #include "mem-events.h" 8 11 #include "session.h" 9 12 #include "namespaces.h" 10 13 #include "sort.h"
+3
tools/perf/util/machine.c
··· 13 13 #include "hist.h" 14 14 #include "machine.h" 15 15 #include "map.h" 16 + #include "map_symbol.h" 17 + #include "branch.h" 18 + #include "mem-events.h" 16 19 #include "srcline.h" 17 20 #include "symbol.h" 18 21 #include "sort.h"
+1
tools/perf/util/map.c
··· 10 10 #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ 11 11 #include "dso.h" 12 12 #include "map.h" 13 + #include "map_symbol.h" 13 14 #include "thread.h" 14 15 #include "vdso.h" 15 16 #include "build-id.h"
+1
tools/perf/util/mem-events.c
··· 8 8 #include <unistd.h> 9 9 #include <api/fs/fs.h> 10 10 #include <linux/kernel.h> 11 + #include "map_symbol.h" 11 12 #include "mem-events.h" 12 13 #include "debug.h" 13 14 #include "symbol.h"
+9
tools/perf/util/mem-events.h
··· 6 6 #include <stdint.h> 7 7 #include <stdio.h> 8 8 #include <linux/types.h> 9 + #include <linux/refcount.h> 10 + #include <linux/perf_event.h> 9 11 #include "stat.h" 10 12 11 13 struct perf_mem_event { ··· 16 14 const char *tag; 17 15 const char *name; 18 16 const char *sysfs_name; 17 + }; 18 + 19 + struct mem_info { 20 + struct addr_map_symbol iaddr; 21 + struct addr_map_symbol daddr; 22 + union perf_mem_data_src data_src; 23 + refcount_t refcnt; 19 24 }; 20 25 21 26 enum {
-1
tools/perf/util/s390-sample-raw.c
··· 25 25 #include "util.h" 26 26 #include "session.h" 27 27 #include "evlist.h" 28 - #include "config.h" 29 28 #include "color.h" 30 29 #include "sample-raw.h" 31 30 #include "s390-cpumcf-kernel.h"
+2
tools/perf/util/session.c
··· 12 12 #include <sys/mman.h> 13 13 #include <perf/cpumap.h> 14 14 15 + #include "map_symbol.h" 16 + #include "branch.h" 15 17 #include "debug.h" 16 18 #include "evlist.h" 17 19 #include "evsel.h"
+2
tools/perf/util/sort.c
··· 13 13 #include "comm.h" 14 14 #include "map.h" 15 15 #include "symbol.h" 16 + #include "map_symbol.h" 17 + #include "branch.h" 16 18 #include "thread.h" 17 19 #include "evsel.h" 18 20 #include "evlist.h"
+2
tools/perf/util/symbol.c
··· 25 25 #include "machine.h" 26 26 #include "map.h" 27 27 #include "symbol.h" 28 + #include "map_symbol.h" 29 + #include "mem-events.h" 28 30 #include "symsrc.h" 29 31 #include "strlist.h" 30 32 #include "intlist.h"
-17
tools/perf/util/symbol.h
··· 9 9 #include <linux/list.h> 10 10 #include <linux/rbtree.h> 11 11 #include <stdio.h> 12 - #include "map_symbol.h" 13 - #include "branch.h" 14 12 #include "path.h" 15 13 #include "symbol_conf.h" 16 14 ··· 103 105 const char *name; 104 106 u64 addr; 105 107 u64 unrelocated_addr; 106 - }; 107 - 108 - struct branch_info { 109 - struct addr_map_symbol from; 110 - struct addr_map_symbol to; 111 - struct branch_flags flags; 112 - char *srcline_from; 113 - char *srcline_to; 114 - }; 115 - 116 - struct mem_info { 117 - struct addr_map_symbol iaddr; 118 - struct addr_map_symbol daddr; 119 - union perf_mem_data_src data_src; 120 - refcount_t refcnt; 121 108 }; 122 109 123 110 struct block_info {