Lines Matching defs:comm
14 #include "comm.h"
42 struct comm *comm;
61 comm = comm__new(comm_str, 0, false);
63 if (!comm)
66 list_add(&comm->list, &thread->comm_list);
84 struct comm *comm, *tmp_comm;
103 list_for_each_entry_safe(comm, tmp_comm, &thread->comm_list, list) {
104 list_del_init(&comm->list);
105 comm__free(comm);
208 struct comm *thread__comm(const struct thread *thread)
213 return list_first_entry(&thread->comm_list, struct comm, list);
216 struct comm *thread__exec_comm(const struct thread *thread)
218 struct comm *comm, *last = NULL, *second_last = NULL;
220 list_for_each_entry(comm, &thread->comm_list, list) {
221 if (comm->exec)
222 return comm;
224 last = comm;
228 * 'last' with no start time might be the parent's comm of a synthesized
230 * thread, that is very probably wrong. Prefer a later comm to avoid
242 struct comm *new, *curr = thread__comm(thread);
278 char *comm = NULL;
282 if (!(snprintf(path, sizeof(path), "%d/task/%d/comm",
284 procfs__read_str(path, &comm, &sz) == 0) {
285 comm[sz - 1] = '\0';
286 err = thread__set_comm(thread, comm, 0);
294 const struct comm *comm = thread__comm(thread);
296 if (!comm)
299 return comm__str(comm);
313 /* CHECKME: it should probably better return the max comm len from its comm list */
317 const char *comm = thread__comm_str(thread);
318 if (!comm)
320 thread->comm_len = strlen(comm);
394 const char *comm = thread__comm_str(parent);
396 if (!comm)
398 err = thread__set_comm(thread, comm, timestamp);