Lines Matching refs:intel_pt_pmu

50 	struct perf_pmu			*intel_pt_pmu;  member
120 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str, in intel_pt_read_config() argument
128 mask = perf_pmu__format_bits(&intel_pt_pmu->format, str); in intel_pt_read_config()
133 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_read_config()
142 static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu, in intel_pt_psb_period() argument
149 if (perf_pmu__scan_file(intel_pt_pmu, "caps/topa_multiple_entries", in intel_pt_psb_period()
162 err = intel_pt_read_config(intel_pt_pmu, "psb_period", evlist, &val); in intel_pt_psb_period()
168 pr_debug2("%s psb_period %zu\n", intel_pt_pmu->name, psb_period); in intel_pt_psb_period()
188 static u64 intel_pt_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_default_config() argument
199 if (perf_pmu__scan_file(intel_pt_pmu, "caps/mtc", "%d", in intel_pt_default_config()
204 if (perf_pmu__scan_file(intel_pt_pmu, "caps/mtc_periods", "%x", in intel_pt_default_config()
214 if (perf_pmu__scan_file(intel_pt_pmu, "caps/psb_cyc", "%d", in intel_pt_default_config()
219 if (perf_pmu__scan_file(intel_pt_pmu, "caps/psb_periods", "%x", in intel_pt_default_config()
229 if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 && in intel_pt_default_config()
230 perf_pmu__scan_file(intel_pt_pmu, "format/branch", "%c", &c) == 1) in intel_pt_default_config()
233 pr_debug2("%s default config: %s\n", intel_pt_pmu->name, buf); in intel_pt_default_config()
235 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, buf, in intel_pt_default_config()
265 intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_pmu_default_config() argument
273 attr->config = intel_pt_default_config(intel_pt_pmu); in intel_pt_pmu_default_config()
275 intel_pt_pmu->selectable = true; in intel_pt_pmu_default_config()
281 struct perf_pmu *intel_pt_pmu) in intel_pt_find_filter() argument
286 if (evsel->core.attr.type == intel_pt_pmu->type) in intel_pt_find_filter()
305 const char *filter = intel_pt_find_filter(evlist, ptr->intel_pt_pmu); in intel_pt_info_priv_size()
329 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_info_fill() local
344 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
346 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
348 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
350 mtc_freq_bits = perf_pmu__format_bits(&intel_pt_pmu->format, in intel_pt_info_fill()
352 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
357 if (perf_pmu__scan_file(intel_pt_pmu, "max_nonturbo_ratio", in intel_pt_info_fill()
361 filter = intel_pt_find_filter(session->evlist, ptr->intel_pt_pmu); in intel_pt_info_fill()
383 auxtrace_info->priv[INTEL_PT_PMU_TYPE] = intel_pt_pmu->type; in intel_pt_info_fill()
487 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, in intel_pt_val_config_term() argument
497 if (perf_pmu__scan_file(intel_pt_pmu, caps, "%llx", &valid) != 1) in intel_pt_val_config_term()
501 perf_pmu__scan_file(intel_pt_pmu, supported, "%d", &ok) == 1 && !ok) in intel_pt_val_config_term()
506 bits = perf_pmu__format_bits(&intel_pt_pmu->format, name); in intel_pt_val_config_term()
527 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu, in intel_pt_validate_config() argument
540 if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 && in intel_pt_validate_config()
546 err = intel_pt_val_config_term(intel_pt_pmu, "caps/cycle_thresholds", in intel_pt_validate_config()
552 err = intel_pt_val_config_term(intel_pt_pmu, "caps/mtc_periods", in intel_pt_validate_config()
558 return intel_pt_val_config_term(intel_pt_pmu, "caps/psb_periods", in intel_pt_validate_config()
563 static void intel_pt_config_sample_mode(struct perf_pmu *intel_pt_pmu, in intel_pt_config_sample_mode() argument
572 bits = perf_pmu__format_bits(&intel_pt_pmu->format, "psb_period"); in intel_pt_config_sample_mode()
625 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_recording_options() local
637 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_recording_options()
672 intel_pt_config_sample_mode(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
674 err = intel_pt_validate_config(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
680 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
725 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
779 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_recording_options()
905 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_start()
918 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_finish()
991 psb_period = intel_pt_psb_period(ptr->intel_pt_pmu, ptr->evlist); in intel_pt_snapshot_ref_buf_size()
1186 struct perf_pmu *intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME); in intel_pt_recording_init() local
1189 if (!intel_pt_pmu) in intel_pt_recording_init()
1203 ptr->intel_pt_pmu = intel_pt_pmu; in intel_pt_recording_init()
1204 ptr->itr.pmu = intel_pt_pmu; in intel_pt_recording_init()