Commit 365c3ae7 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf evsel: Rename perf_evsel__new() to evsel__new()

Rename perf_evsel__new() to evsel__new(), so we don't have a name clash
when we add perf_evsel__new() in libperf.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190721112506.12306-12-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5eb2dd2a
...@@ -2657,7 +2657,7 @@ static struct evsel *perf_evsel__new_pgfault(u64 config) ...@@ -2657,7 +2657,7 @@ static struct evsel *perf_evsel__new_pgfault(u64 config)
event_attr_init(&attr); event_attr_init(&attr);
evsel = perf_evsel__new(&attr); evsel = evsel__new(&attr);
if (evsel) if (evsel)
evsel->handler = trace__pgfault; evsel->handler = trace__pgfault;
......
...@@ -49,7 +49,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id) ...@@ -49,7 +49,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
return -1; return -1;
} }
evsel = perf_evsel__new(&attr); evsel = evsel__new(&attr);
if (evsel == NULL) { if (evsel == NULL) {
pr_debug("perf_evsel__new\n"); pr_debug("perf_evsel__new\n");
goto out_delete_evlist; goto out_delete_evlist;
......
...@@ -301,7 +301,7 @@ struct evsel *perf_evsel__new_cycles(bool precise) ...@@ -301,7 +301,7 @@ struct evsel *perf_evsel__new_cycles(bool precise)
* to kick in when we return and before perf_evsel__open() is called. * to kick in when we return and before perf_evsel__open() is called.
*/ */
new_event: new_event:
evsel = perf_evsel__new(&attr); evsel = evsel__new(&attr);
if (evsel == NULL) if (evsel == NULL)
goto out; goto out;
......
...@@ -219,7 +219,7 @@ int perf_evsel__object_config(size_t object_size, ...@@ -219,7 +219,7 @@ int perf_evsel__object_config(size_t object_size,
struct evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx); struct evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);
static inline struct evsel *perf_evsel__new(struct perf_event_attr *attr) static inline struct evsel *evsel__new(struct perf_event_attr *attr)
{ {
return perf_evsel__new_idx(attr, 0); return perf_evsel__new_idx(attr, 0);
} }
......
...@@ -3583,7 +3583,7 @@ int perf_session__read_header(struct perf_session *session) ...@@ -3583,7 +3583,7 @@ int perf_session__read_header(struct perf_session *session)
} }
tmp = lseek(fd, 0, SEEK_CUR); tmp = lseek(fd, 0, SEEK_CUR);
evsel = perf_evsel__new(&f_attr.attr); evsel = evsel__new(&f_attr.attr);
if (evsel == NULL) if (evsel == NULL)
goto out_delete_evlist; goto out_delete_evlist;
...@@ -4021,7 +4021,7 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused, ...@@ -4021,7 +4021,7 @@ int perf_event__process_attr(struct perf_tool *tool __maybe_unused,
return -ENOMEM; return -ENOMEM;
} }
evsel = perf_evsel__new(&event->attr.attr); evsel = evsel__new(&event->attr.attr);
if (evsel == NULL) if (evsel == NULL)
return -ENOMEM; return -ENOMEM;
......
...@@ -2318,7 +2318,7 @@ static bool is_event_supported(u8 type, unsigned config) ...@@ -2318,7 +2318,7 @@ static bool is_event_supported(u8 type, unsigned config)
if (tmap == NULL) if (tmap == NULL)
return false; return false;
evsel = perf_evsel__new(&attr); evsel = evsel__new(&attr);
if (evsel) { if (evsel) {
open_return = perf_evsel__open(evsel, NULL, tmap); open_return = perf_evsel__open(evsel, NULL, tmap);
ret = open_return >= 0; ret = open_return >= 0;
......
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