mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +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
|
@ -1075,7 +1075,7 @@ static int latency_migrate_task_event(struct perf_sched *sched,
|
|||
if (!atoms) {
|
||||
if (thread_atoms_insert(sched, migrant))
|
||||
return -1;
|
||||
register_pid(sched, migrant->pid, migrant->comm);
|
||||
register_pid(sched, migrant->tid, migrant->comm);
|
||||
atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid);
|
||||
if (!atoms) {
|
||||
pr_err("migration-event: Internal tree error");
|
||||
|
@ -1115,7 +1115,7 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_
|
|||
sched->all_runtime += work_list->total_runtime;
|
||||
sched->all_count += work_list->nb_atoms;
|
||||
|
||||
ret = printf(" %s:%d ", work_list->thread->comm, work_list->thread->pid);
|
||||
ret = printf(" %s:%d ", work_list->thread->comm, work_list->thread->tid);
|
||||
|
||||
for (i = 0; i < 24 - ret; i++)
|
||||
printf(" ");
|
||||
|
@ -1131,9 +1131,9 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_
|
|||
|
||||
static int pid_cmp(struct work_atoms *l, struct work_atoms *r)
|
||||
{
|
||||
if (l->thread->pid < r->thread->pid)
|
||||
if (l->thread->tid < r->thread->tid)
|
||||
return -1;
|
||||
if (l->thread->pid > r->thread->pid)
|
||||
if (l->thread->tid > r->thread->tid)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@ -1321,7 +1321,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
|
|||
printf("*");
|
||||
|
||||
if (sched->curr_thread[cpu]) {
|
||||
if (sched->curr_thread[cpu]->pid)
|
||||
if (sched->curr_thread[cpu]->tid)
|
||||
printf("%2s ", sched->curr_thread[cpu]->shortname);
|
||||
else
|
||||
printf(". ");
|
||||
|
@ -1332,7 +1332,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel,
|
|||
printf(" %12.6f secs ", (double)timestamp/1e9);
|
||||
if (new_shortname) {
|
||||
printf("%s => %s:%d\n",
|
||||
sched_in->shortname, sched_in->comm, sched_in->pid);
|
||||
sched_in->shortname, sched_in->comm, sched_in->tid);
|
||||
} else {
|
||||
printf("\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue