perf sched: Rename perf_evsel__*() operating on 'struct evsel *' to evsel__*()

As those is a 'struct evsel' methods, not part of tools/lib/perf/, aka
libperf, to whom the perf_ prefix belongs.

Cc: Adrian Hunter <adrian.hunter@intel.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 3d655813
...@@ -1848,7 +1848,7 @@ static inline void print_sched_time(unsigned long long nsecs, int width) ...@@ -1848,7 +1848,7 @@ static inline void print_sched_time(unsigned long long nsecs, int width)
* returns runtime data for event, allocating memory for it the * returns runtime data for event, allocating memory for it the
* first time it is used. * first time it is used.
*/ */
static struct evsel_runtime *perf_evsel__get_runtime(struct evsel *evsel) static struct evsel_runtime *evsel__get_runtime(struct evsel *evsel)
{ {
struct evsel_runtime *r = evsel->priv; struct evsel_runtime *r = evsel->priv;
...@@ -1863,10 +1863,9 @@ static struct evsel_runtime *perf_evsel__get_runtime(struct evsel *evsel) ...@@ -1863,10 +1863,9 @@ static struct evsel_runtime *perf_evsel__get_runtime(struct evsel *evsel)
/* /*
* save last time event was seen per cpu * save last time event was seen per cpu
*/ */
static void perf_evsel__save_time(struct evsel *evsel, static void evsel__save_time(struct evsel *evsel, u64 timestamp, u32 cpu)
u64 timestamp, u32 cpu)
{ {
struct evsel_runtime *r = perf_evsel__get_runtime(evsel); struct evsel_runtime *r = evsel__get_runtime(evsel);
if (r == NULL) if (r == NULL)
return; return;
...@@ -1890,9 +1889,9 @@ static void perf_evsel__save_time(struct evsel *evsel, ...@@ -1890,9 +1889,9 @@ static void perf_evsel__save_time(struct evsel *evsel,
} }
/* returns last time this event was seen on the given cpu */ /* returns last time this event was seen on the given cpu */
static u64 perf_evsel__get_time(struct evsel *evsel, u32 cpu) static u64 evsel__get_time(struct evsel *evsel, u32 cpu)
{ {
struct evsel_runtime *r = perf_evsel__get_runtime(evsel); struct evsel_runtime *r = evsel__get_runtime(evsel);
if ((r == NULL) || (r->last_time == NULL) || (cpu >= r->ncpu)) if ((r == NULL) || (r->last_time == NULL) || (cpu >= r->ncpu))
return 0; return 0;
...@@ -2548,7 +2547,7 @@ static int timehist_sched_change_event(struct perf_tool *tool, ...@@ -2548,7 +2547,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
goto out; goto out;
} }
tprev = perf_evsel__get_time(evsel, sample->cpu); tprev = evsel__get_time(evsel, sample->cpu);
/* /*
* If start time given: * If start time given:
...@@ -2631,7 +2630,7 @@ static int timehist_sched_change_event(struct perf_tool *tool, ...@@ -2631,7 +2630,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
tr->ready_to_run = 0; tr->ready_to_run = 0;
} }
perf_evsel__save_time(evsel, sample->time, sample->cpu); evsel__save_time(evsel, sample->time, sample->cpu);
return rc; return rc;
} }
...@@ -2941,7 +2940,7 @@ static int timehist_check_attr(struct perf_sched *sched, ...@@ -2941,7 +2940,7 @@ static int timehist_check_attr(struct perf_sched *sched,
struct evsel_runtime *er; struct evsel_runtime *er;
list_for_each_entry(evsel, &evlist->core.entries, core.node) { list_for_each_entry(evsel, &evlist->core.entries, core.node) {
er = perf_evsel__get_runtime(evsel); er = evsel__get_runtime(evsel);
if (er == NULL) { if (er == NULL) {
pr_err("Failed to allocate memory for evsel runtime data\n"); pr_err("Failed to allocate memory for evsel runtime data\n");
return -1; return -1;
......
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