OSDN Git Service

perf evsel: Rename perf_evsel__init() to evsel__init()
authorJiri Olsa <jolsa@kernel.org>
Sun, 21 Jul 2019 11:23:53 +0000 (13:23 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:42 +0000 (18:34 -0300)
Rename perf_evsel__init() to evsel__init(), so we don't have a name
clash when we add perf_evsel__init() in libperf.

Signed-off-by: Jiri 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-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h
tools/perf/util/python.c

index f7f97ca..97bee83 100644 (file)
@@ -223,8 +223,8 @@ bool perf_evsel__is_function_event(struct evsel *evsel)
 #undef FUNCTION_EVENT
 }
 
-void perf_evsel__init(struct evsel *evsel,
-                     struct perf_event_attr *attr, int idx)
+void evsel__init(struct evsel *evsel,
+                struct perf_event_attr *attr, int idx)
 {
        evsel->idx         = idx;
        evsel->tracking    = !idx;
@@ -255,7 +255,7 @@ struct evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
 
        if (!evsel)
                return NULL;
-       perf_evsel__init(evsel, attr, idx);
+       evsel__init(evsel, attr, idx);
 
        if (perf_evsel__is_bpf_output(evsel)) {
                evsel->attr.sample_type |= (PERF_SAMPLE_RAW | PERF_SAMPLE_TIME |
@@ -350,7 +350,7 @@ struct evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx)
                event_attr_init(&attr);
                attr.config = evsel->tp_format->id;
                attr.sample_period = 1;
-               perf_evsel__init(evsel, &attr, idx);
+               evsel__init(evsel, &attr, idx);
        }
 
        return evsel;
index 3caabd8..af230d9 100644 (file)
@@ -238,8 +238,7 @@ struct evsel *perf_evsel__new_cycles(bool precise);
 
 struct tep_event *event_format__new(const char *sys, const char *name);
 
-void perf_evsel__init(struct evsel *evsel,
-                     struct perf_event_attr *attr, int idx);
+void evsel__init(struct evsel *evsel, struct perf_event_attr *attr, int idx);
 void perf_evsel__exit(struct evsel *evsel);
 void perf_evsel__delete(struct evsel *evsel);
 
index ed57b6b..f6fe3c9 100644 (file)
@@ -782,7 +782,7 @@ static int pyrf_evsel__init(struct pyrf_evsel *pevsel,
        attr.sample_id_all  = sample_id_all;
        attr.size           = sizeof(attr);
 
-       perf_evsel__init(&pevsel->evsel, &attr, idx);
+       evsel__init(&pevsel->evsel, &attr, idx);
        return 0;
 }