Skip to content

Commit 3b7313f

Browse files
committed
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 <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 3d65581 commit 3b7313f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tools/perf/builtin-sched.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,7 +1848,7 @@ static inline void print_sched_time(unsigned long long nsecs, int width)
18481848
* returns runtime data for event, allocating memory for it the
18491849
* first time it is used.
18501850
*/
1851-
static struct evsel_runtime *perf_evsel__get_runtime(struct evsel *evsel)
1851+
static struct evsel_runtime *evsel__get_runtime(struct evsel *evsel)
18521852
{
18531853
struct evsel_runtime *r = evsel->priv;
18541854

@@ -1863,10 +1863,9 @@ static struct evsel_runtime *perf_evsel__get_runtime(struct evsel *evsel)
18631863
/*
18641864
* save last time event was seen per cpu
18651865
*/
1866-
static void perf_evsel__save_time(struct evsel *evsel,
1867-
u64 timestamp, u32 cpu)
1866+
static void evsel__save_time(struct evsel *evsel, u64 timestamp, u32 cpu)
18681867
{
1869-
struct evsel_runtime *r = perf_evsel__get_runtime(evsel);
1868+
struct evsel_runtime *r = evsel__get_runtime(evsel);
18701869

18711870
if (r == NULL)
18721871
return;
@@ -1890,9 +1889,9 @@ static void perf_evsel__save_time(struct evsel *evsel,
18901889
}
18911890

18921891
/* returns last time this event was seen on the given cpu */
1893-
static u64 perf_evsel__get_time(struct evsel *evsel, u32 cpu)
1892+
static u64 evsel__get_time(struct evsel *evsel, u32 cpu)
18941893
{
1895-
struct evsel_runtime *r = perf_evsel__get_runtime(evsel);
1894+
struct evsel_runtime *r = evsel__get_runtime(evsel);
18961895

18971896
if ((r == NULL) || (r->last_time == NULL) || (cpu >= r->ncpu))
18981897
return 0;
@@ -2548,7 +2547,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
25482547
goto out;
25492548
}
25502549

2551-
tprev = perf_evsel__get_time(evsel, sample->cpu);
2550+
tprev = evsel__get_time(evsel, sample->cpu);
25522551

25532552
/*
25542553
* If start time given:
@@ -2631,7 +2630,7 @@ static int timehist_sched_change_event(struct perf_tool *tool,
26312630
tr->ready_to_run = 0;
26322631
}
26332632

2634-
perf_evsel__save_time(evsel, sample->time, sample->cpu);
2633+
evsel__save_time(evsel, sample->time, sample->cpu);
26352634

26362635
return rc;
26372636
}
@@ -2941,7 +2940,7 @@ static int timehist_check_attr(struct perf_sched *sched,
29412940
struct evsel_runtime *er;
29422941

29432942
list_for_each_entry(evsel, &evlist->core.entries, core.node) {
2944-
er = perf_evsel__get_runtime(evsel);
2943+
er = evsel__get_runtime(evsel);
29452944
if (er == NULL) {
29462945
pr_err("Failed to allocate memory for evsel runtime data\n");
29472946
return -1;

0 commit comments

Comments
 (0)