Lines Matching refs:perf
23 #include "perf/intel_perf.h"
24 #include "perf/intel_perf_query.h"
42 return (2.f * perf->devinfo.timestamp_frequency) / 1000000000ull;
78 assert(!perf && "Intel perf should not be initialized at this point");
80 perf = std::make_unique<IntelPerf>(drm_device.fd);
86 for (auto &query : perf->get_queries()) {
98 for (auto &query : perf->get_queries())
127 return (int64_t)counter.oa_counter_read_uint64(perf->cfg,
129 &perf->result);
133 return counter.oa_counter_read_float(perf->cfg,
135 &perf->result);
155 intel_perf_query_result_clear(&perf->result);
164 gpu_timestamp_udw = intel_read_gpu_timestamp(drm_device.fd) & ~perf->cfg->oa_timestamp_mask;
165 if (!perf->open(sampling_period_ns, selected_query)) {
166 PPS_LOG_FATAL("Failed to open intel perf");
173 perf = nullptr;
179 /// @brief Some perf record durations can be really short
217 gpu_timestamp_udw = intel_read_gpu_timestamp(drm_device.fd) & ~perf->cfg->oa_timestamp_mask;
221 auto duration = intel_device_info_timebase_scale(&perf->devinfo,
224 // Skip perf-records that are too short by checking
250 while ((bytes_read = perf->read_oa_stream(metric_buffer.data() + total_bytes_read,
266 if (!perf->oa_stream_ready()) {
303 intel_perf_query_result_accumulate_fields(&perf->result,
315 return intel_device_info_timebase_scale(&perf->devinfo, gpu_timestamp);
321 intel_perf_query_result_clear(&perf->result);
332 return intel_device_info_timebase_scale(&perf->devinfo,