diff options
Diffstat (limited to 'tools/perf/util/machine.h')
-rw-r--r-- | tools/perf/util/machine.h | 41 |
1 files changed, 25 insertions, 16 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index b7cde7467d55..5ac5892f2326 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h | |||
@@ -47,23 +47,32 @@ int machine__process_event(struct machine *machine, union perf_event *event); | |||
47 | 47 | ||
48 | typedef void (*machine__process_t)(struct machine *machine, void *data); | 48 | typedef void (*machine__process_t)(struct machine *machine, void *data); |
49 | 49 | ||
50 | void machines__process(struct rb_root *machines, | 50 | struct machines { |
51 | machine__process_t process, void *data); | 51 | struct machine host; |
52 | struct rb_root guests; | ||
53 | }; | ||
54 | |||
55 | void machines__init(struct machines *machines); | ||
56 | void machines__exit(struct machines *machines); | ||
52 | 57 | ||
53 | struct machine *machines__add(struct rb_root *machines, pid_t pid, | 58 | void machines__process_guests(struct machines *machines, |
59 | machine__process_t process, void *data); | ||
60 | |||
61 | struct machine *machines__add(struct machines *machines, pid_t pid, | ||
54 | const char *root_dir); | 62 | const char *root_dir); |
55 | struct machine *machines__find_host(struct rb_root *machines); | 63 | struct machine *machines__find_host(struct machines *machines); |
56 | struct machine *machines__find(struct rb_root *machines, pid_t pid); | 64 | struct machine *machines__find(struct machines *machines, pid_t pid); |
57 | struct machine *machines__findnew(struct rb_root *machines, pid_t pid); | 65 | struct machine *machines__findnew(struct machines *machines, pid_t pid); |
58 | 66 | ||
59 | void machines__set_id_hdr_size(struct rb_root *machines, u16 id_hdr_size); | 67 | void machines__set_id_hdr_size(struct machines *machines, u16 id_hdr_size); |
60 | char *machine__mmap_name(struct machine *machine, char *bf, size_t size); | 68 | char *machine__mmap_name(struct machine *machine, char *bf, size_t size); |
61 | 69 | ||
62 | int machine__init(struct machine *machine, const char *root_dir, pid_t pid); | 70 | int machine__init(struct machine *machine, const char *root_dir, pid_t pid); |
63 | void machine__exit(struct machine *machine); | 71 | void machine__exit(struct machine *machine); |
72 | void machine__delete_dead_threads(struct machine *machine); | ||
73 | void machine__delete_threads(struct machine *machine); | ||
64 | void machine__delete(struct machine *machine); | 74 | void machine__delete(struct machine *machine); |
65 | 75 | ||
66 | |||
67 | struct branch_info *machine__resolve_bstack(struct machine *machine, | 76 | struct branch_info *machine__resolve_bstack(struct machine *machine, |
68 | struct thread *thread, | 77 | struct thread *thread, |
69 | struct branch_stack *bs); | 78 | struct branch_stack *bs); |
@@ -129,19 +138,19 @@ int machine__load_kallsyms(struct machine *machine, const char *filename, | |||
129 | int machine__load_vmlinux_path(struct machine *machine, enum map_type type, | 138 | int machine__load_vmlinux_path(struct machine *machine, enum map_type type, |
130 | symbol_filter_t filter); | 139 | symbol_filter_t filter); |
131 | 140 | ||
132 | size_t machine__fprintf_dsos_buildid(struct machine *machine, | 141 | size_t machine__fprintf_dsos_buildid(struct machine *machine, FILE *fp, |
133 | FILE *fp, bool with_hits); | 142 | bool (skip)(struct dso *dso, int parm), int parm); |
134 | size_t machines__fprintf_dsos(struct rb_root *machines, FILE *fp); | 143 | size_t machines__fprintf_dsos(struct machines *machines, FILE *fp); |
135 | size_t machines__fprintf_dsos_buildid(struct rb_root *machines, | 144 | size_t machines__fprintf_dsos_buildid(struct machines *machines, FILE *fp, |
136 | FILE *fp, bool with_hits); | 145 | bool (skip)(struct dso *dso, int parm), int parm); |
137 | 146 | ||
138 | void machine__destroy_kernel_maps(struct machine *machine); | 147 | void machine__destroy_kernel_maps(struct machine *machine); |
139 | int __machine__create_kernel_maps(struct machine *machine, struct dso *kernel); | 148 | int __machine__create_kernel_maps(struct machine *machine, struct dso *kernel); |
140 | int machine__create_kernel_maps(struct machine *machine); | 149 | int machine__create_kernel_maps(struct machine *machine); |
141 | 150 | ||
142 | int machines__create_kernel_maps(struct rb_root *machines, pid_t pid); | 151 | int machines__create_kernel_maps(struct machines *machines, pid_t pid); |
143 | int machines__create_guest_kernel_maps(struct rb_root *machines); | 152 | int machines__create_guest_kernel_maps(struct machines *machines); |
144 | void machines__destroy_guest_kernel_maps(struct rb_root *machines); | 153 | void machines__destroy_kernel_maps(struct machines *machines); |
145 | 154 | ||
146 | size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp); | 155 | size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp); |
147 | 156 | ||