mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
perf tools: struct thread has a tid not a pid
As evident from 'machine__process_fork_event()' and 'machine__process_exit_event()' the 'pid' member of struct thread is actually the tid. Rename 'pid' to 'tid' in struct thread accordingly. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: David Ahern <dsahern@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1372944040-32690-13-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
27389d7823
commit
380512345e
10 changed files with 35 additions and 35 deletions
|
@ -7,17 +7,17 @@
|
|||
#include "util.h"
|
||||
#include "debug.h"
|
||||
|
||||
struct thread *thread__new(pid_t pid)
|
||||
struct thread *thread__new(pid_t tid)
|
||||
{
|
||||
struct thread *self = zalloc(sizeof(*self));
|
||||
|
||||
if (self != NULL) {
|
||||
map_groups__init(&self->mg);
|
||||
self->pid = pid;
|
||||
self->tid = tid;
|
||||
self->ppid = -1;
|
||||
self->comm = malloc(32);
|
||||
if (self->comm)
|
||||
snprintf(self->comm, 32, ":%d", self->pid);
|
||||
snprintf(self->comm, 32, ":%d", self->tid);
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -57,7 +57,7 @@ int thread__comm_len(struct thread *self)
|
|||
|
||||
size_t thread__fprintf(struct thread *thread, FILE *fp)
|
||||
{
|
||||
return fprintf(fp, "Thread %d %s\n", thread->pid, thread->comm) +
|
||||
return fprintf(fp, "Thread %d %s\n", thread->tid, thread->comm) +
|
||||
map_groups__fprintf(&thread->mg, verbose, fp);
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ int thread__fork(struct thread *self, struct thread *parent)
|
|||
if (map_groups__clone(&self->mg, &parent->mg, i) < 0)
|
||||
return -ENOMEM;
|
||||
|
||||
self->ppid = parent->pid;
|
||||
self->ppid = parent->tid;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue