diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2013-07-04 09:20:31 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-07-12 12:53:50 -0400 |
commit | 380512345e13c3af64e59627f1b993c4faa94a84 (patch) | |
tree | d8ea8dbe6602f88fa83b8f2b388a8dd636a68b5c /tools/perf/builtin-sched.c | |
parent | 27389d7823f573be8eaff32fb4abe564e181eb71 (diff) |
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>
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index fba4a940ba31..948183adb6e5 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -1075,7 +1075,7 @@ static int latency_migrate_task_event(struct perf_sched *sched, | |||
1075 | if (!atoms) { | 1075 | if (!atoms) { |
1076 | if (thread_atoms_insert(sched, migrant)) | 1076 | if (thread_atoms_insert(sched, migrant)) |
1077 | return -1; | 1077 | return -1; |
1078 | register_pid(sched, migrant->pid, migrant->comm); | 1078 | register_pid(sched, migrant->tid, migrant->comm); |
1079 | atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid); | 1079 | atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid); |
1080 | if (!atoms) { | 1080 | if (!atoms) { |
1081 | pr_err("migration-event: Internal tree error"); | 1081 | pr_err("migration-event: Internal tree error"); |
@@ -1115,7 +1115,7 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_ | |||
1115 | sched->all_runtime += work_list->total_runtime; | 1115 | sched->all_runtime += work_list->total_runtime; |
1116 | sched->all_count += work_list->nb_atoms; | 1116 | sched->all_count += work_list->nb_atoms; |
1117 | 1117 | ||
1118 | ret = printf(" %s:%d ", work_list->thread->comm, work_list->thread->pid); | 1118 | ret = printf(" %s:%d ", work_list->thread->comm, work_list->thread->tid); |
1119 | 1119 | ||
1120 | for (i = 0; i < 24 - ret; i++) | 1120 | for (i = 0; i < 24 - ret; i++) |
1121 | printf(" "); | 1121 | printf(" "); |
@@ -1131,9 +1131,9 @@ static void output_lat_thread(struct perf_sched *sched, struct work_atoms *work_ | |||
1131 | 1131 | ||
1132 | static int pid_cmp(struct work_atoms *l, struct work_atoms *r) | 1132 | static int pid_cmp(struct work_atoms *l, struct work_atoms *r) |
1133 | { | 1133 | { |
1134 | if (l->thread->pid < r->thread->pid) | 1134 | if (l->thread->tid < r->thread->tid) |
1135 | return -1; | 1135 | return -1; |
1136 | if (l->thread->pid > r->thread->pid) | 1136 | if (l->thread->tid > r->thread->tid) |
1137 | return 1; | 1137 | return 1; |
1138 | 1138 | ||
1139 | return 0; | 1139 | return 0; |
@@ -1321,7 +1321,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel, | |||
1321 | printf("*"); | 1321 | printf("*"); |
1322 | 1322 | ||
1323 | if (sched->curr_thread[cpu]) { | 1323 | if (sched->curr_thread[cpu]) { |
1324 | if (sched->curr_thread[cpu]->pid) | 1324 | if (sched->curr_thread[cpu]->tid) |
1325 | printf("%2s ", sched->curr_thread[cpu]->shortname); | 1325 | printf("%2s ", sched->curr_thread[cpu]->shortname); |
1326 | else | 1326 | else |
1327 | printf(". "); | 1327 | printf(". "); |
@@ -1332,7 +1332,7 @@ static int map_switch_event(struct perf_sched *sched, struct perf_evsel *evsel, | |||
1332 | printf(" %12.6f secs ", (double)timestamp/1e9); | 1332 | printf(" %12.6f secs ", (double)timestamp/1e9); |
1333 | if (new_shortname) { | 1333 | if (new_shortname) { |
1334 | printf("%s => %s:%d\n", | 1334 | printf("%s => %s:%d\n", |
1335 | sched_in->shortname, sched_in->comm, sched_in->pid); | 1335 | sched_in->shortname, sched_in->comm, sched_in->tid); |
1336 | } else { | 1336 | } else { |
1337 | printf("\n"); | 1337 | printf("\n"); |
1338 | } | 1338 | } |