aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-12-19 07:04:24 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-24 14:40:13 -0500
commit34ba5122bf198c9cdfcbecc9b23eaa414244a3f6 (patch)
tree7793918dad08b64157ae66d605a3e5bd2b3abb1f /tools/perf/builtin-top.c
parent09ecbb07a5c9fa31dc72ee8fb1c3fbd1145448dd (diff)
perf machine: Simplify accessing the host machine
It is always there, no sense in calling a function named "perf_session__find_host_machine". Also no sense in checking if that function return is NULL, so ditch needless error handling. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> 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/n/tip-a6a3zx3afbrxo8p2zqm5mxo8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index e0ecebdde3fe..bc788126397b 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -847,13 +847,13 @@ static void perf_top__mmap_read_idx(struct perf_top *top, int idx)
847 ++top->us_samples; 847 ++top->us_samples;
848 if (top->hide_user_symbols) 848 if (top->hide_user_symbols)
849 continue; 849 continue;
850 machine = perf_session__find_host_machine(session); 850 machine = &session->machines.host;
851 break; 851 break;
852 case PERF_RECORD_MISC_KERNEL: 852 case PERF_RECORD_MISC_KERNEL:
853 ++top->kernel_samples; 853 ++top->kernel_samples;
854 if (top->hide_kernel_symbols) 854 if (top->hide_kernel_symbols)
855 continue; 855 continue;
856 machine = perf_session__find_host_machine(session); 856 machine = &session->machines.host;
857 break; 857 break;
858 case PERF_RECORD_MISC_GUEST_KERNEL: 858 case PERF_RECORD_MISC_GUEST_KERNEL:
859 ++top->guest_kernel_samples; 859 ++top->guest_kernel_samples;