Skip to content

Commit

Permalink
perf tools: Tag thread comm as overriden
Browse files Browse the repository at this point in the history
The problem is that when a thread overrides its default ":%pid" comm, we
forget to tag the thread comm as overriden. Hence, this overriden comm
is not inherited on future forks. Fix it.

Signed-off-by: Frederic Weisbecker <[email protected]>
Tested-by: David Ahern <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
fweisbec authored and acmel committed Nov 19, 2013
1 parent 801a760 commit a5285ad
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tools/perf/util/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ int thread__set_comm(struct thread *thread, const char *str, u64 timestamp)
/* Override latest entry if it had no specific time coverage */
if (!curr->start) {
comm__override(curr, str, timestamp);
return 0;
} else {
new = comm__new(str, timestamp);
if (!new)
return -ENOMEM;
list_add(&new->list, &thread->comm_list);
}

new = comm__new(str, timestamp);
if (!new)
return -ENOMEM;

list_add(&new->list, &thread->comm_list);
thread->comm_set = true;

return 0;
Expand Down

0 comments on commit a5285ad

Please sign in to comment.