Skip to content

Add trace points in functions that depends on user input#9823

Merged
chvamshi-xilinx merged 1 commit into
Xilinx:masterfrom
rbramand-xilinx:userspace
May 26, 2026
Merged

Add trace points in functions that depends on user input#9823
chvamshi-xilinx merged 1 commit into
Xilinx:masterfrom
rbramand-xilinx:userspace

Conversation

@rbramand-xilinx
Copy link
Copy Markdown
Collaborator

Problem solved by the commit

Added new trace points in xrt classes that depend on user input
During earlier debugs we identified bottlenecks while creating objects like xrt::run, xrt::elf etc, so added trace points at such places

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

How problem was solved, alternative solutions (if any) and why they were rejected

Added new trace points
Using tools like perf we can capture trace data and analyze bottlenecks

Risks (if any) associated the changes in the commit

Low

What has been tested and how, request additional testing if necessary

Tested trace data captured by running test on Telluride and things work as expected

Documentation impact (if any)

NA

@rbramand-xilinx
Copy link
Copy Markdown
Collaborator Author

rbramand-xilinx commented May 19, 2026

Hi @stsoe, as discussed earlier added trace points only at places that depend on user input.
Earlier during our debugs, we observed bottlenecks mostly during xrt::elf and xrt::run (indirectly xrt::run_module) creation so added trace points during those objects creation so that we can capture time stamps without any changes. Hope this is okay

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds additional runtime trace points around XRT object construction / configuration paths that are influenced by user input (e.g., ELF/module run creation and setting dtrace control file), to help diagnose performance bottlenecks via perf/DTrace-style tracing.

Changes:

  • Added scoped trace points to AIE Gen2 / Gen2+ module run constructors.
  • Added scoped trace points to AIE Gen2 / Gen2+ ELF constructors.
  • Added a scoped trace point (and slightly reordered logic) in run_impl::set_dtrace_control_file; also includes a few whitespace-only cleanups.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
src/runtime_src/core/common/api/xrt_module.cpp Adds scoped trace points in AIE module-run constructors.
src/runtime_src/core/common/api/xrt_kernel.cpp Adds a scoped trace point in set_dtrace_control_file and refactors update ordering.
src/runtime_src/core/common/api/xrt_elf.cpp Adds scoped trace points in AIE ELF constructors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/runtime_src/core/common/api/xrt_kernel.cpp Outdated
Comment thread src/runtime_src/core/common/api/xrt_module.cpp
Comment thread src/runtime_src/core/common/api/xrt_module.cpp
Comment thread src/runtime_src/core/common/api/xrt_elf.cpp
Comment thread src/runtime_src/core/common/api/xrt_elf.cpp
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment thread src/runtime_src/core/common/api/xrt_elf.cpp
Comment thread src/runtime_src/core/common/api/xrt_elf.cpp
Comment thread src/runtime_src/core/common/api/xrt_module.cpp
Comment thread src/runtime_src/core/common/api/xrt_module.cpp
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread src/runtime_src/core/common/api/xrt_kernel.cpp Outdated
Signed-off-by: rahul <rbramand@amd.com>
@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@github-actions
Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@chvamshi-xilinx chvamshi-xilinx merged commit 307a964 into Xilinx:master May 26, 2026
82 of 86 checks passed
rbramand-xilinx added a commit to rbramand-xilinx/XRT that referenced this pull request May 26, 2026
Signed-off-by: rahul <rbramand@amd.com>
(cherry picked from commit 307a964)
chvamshi-xilinx pushed a commit that referenced this pull request May 27, 2026
(cherry picked from commit 307a964)

Signed-off-by: rahul <rbramand@amd.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.

4 participants