Skip to content

Commit

Permalink
perf inject: Rename perf_evsel__*() operating on 'struct evsel *' to …
Browse files Browse the repository at this point in the history
…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: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed May 5, 2020
1 parent 74aa90e commit b14b36d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/perf/builtin-inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,7 @@ static void sig_handler(int sig __maybe_unused)
session_done = 1;
}

static int perf_evsel__check_stype(struct evsel *evsel,
u64 sample_type, const char *sample_msg)
static int evsel__check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg)
{
struct perf_event_attr *attr = &evsel->core.attr;
const char *name = evsel__name(evsel);
Expand Down Expand Up @@ -625,7 +624,7 @@ static int __cmd_inject(struct perf_inject *inject)
const char *name = evsel__name(evsel);

if (!strcmp(name, "sched:sched_switch")) {
if (perf_evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID"))
if (evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID"))
return -EINVAL;

evsel->handler = perf_inject__sched_switch;
Expand Down

0 comments on commit b14b36d

Please sign in to comment.