Lines Matching defs:comm

14 #include "comm.h"
43 struct comm *comm;
64 comm = comm__new(comm_str, 0, false);
66 if (!comm)
69 list_add(&comm->list, thread__comm_list(thread));
95 struct comm *comm, *tmp_comm;
112 list_for_each_entry_safe(comm, tmp_comm, thread__comm_list(thread), list) {
113 list_del_init(&comm->list);
114 comm__free(comm);
203 struct comm *thread__comm(struct thread *thread)
208 return list_first_entry(thread__comm_list(thread), struct comm, list);
211 struct comm *thread__exec_comm(struct thread *thread)
213 struct comm *comm, *last = NULL, *second_last = NULL;
215 list_for_each_entry(comm, thread__comm_list(thread), list) {
216 if (comm->exec)
217 return comm;
219 last = comm;
223 * 'last' with no start time might be the parent's comm of a synthesized
225 * thread, that is very probably wrong. Prefer a later comm to avoid
237 struct comm *new, *curr = thread__comm(thread);
273 char *comm = NULL;
277 if (!(snprintf(path, sizeof(path), "%d/task/%d/comm",
279 procfs__read_str(path, &comm, &sz) == 0) {
280 comm[sz - 1] = '\0';
281 err = thread__set_comm(thread, comm, 0);
289 const struct comm *comm = thread__comm(thread);
291 if (!comm)
294 return comm__str(comm);
308 static int __thread__comm_len(struct thread *thread, const char *comm)
310 if (!comm)
312 thread__set_comm_len(thread, strlen(comm));
317 /* CHECKME: it should probably better return the max comm len from its comm list */
323 const char *comm;
326 comm = __thread__comm_str(thread);
327 comm_len = __thread__comm_len(thread, comm);
401 const char *comm = thread__comm_str(parent);
403 if (!comm)
405 err = thread__set_comm(thread, comm, timestamp);