Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] 64-bit integer division in TP_printk causes a link error (__udivdi3 undefined) on 32-bit architectures. --
--- Patch [24]: [PATCH v2 24/33] drm/xe: Add defrag profiling tracepoints --- commit 414478b1f94933fc988a5668d191a4c7976fd319 Author: Matthew Brost <[email protected]> drm/xe: Add defrag profiling tracepoints This commit adds two tracepoints, xe_bo_defrag_worker and xe_bo_defrag_one, to profile the page defragmentation worker and break down the cost of a defrag attempt. > diff --git a/drivers/gpu/drm/xe/xe_trace_bo.h > b/drivers/gpu/drm/xe/xe_trace_bo.h > index 86323cf3be2c0..a169a322464b2 100644 > --- a/drivers/gpu/drm/xe/xe_trace_bo.h > +++ b/drivers/gpu/drm/xe/xe_trace_bo.h [ ... ] > +TRACE_EVENT(xe_bo_defrag_one, [ ... ] > + TP_printk("dev=%s size=%zu budget=%llu prealloc=%u/%u lock_us=%llu > lockwait_us=%llu prealloc_us=%llu consumed=%llu ret=%d", > + __get_str(dev), __entry->size, __entry->budget, > + __entry->prealloc_got, __entry->prealloc_want, > + __entry->lock_ns / 1000, __entry->lockwait_ns / 1000, > + __entry->prealloc_ns / 1000, __entry->consumed, > + __entry->ret) > +); [Severity: Low] Will doing 64-bit integer divisions (__entry->lock_ns / 1000, etc.) in TP_printk cause build failures on 32-bit architectures? The C code generated by TP_printk for TRACE_EVENT(xe_bo_defrag_one) performs direct u64 division. On 32-bit platforms, this translates to a dependency on the __udivdi3 libgcc function. Since the kernel does not export this function, this will result in a linking error during 32-bit builds (such as when COMPILE_TEST is enabled). -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=24
