xdp: skip run-lifecycle hooks for XDP-internal runs#78
Merged
Conversation
Runs created by XDP plugins themselves (e.g. xrt::ext::kernel
"XDP_KERNEL:{IPUV1CNN}") must not re-enter the XDP run-lifecycle
hooks. Enforce this once in the shared XDPPlugin base class so every
present and future plugin inherits the skip automatically with no
per-plugin code.
* Add public non-virtual XDPPlugin::run{Constructor,Start,Wait}Hook
wrappers and protected virtual run*Impl methods (default no-ops).
The wrappers prefix-match the kernel name against "XDP_KERNEL" and
return on match; otherwise delegate to the *Impl. Plugin _cb.cpp
glue continues to call the *Hook wrappers; plugins override the
*Impl methods. The wrappers are non-virtual so derived plugins
cannot accidentally bypass the filter.
* Single source of truth: the "XDP_KERNEL" prefix constant and the
helper live file-local in vp_base_plugin.cpp. The helper is also
exposed as xdp::isXdpInternalKernel via vp_base/utility.h for any
non-hook XDP code path that needs the same check.
* Convert AieDtracePlugin (the only current consumer): rename
runConstructorHook/Start/Wait to runConstructorImpl/StartImpl/
WaitImpl as protected overrides; bodies unchanged. aie_dtrace_cb.cpp
is unchanged - aieDtracePluginInstance.runConstructorHook(...) now
resolves to the new base-class filtered wrapper and dispatches
through the virtual *Impl override.
* core/common/xdp/profile.cpp and profile.h are NOT modified. The
no-plugin overhead is unchanged - the existing
xrt_core::config::get_aie_dtrace() (and friends) config gate in
profile.cpp's dispatchers remains the first and only check on the
no-plugin path.
Signed-off-by: Jyotheeswar Ganne <Jyotheeswar.Ganne@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
jvillarre
approved these changes
Jun 1, 2026
snigdha-gupta
added a commit
to snigdha-gupta/XDP
that referenced
this pull request
Jun 2, 2026
xdp: skip run-lifecycle hooks for XDP-internal runs (Xilinx#78)
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.
Runs created by XDP plugins themselves (e.g. xrt::ext::kernel "XDP_KERNEL:{IPUV1CNN}") must not re-enter the XDP run-lifecycle hooks. Enforce this once in the shared XDPPlugin base class so every present and future plugin inherits the skip automatically with no per-plugin code.