Symbol: comm_strs
tools/perf/util/comm.c
102
struct comm_strs *comm_strs = comm_strs__get();
tools/perf/util/comm.c
104
down_write(&comm_strs->lock);
tools/perf/util/comm.c
112
entry = bsearch(comm_str__str(cs), comm_strs->strs, comm_strs->num_strs,
tools/perf/util/comm.c
115
for (int i = entry - comm_strs->strs; i < comm_strs->num_strs - 1; i++)
tools/perf/util/comm.c
116
comm_strs->strs[i] = comm_strs->strs[i + 1];
tools/perf/util/comm.c
117
comm_strs->num_strs--;
tools/perf/util/comm.c
119
up_write(&comm_strs->lock);
tools/perf/util/comm.c
122
static struct comm_str *__comm_strs__find(struct comm_strs *comm_strs, const char *str)
tools/perf/util/comm.c
123
SHARED_LOCKS_REQUIRED(comm_strs->lock)
tools/perf/util/comm.c
127
result = bsearch(str, comm_strs->strs, comm_strs->num_strs, sizeof(struct comm_str *),
tools/perf/util/comm.c
138
struct comm_strs *comm_strs = comm_strs__get();
tools/perf/util/comm.c
141
if (!comm_strs)
tools/perf/util/comm.c
144
down_read(&comm_strs->lock);
tools/perf/util/comm.c
145
result = __comm_strs__find(comm_strs, str);
tools/perf/util/comm.c
146
up_read(&comm_strs->lock);
tools/perf/util/comm.c
150
down_write(&comm_strs->lock);
tools/perf/util/comm.c
151
result = __comm_strs__find(comm_strs, str);
tools/perf/util/comm.c
153
if (comm_strs->num_strs == comm_strs->capacity) {
tools/perf/util/comm.c
156
tmp = reallocarray(comm_strs->strs,
tools/perf/util/comm.c
157
comm_strs->capacity + 16,
tools/perf/util/comm.c
158
sizeof(*comm_strs->strs));
tools/perf/util/comm.c
160
up_write(&comm_strs->lock);
tools/perf/util/comm.c
163
comm_strs->strs = tmp;
tools/perf/util/comm.c
164
comm_strs->capacity += 16;
tools/perf/util/comm.c
168
int low = 0, high = comm_strs->num_strs - 1;
tools/perf/util/comm.c
169
int insert = comm_strs->num_strs; /* Default to inserting at the end. */
tools/perf/util/comm.c
173
int cmp = strcmp(comm_str__str(comm_strs->strs[mid]), str);
tools/perf/util/comm.c
182
memmove(&comm_strs->strs[insert + 1], &comm_strs->strs[insert],
tools/perf/util/comm.c
183
(comm_strs->num_strs - insert) * sizeof(struct comm_str *));
tools/perf/util/comm.c
184
comm_strs->num_strs++;
tools/perf/util/comm.c
185
comm_strs->strs[insert] = result;
tools/perf/util/comm.c
188
up_write(&comm_strs->lock);
tools/perf/util/comm.c
35
static struct comm_strs *comm_strs__get(void)