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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f2a39fe8
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include "map_symbol.h"
#include "mem-events.h" #include "mem-events.h"
/* PowerPC does not support 'ldlat' parameter. */ /* PowerPC does not support 'ldlat' parameter. */
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#include "util/data.h" #include "util/data.h"
#include "arch/common.h" #include "arch/common.h"
#include "util/block-range.h" #include "util/block-range.h"
#include "util/map_symbol.h"
#include "util/branch.h"
#include <dlfcn.h> #include <dlfcn.h>
#include <errno.h> #include <errno.h>
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "builtin.h" #include "builtin.h"
#include <subcmd/pager.h> #include <subcmd/pager.h>
#include <subcmd/parse-options.h> #include <subcmd/parse-options.h>
#include "map_symbol.h"
#include "mem-events.h" #include "mem-events.h"
#include "session.h" #include "session.h"
#include "hist.h" #include "hist.h"
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "util/tool.h" #include "util/tool.h"
#include "util/session.h" #include "util/session.h"
#include "util/data.h" #include "util/data.h"
#include "util/map_symbol.h"
#include "util/mem-events.h" #include "util/mem-events.h"
#include "util/debug.h" #include "util/debug.h"
#include "util/dso.h" #include "util/dso.h"
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
#include <linux/zalloc.h> #include <linux/zalloc.h>
#include "util/map.h" #include "util/map.h"
#include "util/symbol.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/callchain.h"
#include "util/values.h" #include "util/values.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#include "builtin.h" #include "builtin.h"
#include "perf.h" #include "perf.h"
#include "color.h" #include "color.h"
#include <linux/compiler.h>
#include <tools/config.h> #include <tools/config.h>
#include <stdbool.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <subcmd/parse-options.h> #include <subcmd/parse-options.h>
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include "util/map_symbol.h"
#include "util/mem-events.h" #include "util/mem-events.h"
#include "util/symbol.h" #include "util/symbol.h"
#include "linux/perf_event.h" #include "linux/perf_event.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include "map_symbol.h"
#include "branch.h" #include "branch.h"
#include "util.h" #include "util.h"
#include "event.h" #include "event.h"
......
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include "../../util/hist.h" #include "../../util/hist.h"
#include "../../util/map.h" #include "../../util/map.h"
#include "../../util/symbol.h" #include "../../util/symbol.h"
#include "../../util/map_symbol.h"
#include "../../util/branch.h"
#include "../../util/pstack.h" #include "../../util/pstack.h"
#include "../../util/sort.h" #include "../../util/sort.h"
#include "../../util/top.h" #include "../../util/top.h"
......
#include "util/util.h" #include "util/util.h"
#include "util/debug.h" #include "util/debug.h"
#include "util/map_symbol.h"
#include "util/branch.h" #include "util/branch.h"
#include <linux/kernel.h> #include <linux/kernel.h>
......
...@@ -16,6 +16,14 @@ struct branch_flags { ...@@ -16,6 +16,14 @@ struct branch_flags {
u64 reserved:40; 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 { struct branch_entry {
u64 from; u64 from;
u64 to; u64 to;
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include "map.h" #include "map.h"
#include "perf.h" #include "perf.h"
#include "session.h" #include "session.h"
#include "map_symbol.h"
#include "branch.h"
#include "symbol.h" #include "symbol.h"
#include "tool.h" #include "tool.h"
#include "thread.h" #include "thread.h"
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#include "build-id.h" #include "build-id.h"
#include "hist.h" #include "hist.h"
#include "map.h" #include "map.h"
#include "map_symbol.h"
#include "branch.h"
#include "mem-events.h"
#include "session.h" #include "session.h"
#include "namespaces.h" #include "namespaces.h"
#include "sort.h" #include "sort.h"
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
#include "hist.h" #include "hist.h"
#include "machine.h" #include "machine.h"
#include "map.h" #include "map.h"
#include "map_symbol.h"
#include "branch.h"
#include "mem-events.h"
#include "srcline.h" #include "srcline.h"
#include "symbol.h" #include "symbol.h"
#include "sort.h" #include "sort.h"
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */ #include <uapi/linux/mman.h> /* To get things like MAP_HUGETLB even on older libc headers */
#include "dso.h" #include "dso.h"
#include "map.h" #include "map.h"
#include "map_symbol.h"
#include "thread.h" #include "thread.h"
#include "vdso.h" #include "vdso.h"
#include "build-id.h" #include "build-id.h"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <unistd.h> #include <unistd.h>
#include <api/fs/fs.h> #include <api/fs/fs.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include "map_symbol.h"
#include "mem-events.h" #include "mem-events.h"
#include "debug.h" #include "debug.h"
#include "symbol.h" #include "symbol.h"
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
#include <stdint.h> #include <stdint.h>
#include <stdio.h> #include <stdio.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/refcount.h>
#include <linux/perf_event.h>
#include "stat.h" #include "stat.h"
struct perf_mem_event { struct perf_mem_event {
...@@ -16,6 +18,13 @@ struct perf_mem_event { ...@@ -16,6 +18,13 @@ struct perf_mem_event {
const char *sysfs_name; 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 { enum {
PERF_MEM_EVENTS__LOAD, PERF_MEM_EVENTS__LOAD,
PERF_MEM_EVENTS__STORE, PERF_MEM_EVENTS__STORE,
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "util.h" #include "util.h"
#include "session.h" #include "session.h"
#include "evlist.h" #include "evlist.h"
#include "config.h"
#include "color.h" #include "color.h"
#include "sample-raw.h" #include "sample-raw.h"
#include "s390-cpumcf-kernel.h" #include "s390-cpumcf-kernel.h"
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <perf/cpumap.h> #include <perf/cpumap.h>
#include "map_symbol.h"
#include "branch.h"
#include "debug.h" #include "debug.h"
#include "evlist.h" #include "evlist.h"
#include "evsel.h" #include "evsel.h"
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include "comm.h" #include "comm.h"
#include "map.h" #include "map.h"
#include "symbol.h" #include "symbol.h"
#include "map_symbol.h"
#include "branch.h"
#include "thread.h" #include "thread.h"
#include "evsel.h" #include "evsel.h"
#include "evlist.h" #include "evlist.h"
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include "machine.h" #include "machine.h"
#include "map.h" #include "map.h"
#include "symbol.h" #include "symbol.h"
#include "map_symbol.h"
#include "mem-events.h"
#include "symsrc.h" #include "symsrc.h"
#include "strlist.h" #include "strlist.h"
#include "intlist.h" #include "intlist.h"
......
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include <linux/list.h> #include <linux/list.h>
#include <linux/rbtree.h> #include <linux/rbtree.h>
#include <stdio.h> #include <stdio.h>
#include "map_symbol.h"
#include "branch.h"
#include "path.h" #include "path.h"
#include "symbol_conf.h" #include "symbol_conf.h"
...@@ -107,21 +105,6 @@ struct ref_reloc_sym { ...@@ -107,21 +105,6 @@ struct ref_reloc_sym {
u64 unrelocated_addr; 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 block_info {
struct symbol *sym; struct symbol *sym;
u64 start; u64 start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment