On Thu, Dec 21, 2017 at 10:08:49AM -0800, [email protected] wrote:
> From: Kan Liang <[email protected]>
> 
> Discards perf_mmap__read_backward and perf_mmap__read_catchup. No tools
> use them.
> 
> There are tools still use perf_mmap__read_forward. Keep it, but add
> comments to point to the new interface for future use.
> 
> Signed-off-by: Kan Liang <[email protected]>
> ---
>  tools/perf/util/mmap.c | 50 
> ++++----------------------------------------------
>  tools/perf/util/mmap.h |  3 ---
>  2 files changed, 4 insertions(+), 49 deletions(-)
> 
> diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
> index d0ca3ba..650e0a7 100644
> --- a/tools/perf/util/mmap.c
> +++ b/tools/perf/util/mmap.c
> @@ -63,6 +63,10 @@ static union perf_event *perf_mmap__read(struct perf_mmap 
> *map,
>       return event;
>  }
>  
> +/*
> + * legacy interface for mmap read.
> + * Don't use it. Use perf_mmap__read_event().
> + */

could we get rid of it then? looks like it's not much work,
seems it's used only in:

  perf_evlist__mmap_read
    perf_evlist__mmap_read_forward
  
it'd prove the new interface work correctly for both cases

thanks,
jirka

>  union perf_event *perf_mmap__read_forward(struct perf_mmap *map)
>  {
>       u64 head;
> @@ -78,41 +82,6 @@ union perf_event *perf_mmap__read_forward(struct perf_mmap 
> *map)
>       return perf_mmap__read(map, &map->prev, head);
>  }

SNIP

Reply via email to