perf evlist: Fix the class prefix for 'struct evlist' sample_type methods
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 17 Jun 2020 12:24:21 +0000 (09:24 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 22 Jun 2020 19:28:09 +0000 (16:28 -0300)
To differentiate from libperf's 'struct perf_evlist' methods.

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>
tools/perf/builtin-c2c.c
tools/perf/builtin-report.c
tools/perf/builtin-script.c
tools/perf/util/evlist.c
tools/perf/util/evlist.h
tools/perf/util/session.c

index d617d56..5938b10 100644 (file)
@@ -2582,7 +2582,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
 
 static int setup_callchain(struct evlist *evlist)
 {
-       u64 sample_type = perf_evlist__combined_sample_type(evlist);
+       u64 sample_type = evlist__combined_sample_type(evlist);
        enum perf_call_graph_mode mode = CALLCHAIN_NONE;
 
        if ((sample_type & PERF_SAMPLE_REGS_USER) &&
index 5f1d2a8..67e0692 100644 (file)
@@ -338,7 +338,7 @@ static int process_read_event(struct perf_tool *tool,
 static int report__setup_sample_type(struct report *rep)
 {
        struct perf_session *session = rep->session;
-       u64 sample_type = perf_evlist__combined_sample_type(session->evlist);
+       u64 sample_type = evlist__combined_sample_type(session->evlist);
        bool is_pipe = perf_data__is_pipe(session->data);
 
        if (session->itrace_synth_opts->callchain ||
@@ -1093,7 +1093,7 @@ static int process_attr(struct perf_tool *tool __maybe_unused,
         * Check if we need to enable callchains based
         * on events sample_type.
         */
-       sample_type = perf_evlist__combined_sample_type(*pevlist);
+       sample_type = evlist__combined_sample_type(*pevlist);
        callchain_param_setup(sample_type);
        return 0;
 }
@@ -1389,7 +1389,7 @@ repeat:
 
        has_br_stack = perf_header__has_feat(&session->header,
                                             HEADER_BRANCH_STACK);
-       if (perf_evlist__combined_sample_type(session->evlist) & PERF_SAMPLE_STACK_USER)
+       if (evlist__combined_sample_type(session->evlist) & PERF_SAMPLE_STACK_USER)
                has_br_stack = false;
 
        setup_forced_leader(&report, session->evlist);
index 1ff6a8a..a47d338 100644 (file)
@@ -2129,7 +2129,7 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
         * Check if we need to enable callchains based
         * on events sample_type.
         */
-       sample_type = perf_evlist__combined_sample_type(evlist);
+       sample_type = evlist__combined_sample_type(evlist);
        callchain_param_setup(sample_type);
 
        /* Enable fields for callchain entries */
@@ -3171,7 +3171,7 @@ static int have_cmd(int argc, const char **argv)
 static void script__setup_sample_type(struct perf_script *script)
 {
        struct perf_session *session = script->session;
-       u64 sample_type = perf_evlist__combined_sample_type(session->evlist);
+       u64 sample_type = evlist__combined_sample_type(session->evlist);
 
        if (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) {
                if ((sample_type & PERF_SAMPLE_REGS_USER) &&
index 4b7f9f9..6415f97 100644 (file)
@@ -1085,7 +1085,7 @@ int perf_evlist__append_tp_filter_pid(struct evlist *evlist, pid_t pid)
        return perf_evlist__append_tp_filter_pids(evlist, 1, &pid);
 }
 
-bool perf_evlist__valid_sample_type(struct evlist *evlist)
+bool evlist__valid_sample_type(struct evlist *evlist)
 {
        struct evsel *pos;
 
@@ -1104,7 +1104,7 @@ bool perf_evlist__valid_sample_type(struct evlist *evlist)
        return true;
 }
 
-u64 __perf_evlist__combined_sample_type(struct evlist *evlist)
+u64 __evlist__combined_sample_type(struct evlist *evlist)
 {
        struct evsel *evsel;
 
@@ -1117,10 +1117,10 @@ u64 __perf_evlist__combined_sample_type(struct evlist *evlist)
        return evlist->combined_sample_type;
 }
 
-u64 perf_evlist__combined_sample_type(struct evlist *evlist)
+u64 evlist__combined_sample_type(struct evlist *evlist)
 {
        evlist->combined_sample_type = 0;
-       return __perf_evlist__combined_sample_type(evlist);
+       return __evlist__combined_sample_type(evlist);
 }
 
 u64 perf_evlist__combined_branch_type(struct evlist *evlist)
index a832639..2edc151 100644 (file)
@@ -218,8 +218,8 @@ int perf_evlist__apply_filters(struct evlist *evlist, struct evsel **err_evsel);
 void __perf_evlist__set_leader(struct list_head *list);
 void perf_evlist__set_leader(struct evlist *evlist);
 
-u64 __perf_evlist__combined_sample_type(struct evlist *evlist);
-u64 perf_evlist__combined_sample_type(struct evlist *evlist);
+u64 __evlist__combined_sample_type(struct evlist *evlist);
+u64 evlist__combined_sample_type(struct evlist *evlist);
 u64 perf_evlist__combined_branch_type(struct evlist *evlist);
 bool perf_evlist__sample_id_all(struct evlist *evlist);
 u16 perf_evlist__id_hdr_size(struct evlist *evlist);
@@ -231,7 +231,7 @@ int perf_evlist__parse_sample_timestamp(struct evlist *evlist,
                                        union perf_event *event,
                                        u64 *timestamp);
 
-bool perf_evlist__valid_sample_type(struct evlist *evlist);
+bool evlist__valid_sample_type(struct evlist *evlist);
 bool perf_evlist__valid_sample_id_all(struct evlist *evlist);
 bool perf_evlist__valid_read_format(struct evlist *evlist);
 
index 1a157e8..cbc8c47 100644 (file)
@@ -115,7 +115,7 @@ static int perf_session__open(struct perf_session *session)
        if (perf_header__has_feat(&session->header, HEADER_STAT))
                return 0;
 
-       if (!perf_evlist__valid_sample_type(session->evlist)) {
+       if (!evlist__valid_sample_type(session->evlist)) {
                pr_err("non matching sample_type\n");
                return -1;
        }
@@ -1160,7 +1160,7 @@ static void perf_evlist__print_tstamp(struct evlist *evlist,
                                       union perf_event *event,
                                       struct perf_sample *sample)
 {
-       u64 sample_type = __perf_evlist__combined_sample_type(evlist);
+       u64 sample_type = __evlist__combined_sample_type(evlist);
 
        if (event->header.type != PERF_RECORD_SAMPLE &&
            !perf_evlist__sample_id_all(evlist)) {