Skip to content

Warning when interface trace and start_to_bytes profile collide#61

Open
predutta wants to merge 2 commits intoXilinx:masterfrom
predutta:aie-trace-profile-user-event-warn-2026.1
Open

Warning when interface trace and start_to_bytes profile collide#61
predutta wants to merge 2 commits intoXilinx:masterfrom
predutta:aie-trace-profile-user-event-warn-2026.1

Conversation

@predutta
Copy link
Copy Markdown
Collaborator

This change adds a one-time runtime warning when AIE interface (shim) tile tracing and the AIE profile metric start_to_bytes_transferred are both enabled on interface tiles, since they can contend for the same PL user event and may corrupt trace data. The warning is issued from the AIE trace setup path after metrics are validated, for client, edge, and VE2 trace flows.

CR fixed: [CR-1252790]
Fix re used events for interface tile AIE trace and Start to Bytes in xrt.ini

Tested on vck190 board.

…ntend on PL user event

Signed-off-by: Prerona Dutta <predutta@xcopredutta50x.amd.com>
Copy link
Copy Markdown

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

Adds a runtime, one-time warning when interface (shim) tile AIE trace and the AIE profile metric start_to_bytes_transferred are both enabled on interface tiles, since they may contend for the same PL user event and corrupt trace output.

Changes:

  • Introduces warnIfAieInterfaceTraceContendsWithStartToBytes() in the AIE trace util layer to detect the conflicting configuration and emit a warning once.
  • Calls the new warning helper from VE2, edge, and client trace setup paths after metrics validation.
  • Adds config-reader usage in the trace util to inspect AIE profile settings for interface-tile metrics.

Reviewed changes

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

Show a summary per file
File Description
profile/plugin/aie_trace/ve2/aie_trace.cpp Invokes the new contention warning during VE2 trace metric setup.
profile/plugin/aie_trace/util/aie_trace_util.h Declares the new warning helper API and documents usage constraints.
profile/plugin/aie_trace/util/aie_trace_util.cpp Implements contention detection by reading config + scanning configured trace tiles; emits a one-time warning.
profile/plugin/aie_trace/edge/aie_trace.cpp Invokes the new contention warning during edge trace metric setup.
profile/plugin/aie_trace/client/aie_trace.cpp Invokes the new contention warning during client trace metric setup.

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

Comment on lines +802 to +805
static bool s_warned = false;
if (s_warned)
return;
if (!xrt_core::config::get_aie_trace())
"AIE trace on interface (shim) tiles together with AIE profile start_to_bytes_transferred "
"on interface tiles can contend for the same PL user event; AIE trace data may be wrong.";
xrt_core::message::send(severity_level::warning, "XRT", msg);
}
}

aie::trace::warnIfAieInterfaceTraceContendsWithStartToBytes(metadata);

Comment thread profile/plugin/aie_trace/client/aie_trace.cpp Outdated
removing blank space

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.

2 participants