• Wang Nan's avatar
    perf evlist: Update mmap related APIs and helpers · 8db6d6b1
    Wang Nan authored
    Currently, the evlist mmap related helpers and APIs accept evlist and
    idx, and dereference 'struct perf_mmap' by evlist->mmap[idx]. This is
    unnecessary, and force each evlist contains only one mmap array.
    
    Following commits are going to introduce multiple mmap arrays to a
    evlist.  This patch refators these APIs and helpers, introduces
    functions accept perf_mmap pointer directly. New helpers and APIs are
    decoupled with perf_evlist, and become perf_mmap functions (so they have
    perf_mmap prefix).
    
    Old functions are reimplemented with new functions. Some of them will be
    removed in following commits.
    Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: He Kuang <hekuang@huawei.com>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Nilay Vaish <nilayvaish@gmail.com>
    Cc: Zefan Li <lizefan@huawei.com>
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1468485287-33422-4-git-send-email-wangnan0@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    8db6d6b1
evlist.c 45.4 KB