diff options
Diffstat (limited to 'tools/perf/util/thread.c')
-rw-r--r-- | tools/perf/util/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 7635928ca278..45efb5db0d19 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | static struct thread *thread__new(pid_t pid) | 9 | static struct thread *thread__new(pid_t pid) |
10 | { | 10 | { |
11 | struct thread *self = malloc(sizeof(*self)); | 11 | struct thread *self = calloc(1, sizeof(*self)); |
12 | 12 | ||
13 | if (self != NULL) { | 13 | if (self != NULL) { |
14 | self->pid = pid; | 14 | self->pid = pid; |
@@ -85,7 +85,7 @@ register_idle_thread(struct rb_root *threads, struct thread **last_match) | |||
85 | { | 85 | { |
86 | struct thread *thread = threads__findnew(0, threads, last_match); | 86 | struct thread *thread = threads__findnew(0, threads, last_match); |
87 | 87 | ||
88 | if (!thread || thread__set_comm(thread, "[init]")) { | 88 | if (!thread || thread__set_comm(thread, "swapper")) { |
89 | fprintf(stderr, "problem inserting idle task.\n"); | 89 | fprintf(stderr, "problem inserting idle task.\n"); |
90 | exit(-1); | 90 | exit(-1); |
91 | } | 91 | } |