diff options
Diffstat (limited to 'tools/perf/util/machine.h')
-rw-r--r-- | tools/perf/util/machine.h | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h index 58a6be1fc739..477133015440 100644 --- a/tools/perf/util/machine.h +++ b/tools/perf/util/machine.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <sys/types.h> | 4 | #include <sys/types.h> |
5 | #include <linux/rbtree.h> | 5 | #include <linux/rbtree.h> |
6 | #include "map.h" | 6 | #include "map.h" |
7 | #include "event.h" | ||
7 | 8 | ||
8 | struct addr_location; | 9 | struct addr_location; |
9 | struct branch_stack; | 10 | struct branch_stack; |
@@ -40,13 +41,20 @@ struct map *machine__kernel_map(struct machine *machine, enum map_type type) | |||
40 | 41 | ||
41 | struct thread *machine__find_thread(struct machine *machine, pid_t tid); | 42 | struct thread *machine__find_thread(struct machine *machine, pid_t tid); |
42 | 43 | ||
43 | int machine__process_comm_event(struct machine *machine, union perf_event *event); | 44 | int machine__process_comm_event(struct machine *machine, union perf_event *event, |
44 | int machine__process_exit_event(struct machine *machine, union perf_event *event); | 45 | struct perf_sample *sample); |
45 | int machine__process_fork_event(struct machine *machine, union perf_event *event); | 46 | int machine__process_exit_event(struct machine *machine, union perf_event *event, |
46 | int machine__process_lost_event(struct machine *machine, union perf_event *event); | 47 | struct perf_sample *sample); |
47 | int machine__process_mmap_event(struct machine *machine, union perf_event *event); | 48 | int machine__process_fork_event(struct machine *machine, union perf_event *event, |
48 | int machine__process_mmap2_event(struct machine *machine, union perf_event *event); | 49 | struct perf_sample *sample); |
49 | int machine__process_event(struct machine *machine, union perf_event *event); | 50 | int machine__process_lost_event(struct machine *machine, union perf_event *event, |
51 | struct perf_sample *sample); | ||
52 | int machine__process_mmap_event(struct machine *machine, union perf_event *event, | ||
53 | struct perf_sample *sample); | ||
54 | int machine__process_mmap2_event(struct machine *machine, union perf_event *event, | ||
55 | struct perf_sample *sample); | ||
56 | int machine__process_event(struct machine *machine, union perf_event *event, | ||
57 | struct perf_sample *sample); | ||
50 | 58 | ||
51 | typedef void (*machine__process_t)(struct machine *machine, void *data); | 59 | typedef void (*machine__process_t)(struct machine *machine, void *data); |
52 | 60 | ||
@@ -74,6 +82,7 @@ char *machine__mmap_name(struct machine *machine, char *bf, size_t size); | |||
74 | void machines__set_symbol_filter(struct machines *machines, | 82 | void machines__set_symbol_filter(struct machines *machines, |
75 | symbol_filter_t symbol_filter); | 83 | symbol_filter_t symbol_filter); |
76 | 84 | ||
85 | struct machine *machine__new_host(void); | ||
77 | int machine__init(struct machine *machine, const char *root_dir, pid_t pid); | 86 | int machine__init(struct machine *machine, const char *root_dir, pid_t pid); |
78 | void machine__exit(struct machine *machine); | 87 | void machine__exit(struct machine *machine); |
79 | void machine__delete_dead_threads(struct machine *machine); | 88 | void machine__delete_dead_threads(struct machine *machine); |
@@ -91,7 +100,8 @@ int machine__resolve_callchain(struct machine *machine, | |||
91 | struct thread *thread, | 100 | struct thread *thread, |
92 | struct perf_sample *sample, | 101 | struct perf_sample *sample, |
93 | struct symbol **parent, | 102 | struct symbol **parent, |
94 | struct addr_location *root_al); | 103 | struct addr_location *root_al, |
104 | int max_stack); | ||
95 | 105 | ||
96 | /* | 106 | /* |
97 | * Default guest kernel is defined by parameter --guestkallsyms | 107 | * Default guest kernel is defined by parameter --guestkallsyms |
@@ -165,4 +175,19 @@ void machines__destroy_kernel_maps(struct machines *machines); | |||
165 | 175 | ||
166 | size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp); | 176 | size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp); |
167 | 177 | ||
178 | int machine__for_each_thread(struct machine *machine, | ||
179 | int (*fn)(struct thread *thread, void *p), | ||
180 | void *priv); | ||
181 | |||
182 | int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool, | ||
183 | struct target *target, struct thread_map *threads, | ||
184 | perf_event__handler_t process, bool data_mmap); | ||
185 | static inline | ||
186 | int machine__synthesize_threads(struct machine *machine, struct target *target, | ||
187 | struct thread_map *threads, bool data_mmap) | ||
188 | { | ||
189 | return __machine__synthesize_threads(machine, NULL, target, threads, | ||
190 | perf_event__process, data_mmap); | ||
191 | } | ||
192 | |||
168 | #endif /* __PERF_MACHINE_H */ | 193 | #endif /* __PERF_MACHINE_H */ |