perf script: Fixup 'struct evsel_script' method prefix

They all operate on 'struct evsel_script' instances, so should be
prefixed with evsel_script__, not with perf_evsel_script__.
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 210e4c89
...@@ -314,8 +314,7 @@ static inline struct evsel_script *evsel_script(struct evsel *evsel) ...@@ -314,8 +314,7 @@ static inline struct evsel_script *evsel_script(struct evsel *evsel)
return (struct evsel_script *)evsel->priv; return (struct evsel_script *)evsel->priv;
} }
static struct evsel_script *perf_evsel_script__new(struct evsel *evsel, static struct evsel_script *evsel_script__new(struct evsel *evsel, struct perf_data *data)
struct perf_data *data)
{ {
struct evsel_script *es = zalloc(sizeof(*es)); struct evsel_script *es = zalloc(sizeof(*es));
...@@ -335,7 +334,7 @@ static struct evsel_script *perf_evsel_script__new(struct evsel *evsel, ...@@ -335,7 +334,7 @@ static struct evsel_script *perf_evsel_script__new(struct evsel *evsel,
return NULL; return NULL;
} }
static void perf_evsel_script__delete(struct evsel_script *es) static void evsel_script__delete(struct evsel_script *es)
{ {
zfree(&es->filename); zfree(&es->filename);
fclose(es->fp); fclose(es->fp);
...@@ -343,7 +342,7 @@ static void perf_evsel_script__delete(struct evsel_script *es) ...@@ -343,7 +342,7 @@ static void perf_evsel_script__delete(struct evsel_script *es)
free(es); free(es);
} }
static int perf_evsel_script__fprintf(struct evsel_script *es, FILE *fp) static int evsel_script__fprintf(struct evsel_script *es, FILE *fp)
{ {
struct stat st; struct stat st;
...@@ -2219,8 +2218,7 @@ static int process_attr(struct perf_tool *tool, union perf_event *event, ...@@ -2219,8 +2218,7 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
if (!evsel->priv) { if (!evsel->priv) {
if (scr->per_event_dump) { if (scr->per_event_dump) {
evsel->priv = perf_evsel_script__new(evsel, evsel->priv = evsel_script__new(evsel, scr->session->data);
scr->session->data);
} else { } else {
es = zalloc(sizeof(*es)); es = zalloc(sizeof(*es));
if (!es) if (!es)
...@@ -2475,7 +2473,7 @@ static void perf_script__fclose_per_event_dump(struct perf_script *script) ...@@ -2475,7 +2473,7 @@ static void perf_script__fclose_per_event_dump(struct perf_script *script)
evlist__for_each_entry(evlist, evsel) { evlist__for_each_entry(evlist, evsel) {
if (!evsel->priv) if (!evsel->priv)
break; break;
perf_evsel_script__delete(evsel->priv); evsel_script__delete(evsel->priv);
evsel->priv = NULL; evsel->priv = NULL;
} }
} }
...@@ -2495,7 +2493,7 @@ static int perf_script__fopen_per_event_dump(struct perf_script *script) ...@@ -2495,7 +2493,7 @@ static int perf_script__fopen_per_event_dump(struct perf_script *script)
if (evsel->priv != NULL) if (evsel->priv != NULL)
continue; continue;
evsel->priv = perf_evsel_script__new(evsel, script->session->data); evsel->priv = evsel_script__new(evsel, script->session->data);
if (evsel->priv == NULL) if (evsel->priv == NULL)
goto out_err_fclose; goto out_err_fclose;
} }
...@@ -2530,8 +2528,8 @@ static void perf_script__exit_per_event_dump_stats(struct perf_script *script) ...@@ -2530,8 +2528,8 @@ static void perf_script__exit_per_event_dump_stats(struct perf_script *script)
evlist__for_each_entry(script->session->evlist, evsel) { evlist__for_each_entry(script->session->evlist, evsel) {
struct evsel_script *es = evsel->priv; struct evsel_script *es = evsel->priv;
perf_evsel_script__fprintf(es, stdout); evsel_script__fprintf(es, stdout);
perf_evsel_script__delete(es); evsel_script__delete(es);
evsel->priv = NULL; evsel->priv = NULL;
} }
} }
......
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