diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-01 18:15:52 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-01 18:15:52 -0400 |
commit | 7f3be652c1a8866251bfba9ea8b02067328f5db9 (patch) | |
tree | 27bd48d04f7db733b6c980afb55eed0719ac3725 /tools/perf/builtin-test.c | |
parent | bde09467b56c5a3cfe2a29d58edc5f7172c15184 (diff) |
perf session: Use perf_evlist__sample_type more extensively
Removing perf_session->sample_type, as it can be obtained from the
evsel/evlist.
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-mnt1zwlik7sp7z6ljc9kyefg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-test.c')
-rw-r--r-- | tools/perf/builtin-test.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c index 2ea5fe4cc940..e5032ed2f259 100644 --- a/tools/perf/builtin-test.c +++ b/tools/perf/builtin-test.c | |||
@@ -661,7 +661,7 @@ static int test__PERF_RECORD(void) | |||
661 | const char *cmd = "sleep"; | 661 | const char *cmd = "sleep"; |
662 | const char *argv[] = { cmd, "1", NULL, }; | 662 | const char *argv[] = { cmd, "1", NULL, }; |
663 | char *bname; | 663 | char *bname; |
664 | u64 sample_type, prev_time = 0; | 664 | u64 prev_time = 0; |
665 | bool found_cmd_mmap = false, | 665 | bool found_cmd_mmap = false, |
666 | found_libc_mmap = false, | 666 | found_libc_mmap = false, |
667 | found_vdso_mmap = false, | 667 | found_vdso_mmap = false, |
@@ -757,12 +757,6 @@ static int test__PERF_RECORD(void) | |||
757 | } | 757 | } |
758 | 758 | ||
759 | /* | 759 | /* |
760 | * We'll need these two to parse the PERF_SAMPLE_* fields in each | ||
761 | * event. | ||
762 | */ | ||
763 | sample_type = perf_evlist__sample_type(evlist); | ||
764 | |||
765 | /* | ||
766 | * Now that all is properly set up, enable the events, they will | 760 | * Now that all is properly set up, enable the events, they will |
767 | * count just on workload.pid, which will start... | 761 | * count just on workload.pid, which will start... |
768 | */ | 762 | */ |
@@ -787,7 +781,7 @@ static int test__PERF_RECORD(void) | |||
787 | if (type < PERF_RECORD_MAX) | 781 | if (type < PERF_RECORD_MAX) |
788 | nr_events[type]++; | 782 | nr_events[type]++; |
789 | 783 | ||
790 | err = perf_event__parse_sample(event, sample_type, | 784 | err = perf_event__parse_sample(event, evsel->attr.sample_type, |
791 | evsel->sample_size, true, | 785 | evsel->sample_size, true, |
792 | &sample, false); | 786 | &sample, false); |
793 | if (err < 0) { | 787 | if (err < 0) { |