aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r--tools/perf/util/session.h28
1 files changed, 3 insertions, 25 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 0ac14d42dc28..5e47c87b9266 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -15,17 +15,15 @@ struct perf_session {
15 struct perf_header header; 15 struct perf_header header;
16 unsigned long size; 16 unsigned long size;
17 unsigned long mmap_window; 17 unsigned long mmap_window;
18 struct map_groups kmaps;
19 struct rb_root threads; 18 struct rb_root threads;
20 struct thread *last_match; 19 struct thread *last_match;
21 struct map *vmlinux_maps[MAP__NR_TYPES]; 20 struct rb_root kerninfo_root;
22 struct events_stats events_stats; 21 struct events_stats events_stats;
23 struct rb_root stats_by_id; 22 struct rb_root stats_by_id;
24 unsigned long event_total[PERF_RECORD_MAX]; 23 unsigned long event_total[PERF_RECORD_MAX];
25 unsigned long unknown_events; 24 unsigned long unknown_events;
26 struct rb_root hists; 25 struct rb_root hists;
27 u64 sample_type; 26 u64 sample_type;
28 struct ref_reloc_sym ref_reloc_sym;
29 int fd; 27 int fd;
30 bool fd_pipe; 28 bool fd_pipe;
31 int cwdlen; 29 int cwdlen;
@@ -69,33 +67,13 @@ struct map_symbol *perf_session__resolve_callchain(struct perf_session *self,
69 67
70bool perf_session__has_traces(struct perf_session *self, const char *msg); 68bool perf_session__has_traces(struct perf_session *self, const char *msg);
71 69
72int perf_header__read_build_ids(struct perf_header *self, int input, 70int perf_session__set_kallsyms_ref_reloc_sym(struct map **maps,
73 u64 offset, u64 file_size);
74
75int perf_session__set_kallsyms_ref_reloc_sym(struct perf_session *self,
76 const char *symbol_name, 71 const char *symbol_name,
77 u64 addr); 72 u64 addr);
78 73
79void mem_bswap_64(void *src, int byte_size); 74void mem_bswap_64(void *src, int byte_size);
80 75
81static inline int __perf_session__create_kernel_maps(struct perf_session *self, 76int perf_session__create_kernel_maps(struct perf_session *self);
82 struct dso *kernel)
83{
84 return __map_groups__create_kernel_maps(&self->kmaps,
85 self->vmlinux_maps, kernel);
86}
87
88static inline int perf_session__create_kernel_maps(struct perf_session *self)
89{
90 return map_groups__create_kernel_maps(&self->kmaps, self->vmlinux_maps);
91}
92
93static inline struct map *
94 perf_session__new_module_map(struct perf_session *self,
95 u64 start, const char *filename)
96{
97 return map_groups__new_module(&self->kmaps, start, filename);
98}
99 77
100int do_read(int fd, void *buf, size_t size); 78int do_read(int fd, void *buf, size_t size);
101void perf_session__update_sample_type(struct perf_session *self); 79void perf_session__update_sample_type(struct perf_session *self);