Lines Matching refs:intel_pt_pmu
51 struct perf_pmu *intel_pt_pmu; member
121 static int intel_pt_read_config(struct perf_pmu *intel_pt_pmu, const char *str, in intel_pt_read_config() argument
129 mask = perf_pmu__format_bits(&intel_pt_pmu->format, str); in intel_pt_read_config()
134 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_read_config()
143 static size_t intel_pt_psb_period(struct perf_pmu *intel_pt_pmu, in intel_pt_psb_period() argument
150 if (perf_pmu__scan_file(intel_pt_pmu, "caps/topa_multiple_entries", in intel_pt_psb_period()
163 err = intel_pt_read_config(intel_pt_pmu, "psb_period", evlist, &val); in intel_pt_psb_period()
169 pr_debug2("%s psb_period %zu\n", intel_pt_pmu->name, psb_period); in intel_pt_psb_period()
189 static u64 intel_pt_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_default_config() argument
200 if (perf_pmu__scan_file(intel_pt_pmu, "caps/mtc", "%d", in intel_pt_default_config()
205 if (perf_pmu__scan_file(intel_pt_pmu, "caps/mtc_periods", "%x", in intel_pt_default_config()
215 if (perf_pmu__scan_file(intel_pt_pmu, "caps/psb_cyc", "%d", in intel_pt_default_config()
220 if (perf_pmu__scan_file(intel_pt_pmu, "caps/psb_periods", "%x", in intel_pt_default_config()
230 if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 && in intel_pt_default_config()
231 perf_pmu__scan_file(intel_pt_pmu, "format/branch", "%c", &c) == 1) in intel_pt_default_config()
234 pr_debug2("%s default config: %s\n", intel_pt_pmu->name, buf); in intel_pt_default_config()
236 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, buf, in intel_pt_default_config()
266 intel_pt_pmu_default_config(struct perf_pmu *intel_pt_pmu) in intel_pt_pmu_default_config() argument
274 attr->config = intel_pt_default_config(intel_pt_pmu); in intel_pt_pmu_default_config()
276 intel_pt_pmu->selectable = true; in intel_pt_pmu_default_config()
282 struct perf_pmu *intel_pt_pmu) in intel_pt_find_filter() argument
287 if (evsel->core.attr.type == intel_pt_pmu->type) in intel_pt_find_filter()
306 const char *filter = intel_pt_find_filter(evlist, ptr->intel_pt_pmu); in intel_pt_info_priv_size()
331 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_info_fill() local
347 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
349 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
351 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
353 mtc_freq_bits = perf_pmu__format_bits(&intel_pt_pmu->format, in intel_pt_info_fill()
355 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_info_fill()
360 if (perf_pmu__scan_file(intel_pt_pmu, "max_nonturbo_ratio", in intel_pt_info_fill()
363 if (perf_pmu__scan_file(intel_pt_pmu, "caps/event_trace", in intel_pt_info_fill()
367 filter = intel_pt_find_filter(session->evlist, ptr->intel_pt_pmu); in intel_pt_info_fill()
389 auxtrace_info->priv[INTEL_PT_PMU_TYPE] = intel_pt_pmu->type; in intel_pt_info_fill()
489 static int intel_pt_val_config_term(struct perf_pmu *intel_pt_pmu, in intel_pt_val_config_term() argument
499 if (perf_pmu__scan_file(intel_pt_pmu, caps, "%llx", &valid) != 1) in intel_pt_val_config_term()
503 perf_pmu__scan_file(intel_pt_pmu, supported, "%d", &ok) == 1 && !ok) in intel_pt_val_config_term()
508 bits = perf_pmu__format_bits(&intel_pt_pmu->format, name); in intel_pt_val_config_term()
529 static int intel_pt_validate_config(struct perf_pmu *intel_pt_pmu, in intel_pt_validate_config() argument
542 if (perf_pmu__scan_file(intel_pt_pmu, "format/pt", "%c", &c) == 1 && in intel_pt_validate_config()
548 err = intel_pt_val_config_term(intel_pt_pmu, "caps/cycle_thresholds", in intel_pt_validate_config()
554 err = intel_pt_val_config_term(intel_pt_pmu, "caps/mtc_periods", in intel_pt_validate_config()
560 return intel_pt_val_config_term(intel_pt_pmu, "caps/psb_periods", in intel_pt_validate_config()
565 static void intel_pt_config_sample_mode(struct perf_pmu *intel_pt_pmu, in intel_pt_config_sample_mode() argument
574 bits = perf_pmu__format_bits(&intel_pt_pmu->format, "psb_period"); in intel_pt_config_sample_mode()
627 struct perf_pmu *intel_pt_pmu = ptr->intel_pt_pmu; in intel_pt_recording_options() local
639 if (evsel->core.attr.type == intel_pt_pmu->type) { in intel_pt_recording_options()
675 intel_pt_config_sample_mode(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
677 err = intel_pt_validate_config(intel_pt_pmu, intel_pt_evsel); in intel_pt_recording_options()
683 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
728 size_t psb_period = intel_pt_psb_period(intel_pt_pmu, evlist); in intel_pt_recording_options()
788 intel_pt_parse_terms(intel_pt_pmu->name, &intel_pt_pmu->format, in intel_pt_recording_options()
909 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_start()
922 if (evsel->core.attr.type == ptr->intel_pt_pmu->type) in intel_pt_snapshot_finish()
995 psb_period = intel_pt_psb_period(ptr->intel_pt_pmu, ptr->evlist); in intel_pt_snapshot_ref_buf_size()
1190 struct perf_pmu *intel_pt_pmu = perf_pmu__find(INTEL_PT_PMU_NAME); in intel_pt_recording_init() local
1193 if (!intel_pt_pmu) in intel_pt_recording_init()
1207 ptr->intel_pt_pmu = intel_pt_pmu; in intel_pt_recording_init()
1208 ptr->itr.pmu = intel_pt_pmu; in intel_pt_recording_init()