intel/perf: track end timestamp of queries

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13831>
This commit is contained in:
Lionel Landwerlin 2021-11-08 00:12:15 +02:00 committed by Marge Bot
parent 4ef6698a26
commit 215dbfd131
2 changed files with 6 additions and 0 deletions

View file

@ -1048,6 +1048,7 @@ intel_perf_query_result_accumulate(struct intel_perf_query_result *result,
result->hw_id = start[2];
if (result->reports_accumulated == 0)
result->begin_timestamp = intel_perf_report_timestamp(query, start);
result->end_timestamp = intel_perf_report_timestamp(query, end);
result->reports_accumulated++;
switch (query->oa_format) {

View file

@ -168,6 +168,11 @@ struct intel_perf_query_result {
*/
uint64_t begin_timestamp;
/**
* Timestamp of the query.
*/
uint64_t end_timestamp;
/**
* Whether the query was interrupted by another workload (aka preemption).
*/