perf symbols: Move mem_info and branch_info out of symbol.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 30 Aug 2019 18:09:54 +0000 (15:09 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sun, 1 Sep 2019 01:27:48 +0000 (22:27 -0300)
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>
22 files changed:
tools/perf/arch/powerpc/util/mem-events.c
tools/perf/builtin-annotate.c
tools/perf/builtin-c2c.c
tools/perf/builtin-mem.c
tools/perf/builtin-report.c
tools/perf/builtin-version.c
tools/perf/tests/mem.c
tools/perf/tests/sample-parsing.c
tools/perf/ui/browsers/hists.c
tools/perf/util/branch.c
tools/perf/util/branch.h
tools/perf/util/cs-etm.c
tools/perf/util/hist.c
tools/perf/util/machine.c
tools/perf/util/map.c
tools/perf/util/mem-events.c
tools/perf/util/mem-events.h
tools/perf/util/s390-sample-raw.c
tools/perf/util/session.c
tools/perf/util/sort.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h

index d08311f04e95fc7d0ac00226b38b39ec62b31bca..07fb5e049488168de1d91cfd192bee083db1fa3b 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
+#include "map_symbol.h"
 #include "mem-events.h"
 
 /* PowerPC does not support 'ldlat' parameter. */
index 7135b77a18e7fe4afc23af967ac47a27111aecec..4e4d2e76232e254b3436c4c4a320d3ae55437c57 100644 (file)
@@ -33,6 +33,8 @@
 #include "util/data.h"
 #include "arch/common.h"
 #include "util/block-range.h"
+#include "util/map_symbol.h"
+#include "util/branch.h"
 
 #include <dlfcn.h>
 #include <errno.h>
index 0d76b2cb8c0a5f36875773defdfe5fb248486051..b09b12e0976b20fcc14fe829d6c328f54e22178e 100644 (file)
@@ -22,6 +22,7 @@
 #include "builtin.h"
 #include <subcmd/pager.h>
 #include <subcmd/parse-options.h>
+#include "map_symbol.h"
 #include "mem-events.h"
 #include "session.h"
 #include "hist.h"
index c5f3b9e9509dc85833fa7a733ed0ebddae45d442..27d2bde943a8feae760f15a3a29e0d958928a18c 100644 (file)
@@ -11,6 +11,7 @@
 #include "util/tool.h"
 #include "util/session.h"
 #include "util/data.h"
+#include "util/map_symbol.h"
 #include "util/mem-events.h"
 #include "util/debug.h"
 #include "util/dso.h"
index d7a3456679451303c93a1bbc9bf9a620063d51ce..b18fab94d38d11f3d0e58fd59cad08f2a71ac3ba 100644 (file)
@@ -19,6 +19,9 @@
 #include <linux/zalloc.h>
 #include "util/map.h"
 #include "util/symbol.h"
+#include "util/map_symbol.h"
+#include "util/mem-events.h"
+#include "util/branch.h"
 #include "util/callchain.h"
 #include "util/values.h"
 
index bf114ca9ca870ba27bdc8a29d88faecf42895015..05cf2af9e2c271231ed1f75651cc63fde1c01c0d 100644 (file)
@@ -2,8 +2,8 @@
 #include "builtin.h"
 #include "perf.h"
 #include "color.h"
-#include <linux/compiler.h>
 #include <tools/config.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 #include <subcmd/parse-options.h>
index efe3397824d2cd60a2b71201b437babf23747e0a..673a11a6cd1b14bb84003c9a05b674fe9c147575 100644 (file)
@@ -1,4 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0
+#include "util/map_symbol.h"
 #include "util/mem-events.h"
 #include "util/symbol.h"
 #include "linux/perf_event.h"
index 0c09dc15a059b907faea1628eab0eb2812afa856..5fcc06817076dd6a298c4d12554c9ea6d0d453ec 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 
+#include "map_symbol.h"
 #include "branch.h"
 #include "util.h"
 #include "event.h"
index f7e54c16e5947d63867f50ced85b7ec0a5ca657d..589168ca9f62ca7a6dea8fb213a8d857e401c3f5 100644 (file)
@@ -20,6 +20,8 @@
 #include "../../util/hist.h"
 #include "../../util/map.h"
 #include "../../util/symbol.h"
+#include "../../util/map_symbol.h"
+#include "../../util/branch.h"
 #include "../../util/pstack.h"
 #include "../../util/sort.h"
 #include "../../util/top.h"
index 30642e1f2b1b898d6f9078d6c21f29b24df7ef64..9d1e090084a2e18972a8ddb7b92a97a947e62820 100644 (file)
@@ -1,5 +1,6 @@
 #include "util/util.h"
 #include "util/debug.h"
+#include "util/map_symbol.h"
 #include "util/branch.h"
 #include <linux/kernel.h>
 
index 64f96b79f1d71e969ff5909ab3f926b2d2189d2c..06f66dad0b79fefbe9eb4ea248db468491918f74 100644 (file)
@@ -16,6 +16,14 @@ struct branch_flags {
        u64 reserved:40;
 };
 
+struct branch_info {
+       struct addr_map_symbol from;
+       struct addr_map_symbol to;
+       struct branch_flags    flags;
+       char                   *srcline_from;
+       char                   *srcline_to;
+};
+
 struct branch_entry {
        u64                     from;
        u64                     to;
index 0174ecf757d794ae05427f6e42de5e0a6ce1a6a2..707afdbd9529b90715274f4f09dbeed44f45df17 100644 (file)
@@ -28,6 +28,8 @@
 #include "map.h"
 #include "perf.h"
 #include "session.h"
+#include "map_symbol.h"
+#include "branch.h"
 #include "symbol.h"
 #include "tool.h"
 #include "thread.h"
index 0978dc4a33dbb3ef7ff7c9630ad77f368ac44b06..679a1d75090ce10a9652f93479a0f233037ffc92 100644 (file)
@@ -5,6 +5,9 @@
 #include "build-id.h"
 #include "hist.h"
 #include "map.h"
+#include "map_symbol.h"
+#include "branch.h"
+#include "mem-events.h"
 #include "session.h"
 #include "namespaces.h"
 #include "sort.h"
index 6a77aefbe319e03c816c1c579e9e69d8b0ba386c..b4749d3eed08552ce19b304972be1140f3c5c2b5 100644 (file)
@@ -13,6 +13,9 @@
 #include "hist.h"
 #include "machine.h"
 #include "map.h"
+#include "map_symbol.h"
+#include "branch.h"
+#include "mem-events.h"
 #include "srcline.h"
 #include "symbol.h"
 #include "sort.h"
index 623a63cd1eec83b6354640a2cabad53cd7d4ad56..5b83ed1ebbd6bae6c905ab23c6781c84d2d342ea 100644 (file)
@@ -10,6 +10,7 @@
 #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
 #include "dso.h"
 #include "map.h"
+#include "map_symbol.h"
 #include "thread.h"
 #include "vdso.h"
 #include "build-id.h"
index 3a8d38ce3b546b7e05bee76b87856c57930a4084..3d391583f2aecf327eb23569245751b5f7698a43 100644 (file)
@@ -8,6 +8,7 @@
 #include <unistd.h>
 #include <api/fs/fs.h>
 #include <linux/kernel.h>
+#include "map_symbol.h"
 #include "mem-events.h"
 #include "debug.h"
 #include "symbol.h"
index a889ec2fa9f537206f0d4bc33ca4d8bc15ed8685..f1389bdae7bfc31d2a09c213257f37cd7c34bf34 100644 (file)
@@ -6,6 +6,8 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <linux/types.h>
+#include <linux/refcount.h>
+#include <linux/perf_event.h>
 #include "stat.h"
 
 struct perf_mem_event {
@@ -16,6 +18,13 @@ struct perf_mem_event {
        const char      *sysfs_name;
 };
 
+struct mem_info {
+       struct addr_map_symbol  iaddr;
+       struct addr_map_symbol  daddr;
+       union perf_mem_data_src data_src;
+       refcount_t              refcnt;
+};
+
 enum {
        PERF_MEM_EVENTS__LOAD,
        PERF_MEM_EVENTS__STORE,
index 0ddfa7b3e4f20d6b0c6cd8b81cef25faed681236..4d9593e331eaae65453549a882cbfea84153eb57 100644 (file)
@@ -25,7 +25,6 @@
 #include "util.h"
 #include "session.h"
 #include "evlist.h"
-#include "config.h"
 #include "color.h"
 #include "sample-raw.h"
 #include "s390-cpumcf-kernel.h"
index e5ac5f3c94d489161ea4f5aea2f2d4a1310e010b..e9e4a04f15dbab5d1c5162b3523e475043245c84 100644 (file)
@@ -12,6 +12,8 @@
 #include <sys/mman.h>
 #include <perf/cpumap.h>
 
+#include "map_symbol.h"
+#include "branch.h"
 #include "debug.h"
 #include "evlist.h"
 #include "evsel.h"
index b974a2c3a3c5d60ae6ac79ffa1bee19753647751..a2308eb77681771d36aa7c8ec22d522745fa6336 100644 (file)
@@ -13,6 +13,8 @@
 #include "comm.h"
 #include "map.h"
 #include "symbol.h"
+#include "map_symbol.h"
+#include "branch.h"
 #include "thread.h"
 #include "evsel.h"
 #include "evlist.h"
index e5ffe61ad66b3306be4d65e669d7ea65590a4ef2..765c75df29043abaf32964937be302cc567b4fc6 100644 (file)
@@ -25,6 +25,8 @@
 #include "machine.h"
 #include "map.h"
 #include "symbol.h"
+#include "map_symbol.h"
+#include "mem-events.h"
 #include "symsrc.h"
 #include "strlist.h"
 #include "intlist.h"
index 5a58407c2945ed2c9980a182781c1c80f26dda25..0b0c6b5b18999501aecbf4e5c40127c5e532baa7 100644 (file)
@@ -9,8 +9,6 @@
 #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"
 
@@ -107,21 +105,6 @@ struct ref_reloc_sym {
        u64             unrelocated_addr;
 };
 
-struct branch_info {
-       struct addr_map_symbol from;
-       struct addr_map_symbol to;
-       struct branch_flags flags;
-       char                    *srcline_from;
-       char                    *srcline_to;
-};
-
-struct mem_info {
-       struct addr_map_symbol  iaddr;
-       struct addr_map_symbol  daddr;
-       union perf_mem_data_src data_src;
-       refcount_t              refcnt;
-};
-
 struct block_info {
        struct symbol           *sym;
        u64                     start;