diff options
author | Kan Liang <kan.liang@linux.intel.com> | 2018-03-06 10:36:05 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-03-08 10:05:52 -0300 |
commit | d6ace3df43049a46aa1f5596c0c8d75433321437 (patch) | |
tree | 4e015eb1e734b3ae40ed3bc6166ec14f088609a5 /tools/perf/util | |
parent | bdec8b2f7eed4f16b764ca258487d26f8079f5ff (diff) | |
download | op-kernel-dev-d6ace3df43049a46aa1f5596c0c8d75433321437.zip op-kernel-dev-d6ace3df43049a46aa1f5596c0c8d75433321437.tar.gz |
perf mmap: Simplify perf_mmap__consume()
It isn't necessary to pass the 'overwrite' argument to
perf_mmap__consume(). Discard it.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1520350567-80082-6-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/mmap.c | 6 | ||||
-rw-r--r-- | tools/perf/util/mmap.h | 2 | ||||
-rw-r--r-- | tools/perf/util/python.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c index 8a2dac9..62312e0 100644 --- a/tools/perf/util/mmap.c +++ b/tools/perf/util/mmap.c @@ -118,7 +118,7 @@ void perf_mmap__put(struct perf_mmap *map) perf_mmap__munmap(map); } -void perf_mmap__consume(struct perf_mmap *map, bool overwrite __maybe_unused) +void perf_mmap__consume(struct perf_mmap *map) { if (!map->overwrite) { u64 old = map->prev; @@ -260,7 +260,7 @@ int perf_mmap__read_init(struct perf_mmap *md, bool overwrite, WARN_ONCE(1, "failed to keep up with mmap data. (warn only once)\n"); md->prev = head; - perf_mmap__consume(md, overwrite); + perf_mmap__consume(md); return -EAGAIN; } @@ -314,7 +314,7 @@ int perf_mmap__push(struct perf_mmap *md, void *to, } md->prev = head; - perf_mmap__consume(md, md->overwrite); + perf_mmap__consume(md); out: return rc; } diff --git a/tools/perf/util/mmap.h b/tools/perf/util/mmap.h index 65f5b26..043916a 100644 --- a/tools/perf/util/mmap.h +++ b/tools/perf/util/mmap.h @@ -66,7 +66,7 @@ void perf_mmap__munmap(struct perf_mmap *map); void perf_mmap__get(struct perf_mmap *map); void perf_mmap__put(struct perf_mmap *map); -void perf_mmap__consume(struct perf_mmap *map, bool overwrite); +void perf_mmap__consume(struct perf_mmap *map); static inline u64 perf_mmap__read_head(struct perf_mmap *mm) { diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 35fb5ef..ca077f8 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -1013,7 +1013,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist, err = perf_evsel__parse_sample(evsel, event, &pevent->sample); /* Consume the even only after we parsed it out. */ - perf_mmap__consume(md, false); + perf_mmap__consume(md); if (err) return PyErr_Format(PyExc_OSError, |