[PATCH] lib/amd: add memleak functions

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Feb 26 09:09:58 UTC 2025


On Wed, Feb 19, 2025 at 12:50:49PM -0500, vitaly prosyak wrote:
> Hi Kamil,
> 
> Thanks for raising this question. Currently, only a single test uses the memleak feature. However, we are planning to add more. This effort requires careful selection, as we want to avoid unnecessary overhead or burden. Enabling the memleak configuration significantly slows down test execution—potentially increasing the duration by 2-3 times.
> 
> Additionally, we aim to reach internal consensus on which tests should have this feature enabled. We also want to avoid enabling both KASAN and memleak simultaneously. These considerations are the reason for the delay.
> 
> Thanks for your understanding!
> 
> Vitaly

+Peter

Peter proposed solution which is global and vendor agnostic. I mean
his changes https://patchwork.freedesktop.org/series/143996/
allow you to selectively run with kmemleak on using runner (-k).
Together with proper list selection passed to the runner you're
able to run only tests which you want to check for memory leaks.

--
Zbigniew

> 
> On 2025-02-19 05:41, Kamil Konieczny wrote:
> > Hi Vitaly,
> > On 2025-02-18 at 06:43:41 -0500, vitaly.prosyak at amd.com wrote:
> >> From: Vitaly Prosyak <vitaly.prosyak at amd.com>
> >>
> >> refactor memory leak functions and add
> >> them to the library for reuse across different tests.
> >>
> >> Cc: Christian Koenig <christian.koenig at amd.com>
> >> Cc: Alexander Deucher <alexander.deucher at amd.com>
> >> Cc: Jesse Zhang <jesse.zhang at amd.com>
> >> Cc: Harry Wentland <harry.wentland at amd.com>
> >>
> >> Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
> >> ---
> >>  lib/amdgpu/amd_mem_leak.c   | 112 ++++++++++++++++++++++++++++++++++++
> >>  lib/amdgpu/amd_mem_leak.h   |  17 ++++++
> >>  lib/meson.build             |   1 +
> >>  tests/amdgpu/amd_mem_leak.c |  88 ++--------------------------
> >>
> > [...cut...]
> >
> > Why moving to library when there is only one user?
> >
> > Regards,
> > Kamil
> >


More information about the igt-dev mailing list