[RESEND PATCH v2 2/2] drm/panfrost: Expose perf counters through debugfs

Emil Velikov emil.l.velikov at gmail.com
Tue May 14 10:58:45 UTC 2019


On Tue, 14 May 2019 at 11:48, Boris Brezillon
<boris.brezillon at collabora.com> wrote:
>
> Add a way to dump perf counters through debugfs. The implementation is
> kept simple and has a number of limitations:
>
> * it's not designed for multi-user usage as the counter values are
>   reset after each dump and there's no per-user context
> * only accessible to root users
> * no counters naming/position abstraction. Things are dumped in a raw
>   format that has to be parsed by the user who has to know where the
>   relevant values are and what they mean
>
> This implementation is intended to be used by mesa developers to help
> debug perf-related issues while we work on a more generic approach that
> would allow all GPU drivers to expose their counters in a consistent
> way. As a result, this debugfs interface is considered unstable and
> might be deprecated in the future.
>
An idea:

Add module_param_unsafe() module parameter and expose the debugfs
files only when set.
Seemingly the i915 team have been using it to a similar extend to
highlight the feature is unstable.

Note: setting the _unsafe param taints the kernel, which AFAICT is the
part which makes is extra useful.

I could be wrong of course :-)

HTH
-Emil


More information about the dri-devel mailing list