From a7c5a850caf49ecf78c021f5f6bc0af8604a889d Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Fri, 9 Oct 2026 13:19:49 +0200 Subject: [PATCH 1/2] refactor(rocdbgapi): shorten a train call Instead of accessing the cluster of a wave via its workgroup, access it over the wave itself. This is a simple refactoring. --- projects/rocdbgapi/src/queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocdbgapi/src/queue.cpp b/projects/rocdbgapi/src/queue.cpp index 59ced1d33538..5f0a255748c8 100644 --- a/projects/rocdbgapi/src/queue.cpp +++ b/projects/rocdbgapi/src/queue.cpp @@ -407,7 +407,7 @@ compute_queue_t::update_waves () wave->set_mark (wave_mark); wave->workgroup ().set_mark (wave_mark); - wave->workgroup ().cluster ().set_mark (wave_mark); + wave->cluster ().set_mark (wave_mark); }; process_t &process = this->process (); From 60c8055266f79d5f8d4eea65c33be52822489106 Mon Sep 17 00:00:00 2001 From: Tankut Baris Aktemur Date: Fri, 9 Oct 2026 13:23:39 +0200 Subject: [PATCH 2/2] fix(rocdbgapi): update a comment about pruning objects Now that we have clusters in the hierarchy, a comment about pruning objects is slightly outdated. Update the comment. --- projects/rocdbgapi/src/queue.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/projects/rocdbgapi/src/queue.cpp b/projects/rocdbgapi/src/queue.cpp index 5f0a255748c8..b32d8d5a85d8 100644 --- a/projects/rocdbgapi/src/queue.cpp +++ b/projects/rocdbgapi/src/queue.cpp @@ -467,14 +467,13 @@ compute_queue_t::update_waves () log_info ("%zu out of %zu wave%s running on %s", *m_waves_running, wave_count, wave_count > 1 ? "s" : "", to_cstring (id ())); - /* Iterate all waves, workgroups and dispatches belonging to this queue, and - prune waves and workgroups with a mark older than the current mark, and - dispatches with ids older (smaller) than the queue current read dispatch - id. - - Note that the waves must be pruned before the workgroups and the - workgroups must be pruned before the dispatches to ensure there are no - dangling pointers to pruned objects. */ + /* Iterate all items in the wave ->..-> dispatch hierarchy belonging + to this queue. Prune objects below dispatches if they have a mark + older than the current mark. Prune dispatches with ids older + (smaller) than the queue current read dispatch id. + + Note that the items must be pruned according to the hierarchical + order to ensure there are no dangling pointers to pruned objects. */ auto &&wave_range = process.range (); for (auto it = wave_range.begin (); it != wave_range.end ();)