diff options
author | Kan Liang <kan.liang@intel.com> | 2018-01-18 16:26:16 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-02-15 07:50:53 -0500 |
commit | 6888ff66c44ffa3077ed69e978902d0ff4b84ae1 (patch) | |
tree | 724560467cbdc2943e65b6235126c99558491751 | |
parent | 0b7c1528fb741803396da68a9d8d285ff7db731c (diff) |
perf evlist: Remove stale mmap read for backward
perf_evlist__mmap_read_catchup() and perf_evlist__mmap_read_backward()
are only for overwrite mode.
But they read the evlist->mmap buffer which is for non-overwrite mode.
It did not bring any serious problem yet, because there is no one use
it.
Remove the unused interfaces.
Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Wang Nan <wangnan0@huawei.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1516310792-208685-2-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/evlist.c | 17 | ||||
-rw-r--r-- | tools/perf/util/evlist.h | 4 |
2 files changed, 0 insertions, 21 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index ac35cd214feb..e5fc14e53c05 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -715,28 +715,11 @@ union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int | |||
715 | return perf_mmap__read_forward(md); | 715 | return perf_mmap__read_forward(md); |
716 | } | 716 | } |
717 | 717 | ||
718 | union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx) | ||
719 | { | ||
720 | struct perf_mmap *md = &evlist->mmap[idx]; | ||
721 | |||
722 | /* | ||
723 | * No need to check messup for backward ring buffer: | ||
724 | * We can always read arbitrary long data from a backward | ||
725 | * ring buffer unless we forget to pause it before reading. | ||
726 | */ | ||
727 | return perf_mmap__read_backward(md); | ||
728 | } | ||
729 | |||
730 | union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx) | 718 | union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx) |
731 | { | 719 | { |
732 | return perf_evlist__mmap_read_forward(evlist, idx); | 720 | return perf_evlist__mmap_read_forward(evlist, idx); |
733 | } | 721 | } |
734 | 722 | ||
735 | void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx) | ||
736 | { | ||
737 | perf_mmap__read_catchup(&evlist->mmap[idx]); | ||
738 | } | ||
739 | |||
740 | void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx) | 723 | void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx) |
741 | { | 724 | { |
742 | perf_mmap__consume(&evlist->mmap[idx], false); | 725 | perf_mmap__consume(&evlist->mmap[idx], false); |
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 75f8e0ad5d76..336b838e6957 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h | |||
@@ -133,10 +133,6 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx); | |||
133 | 133 | ||
134 | union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, | 134 | union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, |
135 | int idx); | 135 | int idx); |
136 | union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, | ||
137 | int idx); | ||
138 | void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx); | ||
139 | |||
140 | void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx); | 136 | void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx); |
141 | 137 | ||
142 | int perf_evlist__open(struct perf_evlist *evlist); | 138 | int perf_evlist__open(struct perf_evlist *evlist); |