]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
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 d617d5682c6884f63816e21ba2e4c819067392c8..5938b100eaf4c273b3cf6822fb469a56b8610838 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 5f1d2a878fadef8e297217f2e2c5fee403b8509e..67e0692489fad2b09690393d95999d2f1787964f 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 1ff6a8a8dde514f80f3e36a32874a2be02c9e343..a47d3386f4b4e7924818247379a72fa83cc71c4c 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 4b7f9f9b1588ef62abff2be89afaee2bf2b06a07..6415f97e22995c23e6d0e0c6eb890f26136e538b 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 a832639a82218f9b4298324b6b8f39028129df9d..2edc1512c4438ebb668689184035ee8ceaf573b7 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 1a157e84a04a56d246b12334594e9cb5cf127fd5..cbc8c476c8d33778a3b8d565aa9158f195ab9945 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)) {