diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-04-26 01:15:17 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-02 14:20:30 -0400 |
commit | fe9d18a71d2018f8021fd2bd2aaf5137954ef839 (patch) | |
tree | e0cb4b12af0a7660d97e7b2e1f2c341e524e8f07 /tools/perf/util/top.c | |
parent | 20f946b4a49dfd89c1c4ddeb55c0632893332674 (diff) |
perf top: Convert to struct perf_target
Use struct perf_target as it is introduced by previous patch.
This is a preparation of further changes.
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1335417327-11796-4-git-send-email-namhyung.kim@lge.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/top.c')
-rw-r--r-- | tools/perf/util/top.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/perf/util/top.c b/tools/perf/util/top.c index 09fe579ccafb..abe0e8e95068 100644 --- a/tools/perf/util/top.c +++ b/tools/perf/util/top.c | |||
@@ -69,23 +69,24 @@ size_t perf_top__header_snprintf(struct perf_top *top, char *bf, size_t size) | |||
69 | 69 | ||
70 | ret += SNPRINTF(bf + ret, size - ret, "], "); | 70 | ret += SNPRINTF(bf + ret, size - ret, "], "); |
71 | 71 | ||
72 | if (top->target_pid) | 72 | if (top->target.pid) |
73 | ret += SNPRINTF(bf + ret, size - ret, " (target_pid: %s", | 73 | ret += SNPRINTF(bf + ret, size - ret, " (target_pid: %s", |
74 | top->target_pid); | 74 | top->target.pid); |
75 | else if (top->target_tid) | 75 | else if (top->target.tid) |
76 | ret += SNPRINTF(bf + ret, size - ret, " (target_tid: %s", | 76 | ret += SNPRINTF(bf + ret, size - ret, " (target_tid: %s", |
77 | top->target_tid); | 77 | top->target.tid); |
78 | else if (top->uid_str != NULL) | 78 | else if (top->target.uid_str != NULL) |
79 | ret += SNPRINTF(bf + ret, size - ret, " (uid: %s", | 79 | ret += SNPRINTF(bf + ret, size - ret, " (uid: %s", |
80 | top->uid_str); | 80 | top->target.uid_str); |
81 | else | 81 | else |
82 | ret += SNPRINTF(bf + ret, size - ret, " (all"); | 82 | ret += SNPRINTF(bf + ret, size - ret, " (all"); |
83 | 83 | ||
84 | if (top->cpu_list) | 84 | if (top->target.cpu_list) |
85 | ret += SNPRINTF(bf + ret, size - ret, ", CPU%s: %s)", | 85 | ret += SNPRINTF(bf + ret, size - ret, ", CPU%s: %s)", |
86 | top->evlist->cpus->nr > 1 ? "s" : "", top->cpu_list); | 86 | top->evlist->cpus->nr > 1 ? "s" : "", |
87 | top->target.cpu_list); | ||
87 | else { | 88 | else { |
88 | if (top->target_tid) | 89 | if (top->target.tid) |
89 | ret += SNPRINTF(bf + ret, size - ret, ")"); | 90 | ret += SNPRINTF(bf + ret, size - ret, ")"); |
90 | else | 91 | else |
91 | ret += SNPRINTF(bf + ret, size - ret, ", %d CPU%s)", | 92 | ret += SNPRINTF(bf + ret, size - ret, ", %d CPU%s)", |