diff options
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/intel/perf/gen_perf.c | 6 | ||||
-rw-r--r-- | src/intel/perf/gen_perf.h | 5 | ||||
-rw-r--r-- | src/intel/perf/gen_perf_mdapi.c | 9 |
4 files changed, 19 insertions, 3 deletions
diff --git a/.pick_status.json b/.pick_status.json index 94f7b6321ec..d7b5b058900 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3118,7 +3118,7 @@ "description": "intel/perf: report query split for mdapi", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/intel/perf/gen_perf.c b/src/intel/perf/gen_perf.c index a7436530f9b..cc8c4d5a368 100644 --- a/src/intel/perf/gen_perf.c +++ b/src/intel/perf/gen_perf.c @@ -2361,6 +2361,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; diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h index 25f234b5bde..bd775536595 100644 --- a/src/intel/perf/gen_perf.h +++ b/src/intel/perf/gen_perf.h @@ -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 { diff --git a/src/intel/perf/gen_perf_mdapi.c b/src/intel/perf/gen_perf_mdapi.c index 0f35671930f..4c70d1f0207 100644 --- a/src/intel/perf/gen_perf_mdapi.c +++ b/src/intel/perf/gen_perf_mdapi.c @@ -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: |