diff options
author | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
commit | ee3e542fec6e69bc9fb668698889a37d93950ddf (patch) | |
tree | e74ee766a4764769ef1d3d45d266b4dea64101d3 /tools/perf/util/thread.c | |
parent | fe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff) | |
parent | f1d6e17f540af37bb1891480143669ba7636c4cf (diff) |
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'tools/perf/util/thread.c')
-rw-r--r-- | tools/perf/util/thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 632e40e5ceca..40399cbcca77 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c | |||
@@ -14,6 +14,7 @@ struct thread *thread__new(pid_t pid) | |||
14 | if (self != NULL) { | 14 | if (self != NULL) { |
15 | map_groups__init(&self->mg); | 15 | map_groups__init(&self->mg); |
16 | self->pid = pid; | 16 | self->pid = pid; |
17 | self->ppid = -1; | ||
17 | self->comm = malloc(32); | 18 | self->comm = malloc(32); |
18 | if (self->comm) | 19 | if (self->comm) |
19 | snprintf(self->comm, 32, ":%d", self->pid); | 20 | snprintf(self->comm, 32, ":%d", self->pid); |
@@ -82,5 +83,8 @@ int thread__fork(struct thread *self, struct thread *parent) | |||
82 | for (i = 0; i < MAP__NR_TYPES; ++i) | 83 | for (i = 0; i < MAP__NR_TYPES; ++i) |
83 | if (map_groups__clone(&self->mg, &parent->mg, i) < 0) | 84 | if (map_groups__clone(&self->mg, &parent->mg, i) < 0) |
84 | return -ENOMEM; | 85 | return -ENOMEM; |
86 | |||
87 | self->ppid = parent->pid; | ||
88 | |||
85 | return 0; | 89 | return 0; |
86 | } | 90 | } |