All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Eric Anholt <eric@anholt.net>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Print the pid when debug logging an ioctl error.
Date: Wed, 31 Jan 2018 09:07:28 +0100	[thread overview]
Message-ID: <20180131080728.GV25930@phenom.ffwll.local> (raw)
In-Reply-To: <20180130215643.11016-1-eric@anholt.net>

On Tue, Jan 30, 2018 at 01:56:43PM -0800, Eric Anholt wrote:
> When we debug print what ioctl we're calling into, we include the pid.
> If you have multiple processes rendering simulataneously, the error
> return also needs the pid so you can see which of the ioctl calls was
> the one to fail.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index a9ae6dd2d593..38c302607738 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -842,7 +842,7 @@ long drm_ioctl(struct file *filp,
>  	if (kdata != stack_kdata)
>  		kfree(kdata);
>  	if (retcode)
> -		DRM_DEBUG("ret = %d\n", retcode);
> +		DRM_DEBUG("pid=%d, ret = %d\n", task_pid_nr(current), retcode);
>  	return retcode;
>  }
>  EXPORT_SYMBOL(drm_ioctl);
> -- 
> 2.15.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Eric Anholt <eric@anholt.net>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: Print the pid when debug logging an ioctl error.
Date: Wed, 31 Jan 2018 09:07:28 +0100	[thread overview]
Message-ID: <20180131080728.GV25930@phenom.ffwll.local> (raw)
In-Reply-To: <20180130215643.11016-1-eric@anholt.net>

On Tue, Jan 30, 2018 at 01:56:43PM -0800, Eric Anholt wrote:
> When we debug print what ioctl we're calling into, we include the pid.
> If you have multiple processes rendering simulataneously, the error
> return also needs the pid so you can see which of the ioctl calls was
> the one to fail.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index a9ae6dd2d593..38c302607738 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -842,7 +842,7 @@ long drm_ioctl(struct file *filp,
>  	if (kdata != stack_kdata)
>  		kfree(kdata);
>  	if (retcode)
> -		DRM_DEBUG("ret = %d\n", retcode);
> +		DRM_DEBUG("pid=%d, ret = %d\n", task_pid_nr(current), retcode);
>  	return retcode;
>  }
>  EXPORT_SYMBOL(drm_ioctl);
> -- 
> 2.15.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2018-01-31  8:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 21:56 [PATCH] drm: Print the pid when debug logging an ioctl error Eric Anholt
2018-01-30 21:56 ` Eric Anholt
2018-01-31  8:07 ` Daniel Vetter [this message]
2018-01-31  8:07   ` Daniel Vetter
2018-02-11 10:07   ` Eric Anholt
2018-02-11 10:07     ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180131080728.GV25930@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.