Skip to content

Commit

Permalink
perf evlist: Remove evlist->overwrite
Browse files Browse the repository at this point in the history
evlist->overwrite is set to false in all users. It can be removed.

Signed-off-by: Wang Nan <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
WangNan0 authored and acmel committed Dec 5, 2017
1 parent 7a276ff commit 144b9a4
Show file tree
Hide file tree
Showing 3 changed files with 3 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], evlist->overwrite, backward, rec, record__pushfn) != 0) {
if (perf_mmap__push(&maps[i], false, backward, rec, record__pushfn) != 0) {
rc = -1;
goto out;
}
Expand Down
5 changes: 2 additions & 3 deletions tools/perf/util/evlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ union perf_event *perf_evlist__mmap_read_forward(struct perf_evlist *evlist, int
* No need for read-write ring buffer: kernel stop outputting when
* it hit md->prev (perf_mmap__consume()).
*/
return perf_mmap__read_forward(md, evlist->overwrite);
return perf_mmap__read_forward(md, false);
}

union perf_event *perf_evlist__mmap_read_backward(struct perf_evlist *evlist, int idx)
Expand All @@ -738,7 +738,7 @@ void perf_evlist__mmap_read_catchup(struct perf_evlist *evlist, int idx)

void perf_evlist__mmap_consume(struct perf_evlist *evlist, int idx)
{
perf_mmap__consume(&evlist->mmap[idx], evlist->overwrite);
perf_mmap__consume(&evlist->mmap[idx], false);
}

static void perf_evlist__munmap_nofree(struct perf_evlist *evlist)
Expand Down Expand Up @@ -1070,7 +1070,6 @@ int perf_evlist__mmap_ex(struct perf_evlist *evlist, unsigned int pages,
if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0)
return -ENOMEM;

evlist->overwrite = false;
evlist->mmap_len = perf_evlist__mmap_size(pages);
pr_debug("mmap size %zuB\n", evlist->mmap_len);
mp.mask = evlist->mmap_len - page_size - 1;
Expand Down
1 change: 0 additions & 1 deletion tools/perf/util/evlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct perf_evlist {
int nr_entries;
int nr_groups;
int nr_mmaps;
bool overwrite;
bool enabled;
bool has_user_cpus;
size_t mmap_len;
Expand Down

0 comments on commit 144b9a4

Please sign in to comment.