Lines Matching refs:comm
82 struct comm *comm__new(const char *str, u64 timestamp, bool exec) in comm__new()
84 struct comm *comm = zalloc(sizeof(*comm)); in comm__new() local
86 if (!comm) in comm__new()
89 comm->start = timestamp; in comm__new()
90 comm->exec = exec; in comm__new()
92 comm->comm_str = comm_str__findnew(str, &comm_str_root); in comm__new()
93 if (!comm->comm_str) { in comm__new()
94 free(comm); in comm__new()
98 comm_str__get(comm->comm_str); in comm__new()
100 return comm; in comm__new()
103 int comm__override(struct comm *comm, const char *str, u64 timestamp, bool exec) in comm__override() argument
105 struct comm_str *new, *old = comm->comm_str; in comm__override()
113 comm->comm_str = new; in comm__override()
114 comm->start = timestamp; in comm__override()
116 comm->exec = true; in comm__override()
121 void comm__free(struct comm *comm) in comm__free() argument
123 comm_str__put(comm->comm_str); in comm__free()
124 free(comm); in comm__free()
127 const char *comm__str(const struct comm *comm) in comm__str() argument
129 return comm->comm_str->str; in comm__str()