Lines Matching refs:intel_pt_pmu

53 	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->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->format, buf, &config); in intel_pt_default_config()
264 intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_pmu_default_config() argument
272 attr->config = intel_pt_default_config(intel_pt_pmu); in intel_pt_pmu_default_config()
274 intel_pt_pmu->selectable = true; in intel_pt_pmu_default_config()
280 struct perf_pmu *intel_pt_pmu) in intel_pt_find_filter() argument
285 if (evsel->attr.type == intel_pt_pmu->type) in intel_pt_find_filter()
304 const char *filter = intel_pt_find_filter(evlist, ptr->intel_pt_pmu); in intel_pt_info_priv_size()
328 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_info_fill() local
343 intel_pt_parse_terms(&intel_pt_pmu->format, "tsc", &tsc_bit); in intel_pt_info_fill()
344 intel_pt_parse_terms(&intel_pt_pmu->format, "noretcomp", in intel_pt_info_fill()
346 intel_pt_parse_terms(&intel_pt_pmu->format, "mtc", &mtc_bit); in intel_pt_info_fill()
347 mtc_freq_bits = perf_pmu__format_bits(&intel_pt_pmu->format, in intel_pt_info_fill()
349 intel_pt_parse_terms(&intel_pt_pmu->format, "cyc", &cyc_bit); in intel_pt_info_fill()
353 if (perf_pmu__scan_file(intel_pt_pmu, "max_nonturbo_ratio", in intel_pt_info_fill()
357 filter = intel_pt_find_filter(session->evlist, ptr->intel_pt_pmu); in intel_pt_info_fill()
379 auxtrace_info->priv[INTEL_PT_PMU_TYPE] = intel_pt_pmu->type; in intel_pt_info_fill()
483 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, in intel_pt_val_config_term() argument
493 if (perf_pmu__scan_file(intel_pt_pmu, caps, "%llx", &valid) != 1) in intel_pt_val_config_term()
497 perf_pmu__scan_file(intel_pt_pmu, supported, "%d", &ok) == 1 && !ok) in intel_pt_val_config_term()
502 bits = perf_pmu__format_bits(&intel_pt_pmu->format, name); in intel_pt_val_config_term()
523 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu, in intel_pt_validate_config() argument
531 err = intel_pt_val_config_term(intel_pt_pmu, "caps/cycle_thresholds", in intel_pt_validate_config()
537 err = intel_pt_val_config_term(intel_pt_pmu, "caps/mtc_periods", in intel_pt_validate_config()
543 return intel_pt_val_config_term(intel_pt_pmu, "caps/psb_periods", in intel_pt_validate_config()
554 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_recording_options() local
566 if (evsel->attr.type == intel_pt_pmu->type) { in intel_pt_recording_options()
591 err = intel_pt_validate_config(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
597 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
668 intel_pt_parse_terms(&intel_pt_pmu->format, "tsc", &tsc_bit); in intel_pt_recording_options()
787 if (evsel->attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_start()
800 if (evsel->attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_finish()
873 psb_period = intel_pt_psb_period(ptr->intel_pt_pmu, ptr->evlist); in intel_pt_snapshot_ref_buf_size()
1073 if (evsel->attr.type == ptr->intel_pt_pmu->type) in intel_pt_read_finish()
1082 struct perf_pmu *intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME); in intel_pt_recording_init() local
1085 if (!intel_pt_pmu) in intel_pt_recording_init()
1099 ptr->intel_pt_pmu = intel_pt_pmu; in intel_pt_recording_init()