mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
perf evlist: Fix the class prefix for 'struct evlist' sample_type methods
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>
This commit is contained in:
parent
d1f249ecbd
commit
b3c2cc2bd2
@ -2582,7 +2582,7 @@ parse_callchain_opt(const struct option *opt, const char *arg, int unset)
|
|||||||
|
|
||||||
static int setup_callchain(struct evlist *evlist)
|
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;
|
enum perf_call_graph_mode mode = CALLCHAIN_NONE;
|
||||||
|
|
||||||
if ((sample_type & PERF_SAMPLE_REGS_USER) &&
|
if ((sample_type & PERF_SAMPLE_REGS_USER) &&
|
||||||
|
@ -338,7 +338,7 @@ static int process_read_event(struct perf_tool *tool,
|
|||||||
static int report__setup_sample_type(struct report *rep)
|
static int report__setup_sample_type(struct report *rep)
|
||||||
{
|
{
|
||||||
struct perf_session *session = rep->session;
|
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);
|
bool is_pipe = perf_data__is_pipe(session->data);
|
||||||
|
|
||||||
if (session->itrace_synth_opts->callchain ||
|
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
|
* Check if we need to enable callchains based
|
||||||
* on events sample_type.
|
* on events sample_type.
|
||||||
*/
|
*/
|
||||||
sample_type = perf_evlist__combined_sample_type(*pevlist);
|
sample_type = evlist__combined_sample_type(*pevlist);
|
||||||
callchain_param_setup(sample_type);
|
callchain_param_setup(sample_type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1389,7 +1389,7 @@ repeat:
|
|||||||
|
|
||||||
has_br_stack = perf_header__has_feat(&session->header,
|
has_br_stack = perf_header__has_feat(&session->header,
|
||||||
HEADER_BRANCH_STACK);
|
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;
|
has_br_stack = false;
|
||||||
|
|
||||||
setup_forced_leader(&report, session->evlist);
|
setup_forced_leader(&report, session->evlist);
|
||||||
|
@ -2129,7 +2129,7 @@ static int process_attr(struct perf_tool *tool, union perf_event *event,
|
|||||||
* Check if we need to enable callchains based
|
* Check if we need to enable callchains based
|
||||||
* on events sample_type.
|
* on events sample_type.
|
||||||
*/
|
*/
|
||||||
sample_type = perf_evlist__combined_sample_type(evlist);
|
sample_type = evlist__combined_sample_type(evlist);
|
||||||
callchain_param_setup(sample_type);
|
callchain_param_setup(sample_type);
|
||||||
|
|
||||||
/* Enable fields for callchain entries */
|
/* 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)
|
static void script__setup_sample_type(struct perf_script *script)
|
||||||
{
|
{
|
||||||
struct perf_session *session = script->session;
|
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 (symbol_conf.use_callchain || symbol_conf.cumulate_callchain) {
|
||||||
if ((sample_type & PERF_SAMPLE_REGS_USER) &&
|
if ((sample_type & PERF_SAMPLE_REGS_USER) &&
|
||||||
|
@ -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);
|
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;
|
struct evsel *pos;
|
||||||
|
|
||||||
@ -1104,7 +1104,7 @@ bool perf_evlist__valid_sample_type(struct evlist *evlist)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 __perf_evlist__combined_sample_type(struct evlist *evlist)
|
u64 __evlist__combined_sample_type(struct evlist *evlist)
|
||||||
{
|
{
|
||||||
struct evsel *evsel;
|
struct evsel *evsel;
|
||||||
|
|
||||||
@ -1117,10 +1117,10 @@ u64 __perf_evlist__combined_sample_type(struct evlist *evlist)
|
|||||||
return evlist->combined_sample_type;
|
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;
|
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)
|
u64 perf_evlist__combined_branch_type(struct evlist *evlist)
|
||||||
|
@ -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 list_head *list);
|
||||||
void perf_evlist__set_leader(struct evlist *evlist);
|
void perf_evlist__set_leader(struct evlist *evlist);
|
||||||
|
|
||||||
u64 __perf_evlist__combined_sample_type(struct evlist *evlist);
|
u64 __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 perf_evlist__combined_branch_type(struct evlist *evlist);
|
u64 perf_evlist__combined_branch_type(struct evlist *evlist);
|
||||||
bool perf_evlist__sample_id_all(struct evlist *evlist);
|
bool perf_evlist__sample_id_all(struct evlist *evlist);
|
||||||
u16 perf_evlist__id_hdr_size(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,
|
union perf_event *event,
|
||||||
u64 *timestamp);
|
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_sample_id_all(struct evlist *evlist);
|
||||||
bool perf_evlist__valid_read_format(struct evlist *evlist);
|
bool perf_evlist__valid_read_format(struct evlist *evlist);
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ static int perf_session__open(struct perf_session *session)
|
|||||||
if (perf_header__has_feat(&session->header, HEADER_STAT))
|
if (perf_header__has_feat(&session->header, HEADER_STAT))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!perf_evlist__valid_sample_type(session->evlist)) {
|
if (!evlist__valid_sample_type(session->evlist)) {
|
||||||
pr_err("non matching sample_type\n");
|
pr_err("non matching sample_type\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1160,7 +1160,7 @@ static void perf_evlist__print_tstamp(struct evlist *evlist,
|
|||||||
union perf_event *event,
|
union perf_event *event,
|
||||||
struct perf_sample *sample)
|
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 &&
|
if (event->header.type != PERF_RECORD_SAMPLE &&
|
||||||
!perf_evlist__sample_id_all(evlist)) {
|
!perf_evlist__sample_id_all(evlist)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user