lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V5 01/17] perf evlist: remove stale mmap read for backward
    Date
    From: Kan Liang <kan.liang@intel.com>

    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.

    Acked-by: Wang Nan <wangnan0@huawei.com>
    Signed-off-by: Kan Liang <kan.liang@intel.com>
    ---
    tools/perf/util/evlist.c | 17 -----------------
    tools/perf/util/evlist.h | 4 ----
    2 files changed, 21 deletions(-)

    diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
    index f0a5e09..cf0fd35 100644
    --- a/tools/perf/util/evlist.c
    +++ b/tools/perf/util/evlist.c
    @@ -714,28 +714,11 @@ union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int
    return perf_mmap__read_forward(md);
    }

    -union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx)
    -{
    - struct perf_mmap *md = &evlist->mmap[idx];
    -
    - /*
    - * No need to check messup for backward ring buffer:
    - * We can always read arbitrary long data from a backward
    - * ring buffer unless we forget to pause it before reading.
    - */
    - return perf_mmap__read_backward(md);
    -}
    -
    union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx)
    {
    return perf_evlist__mmap_read_forward(evlist, idx);
    }

    -void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx)
    -{
    - perf_mmap__read_catchup(&evlist->mmap[idx]);
    -}
    -
    void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
    {
    perf_mmap__consume(&evlist->mmap[idx], false);
    diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h
    index e7fbca6..bbf53b1 100644
    --- a/tools/perf/util/evlist.h
    +++ b/tools/perf/util/evlist.h
    @@ -134,10 +134,6 @@ union perf_event *perf_evlist__mmap_read(struct perf_evlist *evlist, int idx);

    union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist,
    int idx);
    -union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist,
    - int idx);
    -void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx);
    -
    void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx);

    int perf_evlist__open(struct perf_evlist *evlist);
    --
    2.5.5
    \
     
     \ /
      Last update: 2018-01-18 22:28    [W:4.097 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site