Skip to content

Commit 98a07a1

Browse files
committed
Revert "perf: Use exec_comm instead of comm when printing"
This reverts commit 8c3e6c8. It created some unwanted side effects, such as modifying the "swapper" stacks.
1 parent 8c3e6c8 commit 98a07a1

File tree

3 files changed

+3
-25
lines changed

3 files changed

+3
-25
lines changed

tools/perf/builtin-script.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,11 +635,11 @@ static int perf_sample__fprintf_start(struct perf_sample *sample,
635635

636636
if (PRINT_FIELD(COMM)) {
637637
if (latency_format)
638-
printed += fprintf(fp, "%8.8s ", thread__exec_comm_str(thread));
638+
printed += fprintf(fp, "%8.8s ", thread__comm_str(thread));
639639
else if (PRINT_FIELD(IP) && evsel__has_callchain(evsel) && symbol_conf.use_callchain)
640-
printed += fprintf(fp, "%s ", thread__exec_comm_str(thread));
640+
printed += fprintf(fp, "%s ", thread__comm_str(thread));
641641
else
642-
printed += fprintf(fp, "%16s ", thread__exec_comm_str(thread));
642+
printed += fprintf(fp, "%16s ", thread__comm_str(thread));
643643
}
644644

645645
if (PRINT_FIELD(PID) && PRINT_FIELD(TID))

tools/perf/util/thread.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -308,27 +308,6 @@ const char *thread__comm_str(struct thread *thread)
308308
return str;
309309
}
310310

311-
static const char *__thread__exec_comm_str(const struct thread *thread)
312-
{
313-
const struct comm *comm = thread__exec_comm(thread);
314-
315-
if (!comm)
316-
return NULL;
317-
318-
return comm__str(comm);
319-
}
320-
321-
const char *thread__exec_comm_str(struct thread *thread)
322-
{
323-
const char *str;
324-
325-
down_read(&thread->comm_lock);
326-
str = __thread__exec_comm_str(thread);
327-
up_read(&thread->comm_lock);
328-
329-
return str;
330-
}
331-
332311
/* CHECKME: it should probably better return the max comm len from its comm list */
333312
int thread__comm_len(struct thread *thread)
334313
{

tools/perf/util/thread.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ int thread__comm_len(struct thread *thread);
9090
struct comm *thread__comm(const struct thread *thread);
9191
struct comm *thread__exec_comm(const struct thread *thread);
9292
const char *thread__comm_str(struct thread *thread);
93-
const char *thread__exec_comm_str(struct thread *thread);
9493
int thread__insert_map(struct thread *thread, struct map *map);
9594
int thread__fork(struct thread *thread, struct thread *parent, u64 timestamp, bool do_maps_clone);
9695
size_t thread__fprintf(struct thread *thread, FILE *fp);

0 commit comments

Comments
 (0)