Module: Mesa
Branch: staging/23.3
Commit: 4425ef5653565c1361b15fdf80cb00946af87bc1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=4425ef5653565c1361b15fdf80cb00946af87bc1

Author: Pierre-Eric Pelloux-Prayer <[email protected]>
Date:   Mon Sep 25 11:21:38 2023 +0200

radeonsi/sqtt: clear record_counts variable

This avoids hitting the asserts in ac_sqtt_finish.

Fixes: 94ce6540d8c ("ac/sqtt: add helpers for initializing 
ac_thread_trace_data")
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26774>
(cherry picked from commit e4d537fb84369906d7eda9229f847f5d4cdfb124)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/radeonsi/si_sqtt.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 7f15a8855a1..8392b8ec25f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -194,7 +194,7 @@
         "description": "radeonsi/sqtt: clear record_counts variable",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "94ce6540d8c8c46c285d3877af4a56f5b59e5d80",
         "notes": null
diff --git a/src/gallium/drivers/radeonsi/si_sqtt.c 
b/src/gallium/drivers/radeonsi/si_sqtt.c
index 63618e666be..eeaa83f05c4 100644
--- a/src/gallium/drivers/radeonsi/si_sqtt.c
+++ b/src/gallium/drivers/radeonsi/si_sqtt.c
@@ -677,12 +677,14 @@ void si_destroy_sqtt(struct si_context *sctx) {
   list_for_each_entry_safe(struct rgp_pso_correlation_record, record,
                            &pso_correlation->record, list) {
     list_del(&record->list);
+    pso_correlation->record_count--;
     free(record);
   }
 
   list_for_each_entry_safe(struct rgp_loader_events_record, record,
                            &loader_events->record, list) {
     list_del(&record->list);
+    loader_events->record_count--;
     free(record);
   }
 
@@ -698,6 +700,7 @@ void si_destroy_sqtt(struct si_context *sctx) {
     }
     list_del(&record->list);
     free(record);
+    code_object->record_count--;
   }
 
   ac_sqtt_finish(sctx->sqtt);

Reply via email to