Lines Matching refs:intel_pt_pmu

48 	struct perf_pmu			*intel_pt_pmu;  member
115 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str, in intel_pt_read_config() argument
123 mask = perf_pmu__format_bits(&intel_pt_pmu->format, str); in intel_pt_read_config()
128 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_read_config()
137 static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu, in intel_pt_psb_period() argument
144 if (perf_pmu__scan_file(intel_pt_pmu, "caps/topa_multiple_entries", in intel_pt_psb_period()
157 err = intel_pt_read_config(intel_pt_pmu, "psb_period", evlist, &val); in intel_pt_psb_period()
163 pr_debug2("%s psb_period %zu\n", intel_pt_pmu->name, psb_period); in intel_pt_psb_period()
183 static u64 intel_pt_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_default_config() argument
194 if (perf_pmu__scan_file(intel_pt_pmu, "caps/mtc", "%d", in intel_pt_default_config()
199 if (perf_pmu__scan_file(intel_pt_pmu, "caps/mtc_periods", "%x", in intel_pt_default_config()
209 if (perf_pmu__scan_file(intel_pt_pmu, "caps/psb_cyc", "%d", in intel_pt_default_config()
214 if (perf_pmu__scan_file(intel_pt_pmu, "caps/psb_periods", "%x", in intel_pt_default_config()
224 if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 && in intel_pt_default_config()
225 perf_pmu__scan_file(intel_pt_pmu, "format/branch", "%c", &c) == 1) in intel_pt_default_config()
228 pr_debug2("%s default config: %s\n", intel_pt_pmu->name, buf); in intel_pt_default_config()
230 intel_pt_parse_terms(&intel_pt_pmu->format, buf, &config); in intel_pt_default_config()
259 intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_pmu_default_config() argument
267 attr->config = intel_pt_default_config(intel_pt_pmu); in intel_pt_pmu_default_config()
269 intel_pt_pmu->selectable = true; in intel_pt_pmu_default_config()
275 struct perf_pmu *intel_pt_pmu) in intel_pt_find_filter() argument
280 if (evsel->core.attr.type == intel_pt_pmu->type) in intel_pt_find_filter()
299 const char *filter = intel_pt_find_filter(evlist, ptr->intel_pt_pmu); in intel_pt_info_priv_size()
323 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_info_fill() local
338 intel_pt_parse_terms(&intel_pt_pmu->format, "tsc", &tsc_bit); in intel_pt_info_fill()
339 intel_pt_parse_terms(&intel_pt_pmu->format, "noretcomp", in intel_pt_info_fill()
341 intel_pt_parse_terms(&intel_pt_pmu->format, "mtc", &mtc_bit); in intel_pt_info_fill()
342 mtc_freq_bits = perf_pmu__format_bits(&intel_pt_pmu->format, in intel_pt_info_fill()
344 intel_pt_parse_terms(&intel_pt_pmu->format, "cyc", &cyc_bit); in intel_pt_info_fill()
348 if (perf_pmu__scan_file(intel_pt_pmu, "max_nonturbo_ratio", in intel_pt_info_fill()
352 filter = intel_pt_find_filter(session->evlist, ptr->intel_pt_pmu); in intel_pt_info_fill()
374 auxtrace_info->priv[INTEL_PT_PMU_TYPE] = intel_pt_pmu->type; in intel_pt_info_fill()
478 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, in intel_pt_val_config_term() argument
488 if (perf_pmu__scan_file(intel_pt_pmu, caps, "%llx", &valid) != 1) in intel_pt_val_config_term()
492 perf_pmu__scan_file(intel_pt_pmu, supported, "%d", &ok) == 1 && !ok) in intel_pt_val_config_term()
497 bits = perf_pmu__format_bits(&intel_pt_pmu->format, name); in intel_pt_val_config_term()
518 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu, in intel_pt_validate_config() argument
531 if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 && in intel_pt_validate_config()
537 err = intel_pt_val_config_term(intel_pt_pmu, "caps/cycle_thresholds", in intel_pt_validate_config()
543 err = intel_pt_val_config_term(intel_pt_pmu, "caps/mtc_periods", in intel_pt_validate_config()
549 return intel_pt_val_config_term(intel_pt_pmu, "caps/psb_periods", in intel_pt_validate_config()
580 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_recording_options() local
592 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_recording_options()
620 err = intel_pt_validate_config(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
626 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
697 intel_pt_parse_terms(&intel_pt_pmu->format, "tsc", &tsc_bit); in intel_pt_recording_options()
816 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_start()
829 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_finish()
902 psb_period = intel_pt_psb_period(ptr->intel_pt_pmu, ptr->evlist); in intel_pt_snapshot_ref_buf_size()
1102 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_read_finish()
1111 struct perf_pmu *intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME); in intel_pt_recording_init() local
1114 if (!intel_pt_pmu) in intel_pt_recording_init()
1128 ptr->intel_pt_pmu = intel_pt_pmu; in intel_pt_recording_init()