Re: [PATCH] drm/i915: Repeat the GEM_BUG_ON message in the ftrace log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> As the ftrace log is overflowing the pstore capture, we lose the gasps
> from dmesg which includes the GEM_BUG_ON function:line and condition that
> failed. Vital information for tracking down the bug, so append it to the
> frace log as well.
>
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_gem.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.h b/drivers/gpu/drm/i915/i915_gem.h
> index e920dab7f1b8..d9f0709973d1 100644
> --- a/drivers/gpu/drm/i915/i915_gem.h
> +++ b/drivers/gpu/drm/i915/i915_gem.h
> @@ -29,7 +29,10 @@
>  
>  #ifdef CONFIG_DRM_I915_DEBUG_GEM
>  #define GEM_BUG_ON(condition) do { if (unlikely((condition))) {	\
> -		printk(KERN_ERR "GEM_BUG_ON(%s)\n", __stringify(condition)); \
> +		pr_err("%s:%d GEM_BUG_ON(%s)\n", \
> +		       __func__, __LINE__, __stringify(condition)); \
> +		GEM_TRACE("%s:%d GEM_BUG_ON(%s)\n", \
> +			  __func__, __LINE__, __stringify(condition)); \
>  		BUG(); \
>  		} \
>  	} while(0)
> -- 
> 2.16.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux