intel/perf: report query split for mdapi
Also forgotten in the initial implementation. v2: Report begin timestamp scaled by the timestamp frequency (Windows behavior) v3: Rename split to disjoint to match GL terminology (Tapani) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Acked-by: Tapani Pälli <tapani.palli@intel.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112>
This commit is contained in:
parent
3bb8a4bfec
commit
44ffeb4fee
|
@ -2372,6 +2372,12 @@ accumulate_oa_reports(struct gen_perf_context *perf_ctx,
|
|||
gen_perf_query_result_accumulate(&query->oa.result,
|
||||
query->queryinfo,
|
||||
last, report);
|
||||
} else {
|
||||
/* We're not adding the delta because we've identified it's not
|
||||
* for the context we filter for. We can consider that the
|
||||
* query was split.
|
||||
*/
|
||||
query->oa.result.query_disjoint = true;
|
||||
}
|
||||
|
||||
last = report;
|
||||
|
|
|
@ -118,6 +118,11 @@ struct gen_perf_query_result {
|
|||
* Timestamp of the query.
|
||||
*/
|
||||
uint64_t begin_timestamp;
|
||||
|
||||
/**
|
||||
* Whether the query was interrupted by another workload (aka preemption).
|
||||
*/
|
||||
bool query_disjoint;
|
||||
};
|
||||
|
||||
struct gen_perf_query_counter {
|
||||
|
|
|
@ -54,6 +54,7 @@ gen_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
|||
gen_device_info_timebase_scale(devinfo, result->accumulator[0]);
|
||||
mdapi_data->CoreFrequency = freq_end;
|
||||
mdapi_data->CoreFrequencyChanged = freq_end != freq_start;
|
||||
mdapi_data->SplitOccured = result->query_disjoint;
|
||||
return sizeof(*mdapi_data);
|
||||
}
|
||||
case 8: {
|
||||
|
@ -73,7 +74,8 @@ gen_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
|||
mdapi_data->ReportsCount = result->reports_accumulated;
|
||||
mdapi_data->TotalTime =
|
||||
gen_device_info_timebase_scale(devinfo, result->accumulator[0]);
|
||||
mdapi_data->BeginTimestamp = result->begin_timestamp;
|
||||
mdapi_data->BeginTimestamp =
|
||||
gen_device_info_timebase_scale(devinfo, result->begin_timestamp);
|
||||
mdapi_data->GPUTicks = result->accumulator[1];
|
||||
mdapi_data->CoreFrequency = freq_end;
|
||||
mdapi_data->CoreFrequencyChanged = freq_end != freq_start;
|
||||
|
@ -81,6 +83,7 @@ gen_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
|||
(result->slice_frequency[0] + result->slice_frequency[1]) / 2ULL;
|
||||
mdapi_data->UnsliceFrequency =
|
||||
(result->unslice_frequency[0] + result->unslice_frequency[1]) / 2ULL;
|
||||
mdapi_data->SplitOccured = result->query_disjoint;
|
||||
return sizeof(*mdapi_data);
|
||||
}
|
||||
case 9:
|
||||
|
@ -102,7 +105,8 @@ gen_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
|||
mdapi_data->ReportsCount = result->reports_accumulated;
|
||||
mdapi_data->TotalTime =
|
||||
gen_device_info_timebase_scale(devinfo, result->accumulator[0]);
|
||||
mdapi_data->BeginTimestamp = result->begin_timestamp;
|
||||
mdapi_data->BeginTimestamp =
|
||||
gen_device_info_timebase_scale(devinfo, result->begin_timestamp);
|
||||
mdapi_data->GPUTicks = result->accumulator[1];
|
||||
mdapi_data->CoreFrequency = freq_end;
|
||||
mdapi_data->CoreFrequencyChanged = freq_end != freq_start;
|
||||
|
@ -110,6 +114,7 @@ gen_perf_query_result_write_mdapi(void *data, uint32_t data_size,
|
|||
(result->slice_frequency[0] + result->slice_frequency[1]) / 2ULL;
|
||||
mdapi_data->UnsliceFrequency =
|
||||
(result->unslice_frequency[0] + result->unslice_frequency[1]) / 2ULL;
|
||||
mdapi_data->SplitOccured = result->query_disjoint;
|
||||
return sizeof(*mdapi_data);
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue