All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 00/20] expose global performance counters
@ 2015-06-07 20:40 Samuel Pitoiset
       [not found] ` <1433709630-3293-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 25+ messages in thread
From: Samuel Pitoiset @ 2015-06-07 20:40 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Hello,

This series exposes global performance counters (PCOUNTER) to the userspace
through the nvif interface by reworking most of the code related to the PM
engine.

This interface will allow the userspace to control and monitor complex hardware
events like the proprietary driver already does, for example with CUPTI and
PerfKit.

For now, this series only exposes performance counters on NV50, but this is
going to be pretty similar for other families. My plan is to submit more
patches for Fermi and Kepler after this series will be reviewed.

The code of this series can be found here:

http://cgit.freedesktop.org/~hakzsam/nouveau/log/?h=nouveau_perfmon

And the corresponding libdrm branch can be found here:

http://cgit.freedesktop.org/~hakzsam/drm/log/?h=nouveau_perfmon

A full example which exposes both compute and graphics hardware events on NV50
can be found here:

http://cgit.freedesktop.org/~hakzsam/perfevent

Most of the code will be implemented in mesa once the kernel interface is
going to be upstream and stable.

Below, you can find a summary of the series:

Patches 1-2:	fix a bug related to the PM engine context
Patches 3-4:	remove useless PMU signals and unused functions
Patches 5-6:	reorganize the nvif interface to expose more stuff
Patches 7-11:	expose PCOUNTER domains to the userspace
Patches 12-14:	implement concept of sources (ie. multiplexers)
Patches 15-17:	allow to monitor complex hardware events
Patches 18:	add compute/graphics signals/sources
Patches 19-20:  expose a software methods interface for controlling PM

Feel free to make a review.
Thanks in advance!

Samuel Pitoiset (20):
  pm: prevent freeing the wrong engine context
  pm: fix a potential race condition when creating an engine context
  pm: remove pmu signals
  pm: remove unused nvkm_perfsig_wrap() function
  pm: reorganize the nvif interface
  pm: prevent creating a perfctr object when signals are not found
  pm: implement NVIF_PERFMON_V0_QUERY_DOMAIN method
  pm: allow to query signals by domain
  pm: change signal iter to u16
  pm: use hardware signals indexes instead of user-readable names
  pm: allow to monitor hardware signal index 0x00
  pm: add concept of sources
  pm: allow to query the number of sources for a signal
  pm: implement NVIF_PERFMON_V0_QUERY_SOURCE method
  pm: allow the userspace to schedule hardware counters
  pm: allow to configure domains instead of simple counters
  pm: allow the userspace to configure sources
  pm/nv50: add compute and graphics signals/sources
  sw/nv50: add some private functions to factorize code
  sw/nv50: add and interface for controlling performance counters

 bin/nv_perfmon.c                      | 324 ++++++++++++----
 drm/nouveau/include/nvif/class.h      |  68 +++-
 drm/nouveau/include/nvif/ioctl.h      |   5 +-
 drm/nouveau/include/nvkm/engine/pm.h  |   6 +-
 drm/nouveau/nvkm/engine/device/nv50.c |   2 +-
 drm/nouveau/nvkm/engine/pm/Kbuild     |   2 +-
 drm/nouveau/nvkm/engine/pm/base.c     | 685 +++++++++++++++++++++++++---------
 drm/nouveau/nvkm/engine/pm/daemon.c   | 108 ------
 drm/nouveau/nvkm/engine/pm/g84.c      | 101 ++++-
 drm/nouveau/nvkm/engine/pm/gf100.c    |  13 +-
 drm/nouveau/nvkm/engine/pm/gk104.c    |   6 -
 drm/nouveau/nvkm/engine/pm/gk110.c    |   4 -
 drm/nouveau/nvkm/engine/pm/gt200.c    | 163 ++++++++
 drm/nouveau/nvkm/engine/pm/gt215.c    | 104 ++++--
 drm/nouveau/nvkm/engine/pm/nv40.c     |   8 +-
 drm/nouveau/nvkm/engine/pm/nv50.c     | 136 ++++++-
 drm/nouveau/nvkm/engine/pm/priv.h     |  53 ++-
 drm/nouveau/nvkm/engine/sw/nv50.c     | 216 ++++++++++-
 drm/nouveau/nvkm/engine/sw/nv50.h     |   6 +
 19 files changed, 1561 insertions(+), 449 deletions(-)
 delete mode 100644 drm/nouveau/nvkm/engine/pm/daemon.c
 create mode 100644 drm/nouveau/nvkm/engine/pm/gt200.c

-- 
2.4.2

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2015-06-14 11:54 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 20:40 [PATCH RFC 00/20] expose global performance counters Samuel Pitoiset
     [not found] ` <1433709630-3293-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-07 20:40   ` [PATCH RFC 01/20] pm: prevent freeing the wrong engine context Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 02/20] pm: fix a potential race condition when creating an " Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 03/20] pm: remove pmu signals Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 04/20] pm: remove unused nvkm_perfsig_wrap() function Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 05/20] pm: reorganize the nvif interface Samuel Pitoiset
     [not found]     ` <1433709630-3293-6-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-08 22:02       ` Ben Skeggs
     [not found]         ` <CACAvsv4x2vcWND6bE1tGSDQMy_doysboV7O8551CfGKz4MwcMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-09 21:53           ` Samuel Pitoiset
     [not found]             ` <55776056.9010302-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-14  2:32               ` Ben Skeggs
     [not found]                 ` <CACAvsv6+xYKtqFQ5HW3vp7yJ1D+puJS7k8TgfxhLO9aY0tzHtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-06-14 11:54                   ` Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 06/20] pm: prevent creating a perfctr object when signals are not found Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 07/20] pm: implement NVIF_PERFMON_V0_QUERY_DOMAIN method Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 08/20] pm: allow to query signals by domain Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 09/20] pm: change signal iter to u16 Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 10/20] pm: use hardware signals indexes instead of user-readable names Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 11/20] pm: allow to monitor hardware signal index 0x00 Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 12/20] pm: add concept of sources Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 13/20] pm: allow to query the number of sources for a signal Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 14/20] pm: implement NVIF_PERFMON_V0_QUERY_SOURCE method Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 15/20] pm: allow the userspace to schedule hardware counters Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 16/20] pm: allow to configure domains instead of simple counters Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 17/20] pm: allow the userspace to configure sources Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 18/20] pm/nv50: add compute and graphics signals/sources Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 19/20] sw/nv50: add some private functions to factorize code Samuel Pitoiset
2015-06-07 20:40   ` [PATCH RFC 20/20] sw/nv50: add and interface for controlling performance counters Samuel Pitoiset

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.