Lines Matching full:thread

32 DECLARE_RC_STRUCT(thread) {  in DECLARE_RC_STRUCT()  argument
33 /** @maps: mmaps associated with this thread. */ in DECLARE_RC_STRUCT()
36 /** @tid: thread ID number unique to a machine. */ in DECLARE_RC_STRUCT()
38 /** @ppid: parent process of the process this thread belongs to. */ in DECLARE_RC_STRUCT()
41 int guest_cpu; /* For QEMU thread */ in DECLARE_RC_STRUCT()
44 * @exited: Has the thread had an exit event. Such threads are usually in DECLARE_RC_STRUCT()
64 * @e_machine: The ELF EM_* associated with the thread. EM_NONE if not in DECLARE_RC_STRUCT()
77 struct thread *thread__new(pid_t pid, pid_t tid);
78 int thread__init_maps(struct thread *thread, struct machine *machine);
79 void thread__delete(struct thread *thread);
83 struct thread *thread__get(struct thread *thread);
84 void thread__put(struct thread *thread);
86 static inline void __thread__zput(struct thread **thread) in __thread__zput() argument
88 thread__put(*thread); in __thread__zput()
89 *thread = NULL; in __thread__zput()
92 #define thread__zput(thread) __thread__zput(&thread) argument
94 struct namespaces *thread__namespaces(struct thread *thread);
95 int thread__set_namespaces(struct thread *thread, u64 timestamp,
98 int __thread__set_comm(struct thread *thread, const char *comm, u64 timestamp,
100 static inline int thread__set_comm(struct thread *thread, const char *comm, in thread__set_comm() argument
103 return __thread__set_comm(thread, comm, timestamp, false); in thread__set_comm()
106 int thread__set_comm_from_proc(struct thread *thread);
108 int thread__comm_len(struct thread *thread);
109 struct comm *thread__comm(struct thread *thread);
110 struct comm *thread__exec_comm(struct thread *thread);
111 const char *thread__comm_str(struct thread *thread);
112 int thread__insert_map(struct thread *thread, struct map *map);
113 int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp, bool do_maps_clone);
114 size_t thread__fprintf(struct thread *thread, FILE *fp);
116 struct thread *thread__main_thread(struct machine *machine, struct thread *thread);
118 struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
120 struct map *thread__find_map_fb(struct thread *thread, u8 cpumode, u64 addr,
123 struct symbol *thread__find_symbol(struct thread *thread, u8 cpumode,
125 struct symbol *thread__find_symbol_fb(struct thread *thread, u8 cpumode,
128 void thread__find_cpumode_addr_location(struct thread *thread, u64 addr,
131 int thread__memcpy(struct thread *thread, struct machine *machine,
134 static inline struct maps *thread__maps(struct thread *thread) in thread__maps() argument
136 return RC_CHK_ACCESS(thread)->maps; in thread__maps()
139 static inline void thread__set_maps(struct thread *thread, struct maps *maps) in thread__set_maps() argument
141 RC_CHK_ACCESS(thread)->maps = maps; in thread__set_maps()
144 static inline pid_t thread__pid(const struct thread *thread) in thread__pid() argument
146 return RC_CHK_ACCESS(thread)->pid_; in thread__pid()
149 static inline void thread__set_pid(struct thread *thread, pid_t pid_) in thread__set_pid() argument
151 RC_CHK_ACCESS(thread)->pid_ = pid_; in thread__set_pid()
154 static inline pid_t thread__tid(const struct thread *thread) in thread__tid() argument
156 return RC_CHK_ACCESS(thread)->tid; in thread__tid()
159 static inline void thread__set_tid(struct thread *thread, pid_t tid) in thread__set_tid() argument
161 RC_CHK_ACCESS(thread)->tid = tid; in thread__set_tid()
164 static inline pid_t thread__ppid(const struct thread *thread) in thread__ppid() argument
166 return RC_CHK_ACCESS(thread)->ppid; in thread__ppid()
169 static inline void thread__set_ppid(struct thread *thread, pid_t ppid) in thread__set_ppid() argument
171 RC_CHK_ACCESS(thread)->ppid = ppid; in thread__set_ppid()
174 static inline int thread__cpu(const struct thread *thread) in thread__cpu() argument
176 return RC_CHK_ACCESS(thread)->cpu; in thread__cpu()
179 static inline void thread__set_cpu(struct thread *thread, int cpu) in thread__set_cpu() argument
181 RC_CHK_ACCESS(thread)->cpu = cpu; in thread__set_cpu()
184 static inline int thread__guest_cpu(const struct thread *thread) in thread__guest_cpu() argument
186 return RC_CHK_ACCESS(thread)->guest_cpu; in thread__guest_cpu()
189 static inline void thread__set_guest_cpu(struct thread *thread, int guest_cpu) in thread__set_guest_cpu() argument
191 RC_CHK_ACCESS(thread)->guest_cpu = guest_cpu; in thread__set_guest_cpu()
194 static inline refcount_t *thread__refcnt(struct thread *thread) in thread__refcnt() argument
196 return &RC_CHK_ACCESS(thread)->refcnt; in thread__refcnt()
199 static inline void thread__set_exited(struct thread *thread, bool exited) in thread__set_exited() argument
201 RC_CHK_ACCESS(thread)->exited = exited; in thread__set_exited()
204 static inline bool thread__comm_set(const struct thread *thread) in thread__comm_set() argument
206 return RC_CHK_ACCESS(thread)->comm_set; in thread__comm_set()
209 static inline void thread__set_comm_set(struct thread *thread, bool set) in thread__set_comm_set() argument
211 RC_CHK_ACCESS(thread)->comm_set = set; in thread__set_comm_set()
214 static inline int thread__var_comm_len(const struct thread *thread) in thread__var_comm_len() argument
216 return RC_CHK_ACCESS(thread)->comm_len; in thread__var_comm_len()
219 static inline void thread__set_comm_len(struct thread *thread, int len) in thread__set_comm_len() argument
221 RC_CHK_ACCESS(thread)->comm_len = len; in thread__set_comm_len()
224 static inline struct list_head *thread__namespaces_list(struct thread *thread) in thread__namespaces_list() argument
226 return &RC_CHK_ACCESS(thread)->namespaces_list; in thread__namespaces_list()
229 static inline int thread__namespaces_list_empty(const struct thread *thread) in thread__namespaces_list_empty() argument
231 return list_empty(&RC_CHK_ACCESS(thread)->namespaces_list); in thread__namespaces_list_empty()
234 static inline struct rw_semaphore *thread__namespaces_lock(struct thread *thread) in thread__namespaces_lock() argument
236 return &RC_CHK_ACCESS(thread)->namespaces_lock; in thread__namespaces_lock()
239 static inline struct list_head *thread__comm_list(struct thread *thread) in thread__comm_list() argument
241 return &RC_CHK_ACCESS(thread)->comm_list; in thread__comm_list()
244 static inline struct rw_semaphore *thread__comm_lock(struct thread *thread) in thread__comm_lock() argument
246 return &RC_CHK_ACCESS(thread)->comm_lock; in thread__comm_lock()
249 static inline u64 thread__db_id(const struct thread *thread) in thread__db_id() argument
251 return RC_CHK_ACCESS(thread)->db_id; in thread__db_id()
254 static inline void thread__set_db_id(struct thread *thread, u64 db_id) in thread__set_db_id() argument
256 RC_CHK_ACCESS(thread)->db_id = db_id; in thread__set_db_id()
259 static inline void *thread__priv(struct thread *thread) in thread__priv() argument
261 return RC_CHK_ACCESS(thread)->priv; in thread__priv()
264 static inline void thread__set_priv(struct thread *thread, void *p) in thread__set_priv() argument
266 RC_CHK_ACCESS(thread)->priv = p; in thread__set_priv()
269 static inline struct thread_stack *thread__ts(struct thread *thread) in thread__ts() argument
271 return RC_CHK_ACCESS(thread)->ts; in thread__ts()
274 static inline void thread__set_ts(struct thread *thread, struct thread_stack *ts) in thread__set_ts() argument
276 RC_CHK_ACCESS(thread)->ts = ts; in thread__set_ts()
279 static inline struct nsinfo *thread__nsinfo(struct thread *thread) in thread__nsinfo() argument
281 return RC_CHK_ACCESS(thread)->nsinfo; in thread__nsinfo()
284 static inline struct srccode_state *thread__srccode_state(struct thread *thread) in thread__srccode_state() argument
286 return &RC_CHK_ACCESS(thread)->srccode_state; in thread__srccode_state()
289 static inline bool thread__filter(const struct thread *thread) in thread__filter() argument
291 return RC_CHK_ACCESS(thread)->filter; in thread__filter()
294 static inline void thread__set_filter(struct thread *thread, bool filter) in thread__set_filter() argument
296 RC_CHK_ACCESS(thread)->filter = filter; in thread__set_filter()
299 static inline int thread__filter_entry_depth(const struct thread *thread) in thread__filter_entry_depth() argument
301 return RC_CHK_ACCESS(thread)->filter_entry_depth; in thread__filter_entry_depth()
304 static inline void thread__set_filter_entry_depth(struct thread *thread, int depth) in thread__set_filter_entry_depth() argument
306 RC_CHK_ACCESS(thread)->filter_entry_depth = depth; in thread__set_filter_entry_depth()
309 uint16_t thread__e_machine(struct thread *thread, struct machine *machine);
311 static inline void thread__set_e_machine(struct thread *thread, uint16_t e_machine) in thread__set_e_machine() argument
313 RC_CHK_ACCESS(thread)->e_machine = e_machine; in thread__set_e_machine()
317 static inline bool thread__lbr_stitch_enable(const struct thread *thread) in thread__lbr_stitch_enable() argument
319 return RC_CHK_ACCESS(thread)->lbr_stitch_enable; in thread__lbr_stitch_enable()
322 static inline void thread__set_lbr_stitch_enable(struct thread *thread, bool en) in thread__set_lbr_stitch_enable() argument
324 RC_CHK_ACCESS(thread)->lbr_stitch_enable = en; in thread__set_lbr_stitch_enable()
327 static inline struct lbr_stitch *thread__lbr_stitch(struct thread *thread) in thread__lbr_stitch() argument
329 return RC_CHK_ACCESS(thread)->lbr_stitch; in thread__lbr_stitch()
332 static inline void thread__set_lbr_stitch(struct thread *thread, struct lbr_stitch *lbrs) in thread__set_lbr_stitch() argument
334 RC_CHK_ACCESS(thread)->lbr_stitch = lbrs; in thread__set_lbr_stitch()
337 static inline bool thread__is_filtered(struct thread *thread) in thread__is_filtered() argument
340 !strlist__has_entry(symbol_conf.comm_list, thread__comm_str(thread))) { in thread__is_filtered()
345 !intlist__has_entry(symbol_conf.pid_list, thread__pid(thread))) { in thread__is_filtered()
350 !intlist__has_entry(symbol_conf.tid_list, thread__tid(thread))) { in thread__is_filtered()
357 void thread__free_stitch_list(struct thread *thread);
359 void thread__resolve(struct thread *thread, struct addr_location *al,