Lines Matching refs:dirfd

189 	int dirfd;  in intel_pt_default_config()  local
191 dirfd = perf_pmu__event_source_devices_fd(); in intel_pt_default_config()
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()
233 close(dirfd); in intel_pt_default_config()
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()
531 int err, dirfd; in intel_pt_validate_config() local
537 dirfd = perf_pmu__event_source_devices_fd(); in intel_pt_validate_config()
538 if (dirfd < 0) in intel_pt_validate_config()
539 return dirfd; in intel_pt_validate_config()
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()
568 close(dirfd); in intel_pt_validate_config()