Skip to content

Compare Traces#904

Open
Sajeeth-Wimalasuriyan wants to merge 9 commits into
mainfrom
sw-compare-on-main
Open

Compare Traces#904
Sajeeth-Wimalasuriyan wants to merge 9 commits into
mainfrom
sw-compare-on-main

Conversation

@Sajeeth-Wimalasuriyan

Copy link
Copy Markdown
Contributor
image image

Sajeeth-Wimalasuriyan and others added 6 commits June 25, 2026 15:03
Add a File -> Compare menu entry that opens a two-pane dialog for picking
two trace databases, writes an index.yaml manifest with an optiq.compare
section, and opens it through the existing multinode loader.

Surface the source database instance ID from the model up through the
controller (kRPVControllerTrackInstanceId) so each loaded track can be
mapped to its compare source. The timeline meta area and the sidebar
tree leaves render a colored A/B badge with a tooltip showing the
source name and path.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 64874e1)
…fest

Replace the index.yaml manifest used by the Compare feature with a
dedicated load path that opens the selected trace files directly through
the existing multinode engine, so nothing is written into the user's
trace folder:

- model: add rocprofvis_db_open_database_multi to open N files as one
  combined RocprofDatabase, skipping manifest detection.
- controller: add rocprofvis_controller_alloc_compare (system-only) and
  teach SystemTrace to load from a file list; validate each input is a
  rocprof trace before combining.
- view: CompareFilesDialog hands the two paths straight to the
  controller; drop the yaml read/write and the yaml-cpp view dependency.

Persist and reopen compare projects natively in the .rpv via a
compare_files list (relative paths) instead of relying on the on-disk
manifest; bookmarks/timeline/annotations ride along as usual.

Fix a null-dereference crash in TopologyNode::GetParent (and an
out-of-bounds stream-processor lookup) exposed by combined topologies
whose tracks lack a requested ancestor type.

Route drag-and-drop into the Compare dialog's slots while it is open
instead of opening standalone trace tabs behind the modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 4dff645)
(cherry picked from commit b7fd08c)
(cherry picked from commit f445f22)
CreateTracksOrderRanking now runs on every rocprof/rocpd load, so a track with a null db_instance would crash. Match the null-guard convention used elsewhere and fall back to file index 0.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/model/src/common/rocprofvis_c_interface.cpp Dismissed
Wire up the track order ranking for compare traces: after metadata load, reorder the timeline by order_rank (tie-break on track id) using the existing move-to-index mechanism so each compared file's counterpart tracks (A, B, ...) sit adjacent. No-op for non-compare traces; saved project order still takes precedence.

Co-authored-by: Cursor <cursoragent@cursor.com>
@amokiche-amd

Copy link
Copy Markdown
Contributor

Not a comment, but a small feature request. I think when someone is working with a trace and clicks the compare button, it would be nice to reduce the number of clicks and automatically set the "first" field to the currently open trace(or the last open one from the list). Keep the browse button to allow editing; if no traces are open, keep the current state with two empty fields.

Comment thread src/model/src/database/rocprofvis_db.cpp Outdated
Comment thread src/model/src/database/rocprofvis_db.cpp
Comment thread src/model/src/database/rocprofvis_db_rocprof.cpp Outdated
Comment thread src/model/src/database/rocprofvis_db_rocpd.cpp Outdated
Comment thread src/model/src/database/rocprofvis_db.cpp
Sajeeth-Wimalasuriyan and others added 2 commits June 30, 2026 13:34
Replace the fixed partition_id * 100 stride with a running order_base so
track order_ids stay globally unique even when a partition holds more
than 100 tracks (the old stride collided with the next partition's base).

Also fix the "Crerate ... abd bd instance" typos in the rocprof/rocpd
loaders flagged in review.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants