Add Debug.profiling_runtime_config consumer for aie_dtrace#55
Open
jyothees99 wants to merge 1 commit intoXilinx:masterfrom
Open
Add Debug.profiling_runtime_config consumer for aie_dtrace#55jyothees99 wants to merge 1 commit intoXilinx:masterfrom
jyothees99 wants to merge 1 commit intoXilinx:masterfrom
Conversation
Introduce a shared XDP utility under plugin/vp_base/profiling_runtime_config.{h,cpp}
that parses the inline JSON blob carried by the new xrt.ini option
Debug.profiling_runtime_config exactly once and exposes its
control_instrumentation section. The schema currently recognized is
control_instrumentation = { aie_tile, mem_tile, interface_tile }; any
other top-level keys (e.g. event_trace) are accepted but ignored and
can be wired up in a follow-up. Parse failures and unknown keys produce
one-shot warnings; recognized keys produce one info line each.
The aie_dtrace plugin (aie_dtrace_plugin.cpp, aie_dtrace_ve2.cpp) now
guards its hooks on profiling_runtime_config::aie_dtrace_enabled(),
which returns true when either Debug.aie_dtrace is set in xrt.ini or
the blob carries control_instrumentation. The corresponding load gate
in xrt_coreutil (core/common/xdp/profile.cpp, in the XRT repo) uses
the same auto-enable rule.
AieProfileMetadata's aie_dtrace_ini_metadata_tag constructor now
prefers the blob: control_instrumentation.interface_tile is synthesized
into "all:<metric>" and forwarded to getConfigMetricsForInterfaceTiles
(unblocks the ddr_bandwidth use case today). aie_tile and mem_tile
entries are logged for a follow-up. When the blob is empty, missing or
malformed, behavior is identical to before (legacy
AIE_dtrace_settings.* xrt.ini reads).
aie_trace, aie_profile, and ml_timeline are intentionally untouched and
keep using their existing xrt.ini settings.
Made-with: Cursor
IshitaGhosh
requested changes
May 1, 2026
| xrt_core::message::send(severity_level::info, "XRT", "AIE dtrace: update device."); | ||
|
|
||
| if (!xrt_core::config::get_aie_dtrace()) | ||
| if (!profiling_runtime_config::aie_dtrace_enabled()) |
Collaborator
There was a problem hiding this comment.
@jyothees99 We want to keep supporting enabling dtrace with xrt.ini for non-VAIML flow. So, we need to include the xrt ini config check too.
Collaborator
Author
There was a problem hiding this comment.
@IshitaGhosh I am using xrt.ini value also to determine aie_dtrace_enabled. It's OR of xrt.ini and profile_runtime_config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a shared XDP utility under plugin/vp_base/profiling_runtime_config.{h,cpp} that parses the inline JSON blob carried by the new xrt.ini option Debug.profiling_runtime_config exactly once and exposes its control_instrumentation section. The schema currently recognized is control_instrumentation = { aie_tile, mem_tile, interface_tile }; any other top-level keys (e.g. event_trace) are accepted but ignored and can be wired up in a follow-up. Parse failures and unknown keys produce one-shot warnings; recognized keys produce one info line each.
The aie_dtrace plugin (aie_dtrace_plugin.cpp, aie_dtrace_ve2.cpp) now guards its hooks on profiling_runtime_config::aie_dtrace_enabled(), which returns true when either Debug.aie_dtrace is set in xrt.ini or the blob carries control_instrumentation. The corresponding load gate in xrt_coreutil (core/common/xdp/profile.cpp, in the XRT repo) uses the same auto-enable rule.
AieProfileMetadata's aie_dtrace_ini_metadata_tag constructor now prefers the blob: control_instrumentation.interface_tile is synthesized into "all:" and forwarded to getConfigMetricsForInterfaceTiles (unblocks the ddr_bandwidth use case today). aie_tile and mem_tile entries are logged for a follow-up. When the blob is empty, missing or malformed, behavior is identical to before (legacy AIE_dtrace_settings.* xrt.ini reads).
aie_trace, aie_profile, and ml_timeline are intentionally untouched and keep using their existing xrt.ini settings.
Made-with: Cursor