Skip to content

Refactor controller_track and system_trace - #981

Open
amokiche-amd wants to merge 17 commits into
mainfrom
amokichev/controller-refactoring-one-more-time
Open

Refactor controller_track and system_trace#981
amokiche-amd wants to merge 17 commits into
mainfrom
amokichev/controller-refactoring-one-more-time

Conversation

@amokiche-amd

@amokiche-amd amokiche-amd commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Motivation

Refactor controller Track and System_trace files to replace of usage default getters to direct getters and setters.
Refactor giant functions to increase code readability.
Small minor refactors.

Technical Details

Test Plan

Test Result

Submission Checklist

Comment thread src/model/src/datamodel/rocprofvis_dm_topology.cpp Fixed
Comment thread src/model/src/datamodel/rocprofvis_dm_topology.cpp Fixed
Comment thread src/model/src/datamodel/rocprofvis_dm_topology.cpp Fixed
@amokiche-amd amokiche-amd changed the title refactor controller track Refactor controller_track and system_trace Aug 10, 2026
@amokiche-amd
amokiche-amd marked this pull request as ready for review August 10, 2026 15:39
case kRPVControllerTrackNumberOfEntries:
{
*value = m_num_entries;
*value = m_bounds.num_entries;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use GetNumberOfEntries() to prevent risk of ABI getters drifting from C++ interface

Comment on lines 652 to 658
case kRPVControllerTrackType:
{
*value = m_type;
result = kRocProfVisResultSuccess;
break;
}
case kRPVControllerTrackNumberOfEntries:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use GetTrackType() instead of m_type to prevent risk of ABI getters drifting from C++ interface

@drchen-amd drchen-amd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind this new approach of using more C++ features and directly calling functions on the objects internally instead of enum. I also do not mind sticking to C style and using enums internally.

I think new approach will lead to some bloating as for each exposed field you end up with an enum version and a direct call version.

If we proceed, this will need more hardening because I only tested for a few minutes and noticed:

  • Queue utilization and counter track stats are broken.
  • Panning and zooming will debug assert: Image

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.

4 participants