Lines Matching refs:intel_pt_pmu

52 	struct perf_pmu			*intel_pt_pmu;  member
113 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str, in intel_pt_read_config() argument
121 mask = perf_pmu__format_bits(intel_pt_pmu, str); in intel_pt_read_config()
126 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_read_config()
135 static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu, in intel_pt_psb_period() argument
142 if (perf_pmu__scan_file(intel_pt_pmu, "caps/topa_multiple_entries", in intel_pt_psb_period()
155 err = intel_pt_read_config(intel_pt_pmu, "psb_period", evlist, &val); in intel_pt_psb_period()
161 pr_debug2("%s psb_period %zu\n", intel_pt_pmu->name, psb_period); in intel_pt_psb_period()
181 static u64 intel_pt_default_config(const struct perf_pmu *intel_pt_pmu) in intel_pt_default_config() argument
195 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc", "%d", in intel_pt_default_config()
200 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/mtc_periods", "%x", in intel_pt_default_config()
210 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_cyc", "%d", in intel_pt_default_config()
215 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "caps/psb_periods", "%x", in intel_pt_default_config()
225 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/pt", "%c", &c) == 1 && in intel_pt_default_config()
226 perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/branch", "%c", &c) == 1) in intel_pt_default_config()
229 pr_debug2("%s default config: %s\n", intel_pt_pmu->name, buf); in intel_pt_default_config()
231 intel_pt_parse_terms(intel_pt_pmu, buf, &config); in intel_pt_default_config()
260 void intel_pt_pmu_default_config(const struct perf_pmu *intel_pt_pmu, in intel_pt_pmu_default_config() argument
267 config = intel_pt_default_config(intel_pt_pmu); in intel_pt_pmu_default_config()
274 struct perf_pmu *intel_pt_pmu) in intel_pt_find_filter() argument
279 if (evsel->core.attr.type == intel_pt_pmu->type) in intel_pt_find_filter()
298 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
339 intel_pt_parse_terms(intel_pt_pmu, "tsc", &tsc_bit); in intel_pt_info_fill()
340 intel_pt_parse_terms(intel_pt_pmu, "noretcomp", &noretcomp_bit); in intel_pt_info_fill()
341 intel_pt_parse_terms(intel_pt_pmu, "mtc", &mtc_bit); in intel_pt_info_fill()
342 mtc_freq_bits = perf_pmu__format_bits(intel_pt_pmu, "mtc_period"); in intel_pt_info_fill()
343 intel_pt_parse_terms(intel_pt_pmu, "cyc", &cyc_bit); in intel_pt_info_fill()
347 if (perf_pmu__scan_file(intel_pt_pmu, "max_nonturbo_ratio", in intel_pt_info_fill()
350 if (perf_pmu__scan_file(intel_pt_pmu, "caps/event_trace", in intel_pt_info_fill()
354 filter = intel_pt_find_filter(session->evlist, ptr->intel_pt_pmu); in intel_pt_info_fill()
376 auxtrace_info->priv[INTEL_PT_PMU_TYPE] = intel_pt_pmu->type; in intel_pt_info_fill()
488 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, int dirfd, in intel_pt_val_config_term() argument
498 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, caps, "%llx", &valid) != 1) in intel_pt_val_config_term()
502 perf_pmu__scan_file_at(intel_pt_pmu, dirfd, supported, "%d", &ok) == 1 && !ok) in intel_pt_val_config_term()
507 bits = perf_pmu__format_bits(intel_pt_pmu, name); in intel_pt_val_config_term()
528 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu, in intel_pt_validate_config() argument
545 if (perf_pmu__scan_file_at(intel_pt_pmu, dirfd, "format/pt", "%c", &c) == 1 && in intel_pt_validate_config()
551 err = intel_pt_val_config_term(intel_pt_pmu, dirfd, "caps/cycle_thresholds", in intel_pt_validate_config()
557 err = intel_pt_val_config_term(intel_pt_pmu, dirfd, "caps/mtc_periods", in intel_pt_validate_config()
563 err = intel_pt_val_config_term(intel_pt_pmu, dirfd, "caps/psb_periods", in intel_pt_validate_config()
615 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_recording_options() local
627 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_recording_options()
664 evsel__set_config_if_unset(intel_pt_pmu, intel_pt_evsel, in intel_pt_recording_options()
667 err = intel_pt_validate_config(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
673 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
718 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, "tsc", &tsc_bit); in intel_pt_recording_options()
901 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_start()
914 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_finish()
987 psb_period = intel_pt_psb_period(ptr->intel_pt_pmu, ptr->evlist); in intel_pt_snapshot_ref_buf_size()
1182 struct perf_pmu *intel_pt_pmu = perf_pmus__find(INTEL_PT_PMU_NAME); in intel_pt_recording_init() local
1185 if (!intel_pt_pmu) in intel_pt_recording_init()
1199 ptr->intel_pt_pmu = intel_pt_pmu; in intel_pt_recording_init()