diff options
author | Lionel Landwerlin <[email protected]> | 2019-12-16 15:42:55 +0200 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2020-01-28 08:54:24 -0800 |
commit | 4dc4868e8f6fb1648ff8ece119d22a7b06bae874 (patch) | |
tree | fbbd0ed23cde3d9b7fb2641865824b4ec9edb081 | |
parent | 19692e1af93fdd767bca39faf63292c38ecc6320 (diff) |
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 <[email protected]>
Cc: <[email protected]>
Acked-by: Tapani Pälli <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112>
(cherry picked from commit 44ffeb4fee8a38f9e526749eee163cbff89dea25)
-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: |