RFC expose global performance counters
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest20 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | pm: prevent freeing the wrong engine contextdrm/ | +5 | 0 replies | |
| 2/20 | pm: fix a potential race condition when creating an engine contextdrm/ | +3 | 0 replies | |
| 3/20 | pm: remove pmu signalsdrm/ drm/ drm/ +5 more | +1 | 0 replies | |
| 4/20 | pm: remove unused nvkm_perfsig_wrap() functiondrm/ drm/ | +0 | 0 replies | |
| 5/20 | pm: reorganize the nvif interfacebin/ drm/ drm/ +1 more | +57 | 4 replies | |
| 6/20 | pm: prevent creating a perfctr object when signals are not founddrm/ | +4 | 0 replies | |
| 7/20 | pm: implement NVIF_PERFMON_V0_QUERY_DOMAIN methoddrm/ drm/ | +96 | 0 replies | |
| 8/20 | pm: allow to query signals by domainbin/ drm/ drm/ | +150 | 0 replies | |
| 9/20 | pm: change signal iter to u16bin/ drm/ drm/ +1 more | +12 | 0 replies | |
| 10/20 | pm: use hardware signals indexes instead of user-readable namesbin/ drm/ drm/ | +23 | 0 replies | |
| 11/20 | pm: allow to monitor hardware signal index 0x00drm/ drm/ drm/ | +10 | 0 replies | |
| 12/20 | pm: add concept of sourcesdrm/ drm/ drm/ | +103 | 0 replies | |
| 13/20 | pm: allow to query the number of sources for a signaldrm/ drm/ | +21 | 0 replies | |
| 14/20 | pm: implement NVIF_PERFMON_V0_QUERY_SOURCE methoddrm/ drm/ | +89 | 0 replies | |
| 15/20 | pm: allow the userspace to schedule hardware countersdrm/ drm/ drm/ | +48 | 0 replies | |
| 16/20 | pm: allow to configure domains instead of simple countersbin/ drm/ drm/ +4 more | +293 | 0 replies | |
| 17/20 | pm: allow the userspace to configure sourcesdrm/ drm/ drm/ | +95 | 0 replies | |
| 18/20 | pm/nv50: add compute and graphics signals/sourcesdrm/ drm/ drm/ +5 more | +485 | 0 replies | |
| 19/20 | sw/nv50: add some private functions to factorize codedrm/ | +38 | 0 replies | |
| 20/20 | sw/nv50: add and interface for controlling performance countersdrm/ drm/ | +166 | 0 replies |
Reviews trailers per patch
3 of 20 patches have a Reviewed-by or Acked-by.
| Patch | Martin Peres |
|---|---|
| 1/20 | R-b |
| 2/20 | |
| 3/20 | R-b |
| 4/20 | R-b |
| 5/20 | |
| 6/20 | |
| 7/20 | |
| 8/20 | |
| 9/20 | |
| 10/20 | |
| 11/20 | |
| 12/20 | |
| 13/20 | |
| 14/20 | |
| 15/20 | |
| 16/20 | |
| 17/20 | |
| 18/20 | |
| 19/20 | |
| 20/20 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH RFC 00/20] expose global performance counters
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
Signature · 6 lines
2.4.2 _______________________________________________ Nouveau mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/nouveau