.. | .. |
---|
5 | 5 | #include <linux/refcount.h> |
---|
6 | 6 | #include <linux/rbtree.h> |
---|
7 | 7 | #include <linux/list.h> |
---|
| 8 | +#include <stdio.h> |
---|
8 | 9 | #include <unistd.h> |
---|
9 | 10 | #include <sys/types.h> |
---|
10 | | -#include "symbol.h" |
---|
| 11 | +#include "srccode.h" |
---|
| 12 | +#include "symbol_conf.h" |
---|
11 | 13 | #include <strlist.h> |
---|
12 | 14 | #include <intlist.h> |
---|
13 | 15 | #include "rwsem.h" |
---|
| 16 | +#include "event.h" |
---|
| 17 | +#include "callchain.h" |
---|
14 | 18 | |
---|
| 19 | +struct addr_location; |
---|
| 20 | +struct map; |
---|
| 21 | +struct perf_record_namespaces; |
---|
15 | 22 | struct thread_stack; |
---|
16 | 23 | struct unwind_libunwind_ops; |
---|
| 24 | + |
---|
| 25 | +struct lbr_stitch { |
---|
| 26 | + struct list_head lists; |
---|
| 27 | + struct list_head free_lists; |
---|
| 28 | + struct perf_sample prev_sample; |
---|
| 29 | + struct callchain_cursor_node *prev_lbr_cursor; |
---|
| 30 | +}; |
---|
17 | 31 | |
---|
18 | 32 | struct thread { |
---|
19 | 33 | union { |
---|
20 | 34 | struct rb_node rb_node; |
---|
21 | 35 | struct list_head node; |
---|
22 | 36 | }; |
---|
23 | | - struct map_groups *mg; |
---|
| 37 | + struct maps *maps; |
---|
24 | 38 | pid_t pid_; /* Not all tools update this */ |
---|
25 | 39 | pid_t tid; |
---|
26 | 40 | pid_t ppid; |
---|
.. | .. |
---|
38 | 52 | void *priv; |
---|
39 | 53 | struct thread_stack *ts; |
---|
40 | 54 | struct nsinfo *nsinfo; |
---|
41 | | -#ifdef HAVE_LIBUNWIND_SUPPORT |
---|
42 | | - void *addr_space; |
---|
43 | | - struct unwind_libunwind_ops *unwind_libunwind_ops; |
---|
44 | | -#endif |
---|
| 55 | + struct srccode_state srccode_state; |
---|
| 56 | + bool filter; |
---|
| 57 | + int filter_entry_depth; |
---|
| 58 | + |
---|
| 59 | + /* LBR call stack stitch */ |
---|
| 60 | + bool lbr_stitch_enable; |
---|
| 61 | + struct lbr_stitch *lbr_stitch; |
---|
45 | 62 | }; |
---|
46 | 63 | |
---|
47 | 64 | struct machine; |
---|
.. | .. |
---|
49 | 66 | struct comm; |
---|
50 | 67 | |
---|
51 | 68 | struct thread *thread__new(pid_t pid, pid_t tid); |
---|
52 | | -int thread__init_map_groups(struct thread *thread, struct machine *machine); |
---|
| 69 | +int thread__init_maps(struct thread *thread, struct machine *machine); |
---|
53 | 70 | void thread__delete(struct thread *thread); |
---|
54 | 71 | |
---|
55 | 72 | struct thread *thread__get(struct thread *thread); |
---|
.. | .. |
---|
68 | 85 | thread->dead = true; |
---|
69 | 86 | } |
---|
70 | 87 | |
---|
71 | | -struct namespaces *thread__namespaces(const struct thread *thread); |
---|
| 88 | +struct namespaces *thread__namespaces(struct thread *thread); |
---|
72 | 89 | int thread__set_namespaces(struct thread *thread, u64 timestamp, |
---|
73 | | - struct namespaces_event *event); |
---|
| 90 | + struct perf_record_namespaces *event); |
---|
74 | 91 | |
---|
75 | 92 | int __thread__set_comm(struct thread *thread, const char *comm, u64 timestamp, |
---|
76 | 93 | bool exec); |
---|
.. | .. |
---|
85 | 102 | int thread__comm_len(struct thread *thread); |
---|
86 | 103 | struct comm *thread__comm(const struct thread *thread); |
---|
87 | 104 | struct comm *thread__exec_comm(const struct thread *thread); |
---|
88 | | -const char *thread__comm_str(const struct thread *thread); |
---|
| 105 | +const char *thread__comm_str(struct thread *thread); |
---|
89 | 106 | int thread__insert_map(struct thread *thread, struct map *map); |
---|
90 | | -int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp); |
---|
| 107 | +int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp, bool do_maps_clone); |
---|
91 | 108 | size_t thread__fprintf(struct thread *thread, FILE *fp); |
---|
92 | 109 | |
---|
93 | 110 | struct thread *thread__main_thread(struct machine *machine, struct thread *thread); |
---|
.. | .. |
---|
104 | 121 | |
---|
105 | 122 | void thread__find_cpumode_addr_location(struct thread *thread, u64 addr, |
---|
106 | 123 | struct addr_location *al); |
---|
| 124 | + |
---|
| 125 | +int thread__memcpy(struct thread *thread, struct machine *machine, |
---|
| 126 | + void *buf, u64 ip, int len, bool *is64bit); |
---|
107 | 127 | |
---|
108 | 128 | static inline void *thread__priv(struct thread *thread) |
---|
109 | 129 | { |
---|
.. | .. |
---|
135 | 155 | return false; |
---|
136 | 156 | } |
---|
137 | 157 | |
---|
| 158 | +void thread__free_stitch_list(struct thread *thread); |
---|
| 159 | + |
---|
138 | 160 | #endif /* __PERF_THREAD_H */ |
---|