From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Enable fine-grained kcov instrumentation
Date: Thu, 04 Aug 2016 09:12:07 +0300 [thread overview]
Message-ID: <1470291127.3633.1.camel@linux.intel.com> (raw)
In-Reply-To: <1470253133-22129-1-git-send-email-chris@chris-wilson.co.uk>
On ke, 2016-08-03 at 20:38 +0100, Chris Wilson wrote:
> In the next merge, we can build support for kcov at the individual file,
> or driver level. This is useful to filter out the noise when doing
> coverage test, i.e. we do get edges through code outside of i915.ko.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Umm, is not KCOV enabled by selecting KCOV and then instrumentation is
only disabled on select objects? "KCOV_INSTRUMENT_foo.o := n"?
> ---
> drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
> drivers/gpu/drm/i915/Makefile | 1 +
> 2 files changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index cee87bfd10c4..eb38270d0ecd 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -42,3 +42,15 @@ config DRM_I915_DEBUG_GEM
>
> If in doubt, say "N".
>
> +config DRM_I915_KCOV
> + bool "Generate fine-grained code coverage (for kcov)"
> + default n
> + select KCOV
> + help
> + Enable instrumentation of i915.ko to generate coverage via kcov
> + (/sys/kernel/debug/kcov). This allows coverage driven fuzzing,
> + such as AFL, to be used and focused on the driver.
> +
> + Recommended for driver developers only.
> +
> + If in doubt, say "N".
> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
> index 0afe7b3cad07..2f4bbaca5b60 100644
> --- a/drivers/gpu/drm/i915/Makefile
> +++ b/drivers/gpu/drm/i915/Makefile
> @@ -3,6 +3,7 @@
> # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
>
> subdir-ccflags-$(CONFIG_DRM_I915_WERROR) := -Werror
> +subdir-ccflags-$(CONFIG_DRM_I915_KCOV) := $(CFLAGS_KCOV)
> subdir-ccflags-y += \
> $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
>
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-08-04 6:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 19:38 [PATCH] drm/i915: Enable fine-grained kcov instrumentation Chris Wilson
2016-08-04 5:30 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-08-04 6:12 ` Joonas Lahtinen [this message]
2016-08-04 6:30 ` [PATCH] " Chris Wilson
2016-08-04 11:49 ` Joonas Lahtinen
2016-08-04 11:52 ` Chris Wilson
2016-08-04 7:12 ` Jani Nikula
2017-07-24 14:50 ` Chris Wilson
2017-07-24 14:50 ` Chris Wilson
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=1470291127.3633.1.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox