[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa10b293-9c7f-4904-88bf-4ec6528bd0ef@linaro.org>
Date: Sun, 3 Dec 2023 02:08:26 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Rob Clark <robdclark@...il.com>, dri-devel@...ts.freedesktop.org
Cc: freedreno@...ts.freedesktop.org,
Rob Clark <robdclark@...omium.org>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
"open list:DRM DRIVER FOR MSM ADRENO GPU"
<linux-arm-msm@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] drm/msm/rd: Check PT_PTRACED for cmdstream dumping
On 14/09/2023 20:24, Rob Clark wrote:
> From: Rob Clark <robdclark@...omium.org>
>
> So, when you want to get a cmdstream trace of some deqp or piglit test,
> but you happen to be running it on the same laptop with full desktop
> env, the current dump-everything firehose of `cat $debugfs/dri/n/rd` is
> quite a bit too much. Ptrace seemed kind of a natural way to control
> it, ie. either run what you want to trace under gdb or hack in a
> ptrace(PTRACE_TRACEME) call.
>
> Signed-off-by: Rob Clark <robdclark@...omium.org>
> ---
> drivers/gpu/drm/msm/msm_gem_submit.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
I think this is a good idea, to be able to separate process being
debugged and all other tasks.
>
> diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
> index a908373cf34b..a105ca1f2102 100644
> --- a/drivers/gpu/drm/msm/msm_gem_submit.c
> +++ b/drivers/gpu/drm/msm/msm_gem_submit.c
> @@ -979,7 +979,8 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
> /* The scheduler owns a ref now: */
> msm_gem_submit_get(submit);
>
> - msm_rd_dump_submit(priv->rd, submit, NULL);
> + if (current->ptrace & PT_PTRACED)
> + msm_rd_dump_submit(priv->rd, submit, NULL);
>
> pm_runtime_get_sync(&gpu->pdev->dev);
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists