perf evlist: Use the right prefix for 'struct evlist' 'toggle' methods

perf_evlist__ is for 'struct perf_evlist' methods, in tools/lib/perf/,
go on completing this split.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 53f5e908
...@@ -1166,7 +1166,7 @@ static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist, ...@@ -1166,7 +1166,7 @@ static int record__mmap_read_evlist(struct record *rec, struct evlist *evlist,
rc = record__write(rec, NULL, &finished_round_event, sizeof(finished_round_event)); rc = record__write(rec, NULL, &finished_round_event, sizeof(finished_round_event));
if (overwrite) if (overwrite)
perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY); evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY);
out: out:
return rc; return rc;
} }
...@@ -1860,11 +1860,11 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) ...@@ -1860,11 +1860,11 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
* BKW_MMAP_EMPTY here: when done == true and * BKW_MMAP_EMPTY here: when done == true and
* hits != rec->samples in previous round. * hits != rec->samples in previous round.
* *
* perf_evlist__toggle_bkw_mmap ensure we never * evlist__toggle_bkw_mmap ensure we never
* convert BKW_MMAP_EMPTY to BKW_MMAP_DATA_PENDING. * convert BKW_MMAP_EMPTY to BKW_MMAP_DATA_PENDING.
*/ */
if (trigger_is_hit(&switch_output_trigger) || done || draining) if (trigger_is_hit(&switch_output_trigger) || done || draining)
perf_evlist__toggle_bkw_mmap(rec->evlist, BKW_MMAP_DATA_PENDING); evlist__toggle_bkw_mmap(rec->evlist, BKW_MMAP_DATA_PENDING);
if (record__mmap_read_all(rec, false) < 0) { if (record__mmap_read_all(rec, false) < 0) {
trigger_error(&auxtrace_snapshot_trigger); trigger_error(&auxtrace_snapshot_trigger);
...@@ -1903,7 +1903,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) ...@@ -1903,7 +1903,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
* record__mmap_read_all(): we should have collected * record__mmap_read_all(): we should have collected
* data from it. * data from it.
*/ */
perf_evlist__toggle_bkw_mmap(rec->evlist, BKW_MMAP_RUNNING); evlist__toggle_bkw_mmap(rec->evlist, BKW_MMAP_RUNNING);
if (!quiet) if (!quiet)
fprintf(stderr, "[ perf record: dump data: Woken up %ld times ]\n", fprintf(stderr, "[ perf record: dump data: Woken up %ld times ]\n",
......
...@@ -918,14 +918,14 @@ static void perf_top__mmap_read(struct perf_top *top) ...@@ -918,14 +918,14 @@ static void perf_top__mmap_read(struct perf_top *top)
int i; int i;
if (overwrite) if (overwrite)
perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_DATA_PENDING); evlist__toggle_bkw_mmap(evlist, BKW_MMAP_DATA_PENDING);
for (i = 0; i < top->evlist->core.nr_mmaps; i++) for (i = 0; i < top->evlist->core.nr_mmaps; i++)
perf_top__mmap_read_idx(top, i); perf_top__mmap_read_idx(top, i);
if (overwrite) { if (overwrite) {
perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY); evlist__toggle_bkw_mmap(evlist, BKW_MMAP_EMPTY);
perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING); evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING);
} }
} }
......
...@@ -3264,7 +3264,7 @@ static int evsel__hists_browse(struct evsel *evsel, int nr_events, const char *h ...@@ -3264,7 +3264,7 @@ static int evsel__hists_browse(struct evsel *evsel, int nr_events, const char *h
if (!is_report_browser(hbt)) { if (!is_report_browser(hbt)) {
struct perf_top *top = hbt->arg; struct perf_top *top = hbt->arg;
perf_evlist__toggle_enable(top->evlist); evlist__toggle_enable(top->evlist);
/* /*
* No need to refresh, resort/decay histogram * No need to refresh, resort/decay histogram
* entries if we are not collecting samples: * entries if we are not collecting samples:
......
...@@ -447,7 +447,7 @@ void evlist__enable(struct evlist *evlist) ...@@ -447,7 +447,7 @@ void evlist__enable(struct evlist *evlist)
evlist->enabled = true; evlist->enabled = true;
} }
void perf_evlist__toggle_enable(struct evlist *evlist) void evlist__toggle_enable(struct evlist *evlist)
{ {
(evlist->enabled ? evlist__disable : evlist__enable)(evlist); (evlist->enabled ? evlist__disable : evlist__enable)(evlist);
} }
...@@ -727,7 +727,7 @@ perf_evlist__mmap_cb_get(struct perf_evlist *_evlist, bool overwrite, int idx) ...@@ -727,7 +727,7 @@ perf_evlist__mmap_cb_get(struct perf_evlist *_evlist, bool overwrite, int idx)
if (overwrite) { if (overwrite) {
evlist->overwrite_mmap = maps; evlist->overwrite_mmap = maps;
if (evlist->bkw_mmap_state == BKW_MMAP_NOTREADY) if (evlist->bkw_mmap_state == BKW_MMAP_NOTREADY)
perf_evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING); evlist__toggle_bkw_mmap(evlist, BKW_MMAP_RUNNING);
} else { } else {
evlist->mmap = maps; evlist->mmap = maps;
} }
...@@ -1613,8 +1613,7 @@ perf_evlist__find_evsel_by_str(struct evlist *evlist, ...@@ -1613,8 +1613,7 @@ perf_evlist__find_evsel_by_str(struct evlist *evlist,
return NULL; return NULL;
} }
void perf_evlist__toggle_bkw_mmap(struct evlist *evlist, void evlist__toggle_bkw_mmap(struct evlist *evlist, enum bkw_mmap_state state)
enum bkw_mmap_state state)
{ {
enum bkw_mmap_state old_state = evlist->bkw_mmap_state; enum bkw_mmap_state old_state = evlist->bkw_mmap_state;
enum action { enum action {
......
...@@ -168,7 +168,7 @@ struct evsel *perf_evlist__id2evsel_strict(struct evlist *evlist, ...@@ -168,7 +168,7 @@ struct evsel *perf_evlist__id2evsel_strict(struct evlist *evlist,
struct perf_sample_id *perf_evlist__id2sid(struct evlist *evlist, u64 id); struct perf_sample_id *perf_evlist__id2sid(struct evlist *evlist, u64 id);
void perf_evlist__toggle_bkw_mmap(struct evlist *evlist, enum bkw_mmap_state state); void evlist__toggle_bkw_mmap(struct evlist *evlist, enum bkw_mmap_state state);
void evlist__mmap_consume(struct evlist *evlist, int idx); void evlist__mmap_consume(struct evlist *evlist, int idx);
...@@ -207,7 +207,7 @@ size_t evlist__mmap_size(unsigned long pages); ...@@ -207,7 +207,7 @@ size_t evlist__mmap_size(unsigned long pages);
void evlist__disable(struct evlist *evlist); void evlist__disable(struct evlist *evlist);
void evlist__enable(struct evlist *evlist); void evlist__enable(struct evlist *evlist);
void perf_evlist__toggle_enable(struct evlist *evlist); void evlist__toggle_enable(struct evlist *evlist);
int perf_evlist__enable_event_idx(struct evlist *evlist, int perf_evlist__enable_event_idx(struct evlist *evlist,
struct evsel *evsel, int idx); struct evsel *evsel, int idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment