perf evsel: Rename perf_evsel__group_idx() to evsel__group_idx()

As it is a 'struct evsel' method, 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 ae430892
......@@ -857,8 +857,7 @@ static int record__open(struct record *rec)
goto try_again;
}
rc = -errno;
perf_evsel__open_strerror(pos, &opts->target,
errno, msg, sizeof(msg));
evsel__open_strerror(pos, &opts->target, errno, msg, sizeof(msg));
ui__error("%s\n", msg);
goto out;
}
......
......@@ -484,8 +484,7 @@ static enum counter_recovery stat_handle_error(struct evsel *counter)
}
}
perf_evsel__open_strerror(counter, &target,
errno, msg, sizeof(msg));
evsel__open_strerror(counter, &target, errno, msg, sizeof(msg));
ui__error("%s\n", msg);
if (child_pid != -1)
......
......@@ -1051,8 +1051,7 @@ static int perf_top__start_counters(struct perf_top *top)
goto try_again;
}
perf_evsel__open_strerror(counter, &opts->target,
errno, msg, sizeof(msg));
evsel__open_strerror(counter, &opts->target, errno, msg, sizeof(msg));
ui__error("%s\n", msg);
goto out_err;
}
......
This diff is collapsed.
......@@ -48,7 +48,7 @@ static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he,
struct hist_entry *pair;
int nr_members = evsel->core.nr_members;
prev_idx = perf_evsel__group_idx(evsel);
prev_idx = evsel__group_idx(evsel);
list_for_each_entry(pair, &he->pairs.head, pairs.node) {
u64 period = get_field(pair);
......@@ -58,7 +58,7 @@ static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he,
continue;
evsel = hists_to_evsel(pair->hists);
idx_delta = perf_evsel__group_idx(evsel) - prev_idx - 1;
idx_delta = evsel__group_idx(evsel) - prev_idx - 1;
while (idx_delta--) {
/*
......@@ -82,7 +82,7 @@ static int __hpp__fmt(struct perf_hpp *hpp, struct hist_entry *he,
len, period);
}
prev_idx = perf_evsel__group_idx(evsel);
prev_idx = evsel__group_idx(evsel);
}
idx_delta = nr_members - prev_idx - 1;
......@@ -164,12 +164,12 @@ static int hist_entry__new_pair(struct hist_entry *a, struct hist_entry *b,
list_for_each_entry(pair, &a->pairs.head, pairs.node) {
struct evsel *evsel = hists_to_evsel(pair->hists);
fa[perf_evsel__group_idx(evsel)] = get_field(pair);
fa[evsel__group_idx(evsel)] = get_field(pair);
}
list_for_each_entry(pair, &b->pairs.head, pairs.node) {
struct evsel *evsel = hists_to_evsel(pair->hists);
fb[perf_evsel__group_idx(evsel)] = get_field(pair);
fb[evsel__group_idx(evsel)] = get_field(pair);
}
*fields_a = fa;
......
......@@ -1721,8 +1721,7 @@ static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus,
/*
* If we succeeded but had to kill clockid, fail and
* have perf_evsel__open_strerror() print us a nice
* error.
* have evsel__open_strerror() print us a nice error.
*/
if (perf_missing_features.clockid ||
perf_missing_features.clockid_wrong) {
......@@ -2474,8 +2473,8 @@ static bool find_process(const char *name)
return ret ? false : true;
}
int perf_evsel__open_strerror(struct evsel *evsel, struct target *target,
int err, char *msg, size_t size)
int evsel__open_strerror(struct evsel *evsel, struct target *target,
int err, char *msg, size_t size)
{
char sbuf[STRERR_BUFSIZE];
int printed = 0;
......
......@@ -351,10 +351,10 @@ static inline bool evsel__is_clock(struct evsel *evsel)
}
bool evsel__fallback(struct evsel *evsel, int err, char *msg, size_t msgsize);
int perf_evsel__open_strerror(struct evsel *evsel, struct target *target,
int err, char *msg, size_t size);
int evsel__open_strerror(struct evsel *evsel, struct target *target,
int err, char *msg, size_t size);
static inline int perf_evsel__group_idx(struct evsel *evsel)
static inline int evsel__group_idx(struct evsel *evsel)
{
return evsel->idx - evsel->leader->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