diff options
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r-- | tools/perf/util/session.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h index 796e2291ebd..71252723a17 100644 --- a/tools/perf/util/session.h +++ b/tools/perf/util/session.h | |||
@@ -25,7 +25,7 @@ struct perf_session { | |||
25 | unsigned long mmap_window; | 25 | unsigned long mmap_window; |
26 | struct rb_root threads; | 26 | struct rb_root threads; |
27 | struct thread *last_match; | 27 | struct thread *last_match; |
28 | struct rb_root kerninfo_root; | 28 | struct rb_root machines; |
29 | struct events_stats events_stats; | 29 | struct events_stats events_stats; |
30 | struct rb_root stats_by_id; | 30 | struct rb_root stats_by_id; |
31 | unsigned long event_total[PERF_RECORD_MAX]; | 31 | unsigned long event_total[PERF_RECORD_MAX]; |
@@ -102,4 +102,29 @@ int perf_session__browse_hists(struct rb_root *hists, u64 nr_hists, | |||
102 | u64 session_total, const char *helpline, | 102 | u64 session_total, const char *helpline, |
103 | const char *input_name); | 103 | const char *input_name); |
104 | #endif | 104 | #endif |
105 | |||
106 | static inline | ||
107 | struct machine *perf_session__find_host_machine(struct perf_session *self) | ||
108 | { | ||
109 | return machines__find_host(&self->machines); | ||
110 | } | ||
111 | |||
112 | static inline | ||
113 | struct machine *perf_session__find_machine(struct perf_session *self, pid_t pid) | ||
114 | { | ||
115 | return machines__find(&self->machines, pid); | ||
116 | } | ||
117 | |||
118 | static inline | ||
119 | struct machine *perf_session__findnew_machine(struct perf_session *self, pid_t pid) | ||
120 | { | ||
121 | return machines__findnew(&self->machines, pid); | ||
122 | } | ||
123 | |||
124 | static inline | ||
125 | void perf_session__process_machines(struct perf_session *self, | ||
126 | machine__process_t process) | ||
127 | { | ||
128 | return machines__process(&self->machines, process, self); | ||
129 | } | ||
105 | #endif /* __PERF_SESSION_H */ | 130 | #endif /* __PERF_SESSION_H */ |