Skip to content

Commit

Permalink
perf mmap: Remove overwrite from arguments list of perf_mmap__push
Browse files Browse the repository at this point in the history
'overwrite' argument is always 'false'. Remove it from arguments list of
perf_mmap__push().

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Link: http://lkml.kernel.org/r/20171203020044.81680-5-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Wang Nan authored and Arnaldo Carvalho de Melo committed Dec 5, 2017
1 parent 144b9a4 commit ca6a9a0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
struct auxtrace_mmap *mm = &maps[i].auxtrace_mmap;

if (maps[i].base) {
if (perf_mmap__push(&maps[i], false, backward, rec, record__pushfn) != 0) {
if (perf_mmap__push(&maps[i], backward, rec, record__pushfn) != 0) {
rc = -1;
goto out;
}
Expand Down
6 changes: 3 additions & 3 deletions tools/perf/util/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static int rb_find_range(void *data, int mask, u64 head, u64 old,
return backward_rb_find_range(data, mask, head, start, end);
}

int perf_mmap__push(struct perf_mmap *md, bool overwrite, bool backward,
int perf_mmap__push(struct perf_mmap *md, bool backward,
void *to, int push(void *to, void *buf, size_t size))
{
u64 head = perf_mmap__read_head(md);
Expand All @@ -321,7 +321,7 @@ int perf_mmap__push(struct perf_mmap *md, bool overwrite, bool backward,
WARN_ONCE(1, "failed to keep up with mmap data. (warn only once)\n");

md->prev = head;
perf_mmap__consume(md, overwrite || backward);
perf_mmap__consume(md, backward);
return 0;
}

Expand All @@ -346,7 +346,7 @@ int perf_mmap__push(struct perf_mmap *md, bool overwrite, bool backward,
}

md->prev = head;
perf_mmap__consume(md, overwrite || backward);
perf_mmap__consume(md, backward);
out:
return rc;
}
2 changes: 1 addition & 1 deletion tools/perf/util/mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static inline void perf_mmap__write_tail(struct perf_mmap *md, u64 tail)
union perf_event *perf_mmap__read_forward(struct perf_mmap *map, bool check_messup);
union perf_event *perf_mmap__read_backward(struct perf_mmap *map);

int perf_mmap__push(struct perf_mmap *md, bool overwrite, bool backward,
int perf_mmap__push(struct perf_mmap *md, bool backward,
void *to, int push(void *to, void *buf, size_t size));

size_t perf_mmap__mmap_len(struct perf_mmap *map);
Expand Down

0 comments on commit ca6a9a0

Please sign in to comment.