From: Matthew Auld <matthew.william.auld@gmail.com>
To: Robert Bragg <robert@sixbynine.org>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>,
David Airlie <airlied@linux.ie>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Sourab Gupta <sourab.gupta@intel.com>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH v9 01/11] drm/i915: Add i915 perf infrastructure
Date: Wed, 9 Nov 2016 20:00:06 +0000 [thread overview]
Message-ID: <CAM0jSHNTUyJ-_GsFCFkm9hyEfQEH-+ofONpPn7O6tP41e+65FQ@mail.gmail.com> (raw)
In-Reply-To: <20161107194957.3385-2-robert@sixbynine.org>
On 7 November 2016 at 19:49, Robert Bragg <robert@sixbynine.org> wrote:
> Adds base i915 perf infrastructure for Gen performance metrics.
>
> This adds a DRM_IOCTL_I915_PERF_OPEN ioctl that takes an array of uint64
> properties to configure a stream of metrics and returns a new fd usable
> with standard VFS system calls including read() to read typed and sized
> records; ioctl() to enable or disable capture and poll() to wait for
> data.
>
> A stream is opened something like:
>
> uint64_t properties[] = {
> /* Single context sampling */
> DRM_I915_PERF_PROP_CTX_HANDLE, ctx_handle,
>
> /* Include OA reports in samples */
> DRM_I915_PERF_PROP_SAMPLE_OA, true,
>
> /* OA unit configuration */
> DRM_I915_PERF_PROP_OA_METRICS_SET, metrics_set_id,
> DRM_I915_PERF_PROP_OA_FORMAT, report_format,
> DRM_I915_PERF_PROP_OA_EXPONENT, period_exponent,
> };
> struct drm_i915_perf_open_param parm = {
> .flags = I915_PERF_FLAG_FD_CLOEXEC |
> I915_PERF_FLAG_FD_NONBLOCK |
> I915_PERF_FLAG_DISABLED,
> .properties_ptr = (uint64_t)properties,
> .num_properties = sizeof(properties) / 16,
> };
> int fd = drmIoctl(drm_fd, DRM_IOCTL_I915_PERF_OPEN, ¶m);
>
> Records read all start with a common { type, size } header with
> DRM_I915_PERF_RECORD_SAMPLE being of most interest. Sample records
> contain an extensible number of fields and it's the
> DRM_I915_PERF_PROP_SAMPLE_xyz properties given when opening that
> determine what's included in every sample.
>
> No specific streams are supported yet so any attempt to open a stream
> will return an error.
>
> v2:
> use i915_gem_context_get() - Chris Wilson
> v3:
> update read() interface to avoid passing state struct - Chris Wilson
> fix some rebase fallout, with i915-perf init/deinit
> v4:
> s/DRM_IORW/DRM_IOW/ - Emil Velikov
>
> Signed-off-by: Robert Bragg <robert@sixbynine.org>
> Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> Reviewed-by: Sourab Gupta <sourab.gupta@intel.com>
Minor nit, there are a fair few DRM_ERROR's missing a new line.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-11-09 20:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 19:49 [PATCH v9 00/11] Enable i915 perf stream for Haswell OA unit Robert Bragg
2016-11-07 19:49 ` [PATCH v9 01/11] drm/i915: Add i915 perf infrastructure Robert Bragg
2016-11-09 20:00 ` Matthew Auld [this message]
2016-11-22 13:29 ` [Intel-gfx] " Daniel Vetter
2016-11-22 13:31 ` Daniel Vetter
2016-11-22 14:02 ` [Intel-gfx] " Robert Bragg
2016-11-22 15:35 ` Daniel Vetter
2016-11-07 19:49 ` [PATCH v9 02/11] drm/i915: rename OACONTROL GEN7_OACONTROL Robert Bragg
2016-11-07 19:49 ` [PATCH v9 03/11] drm/i915: return EACCES for check_cmd() failures Robert Bragg
2016-11-07 19:49 ` [PATCH v9 04/11] drm/i915: don't whitelist oacontrol in cmd parser Robert Bragg
2016-11-08 12:51 ` [PATCH v2] " Robert Bragg
2016-11-22 13:34 ` [Intel-gfx] " Daniel Vetter
2016-11-22 14:09 ` Robert Bragg
2016-11-22 15:36 ` Daniel Vetter
2016-11-07 19:49 ` [PATCH v9 05/11] drm/i915: Add 'render basic' Haswell OA unit config Robert Bragg
2016-11-08 6:04 ` sourab gupta
2016-11-07 19:49 ` [PATCH v9 06/11] drm/i915: Enable i915 perf stream for Haswell OA unit Robert Bragg
2016-11-15 9:24 ` sourab gupta
2016-11-07 19:49 ` [PATCH v9 07/11] drm/i915: advertise available metrics via sysfs Robert Bragg
2016-11-07 19:49 ` [PATCH v9 08/11] drm/i915: Add dev.i915.perf_stream_paranoid sysctl option Robert Bragg
2016-11-07 19:49 ` [PATCH v9 09/11] drm/i915: add dev.i915.oa_max_sample_rate sysctl Robert Bragg
2016-11-08 6:19 ` sourab gupta
2016-11-08 11:47 ` Robert Bragg
2016-11-08 12:14 ` sourab gupta
2016-11-09 19:52 ` Matthew Auld
2016-11-10 13:57 ` Robert Bragg
2016-11-07 19:49 ` [PATCH v9 10/11] drm/i915: Add more Haswell OA metric sets Robert Bragg
2016-11-07 19:49 ` [PATCH v9 11/11] drm/i915: Add a kerneldoc summary for i915_perf.c Robert Bragg
2016-11-08 6:27 ` sourab gupta
2016-11-22 13:43 ` Daniel Vetter
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=CAM0jSHNTUyJ-_GsFCFkm9hyEfQEH-+ofONpPn7O6tP41e+65FQ@mail.gmail.com \
--to=matthew.william.auld@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=robert@sixbynine.org \
--cc=sourab.gupta@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).