Lines Matching refs:comm
77 struct comm *comm__new(const char *str, u64 timestamp, bool exec) in comm__new()
79 struct comm *comm = zalloc(sizeof(*comm)); in comm__new() local
81 if (!comm) in comm__new()
84 comm->start = timestamp; in comm__new()
85 comm->exec = exec; in comm__new()
87 comm->comm_str = comm_str__findnew(str, &comm_str_root); in comm__new()
88 if (!comm->comm_str) { in comm__new()
89 free(comm); in comm__new()
93 comm_str__get(comm->comm_str); in comm__new()
95 return comm; in comm__new()
98 int comm__override(struct comm *comm, const char *str, u64 timestamp, bool exec) in comm__override() argument
100 struct comm_str *new, *old = comm->comm_str; in comm__override()
108 comm->comm_str = new; in comm__override()
109 comm->start = timestamp; in comm__override()
111 comm->exec = true; in comm__override()
116 void comm__free(struct comm *comm) in comm__free() argument
118 comm_str__put(comm->comm_str); in comm__free()
119 free(comm); in comm__free()
122 const char *comm__str(const struct comm *comm) in comm__str() argument
124 return comm->comm_str->str; in comm__str()