summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-postgresql.py
diff options
context:
space:
mode:
authorJordan Crouse <jcrouse@codeaurora.org>2017-03-29 07:59:56 -0600
committerJordan Crouse <jcrouse@codeaurora.org>2017-03-29 08:14:33 -0600
commita65466fee1976e6b5595272296b7a1159e13237f (patch)
tree0f44b0e4e01f8a862198bdc7a97f610720392138 /tools/perf/scripts/python/call-graph-from-postgresql.py
parenta9203c936d1980ffaa140f28a99bf34637cc2ce3 (diff)
drm/msm: Add performance counter tracking
Adreno GPUs have a certain number of fixed performance counters most of which can be programmed to a large number of different items (countables). A centralized database in the kernel is needed to make the most efficient use of counters across processes. Add performance counter tracking and APIs to allow applications to reserve performance counters by requesting a group ID and a countable (countables differ from block to block). The kernel will check to see if an active counter is already selected for that countable or if a new one should be assigned. Different processes can share the same counter if they both need the same countable. Counters are reserved with DRM_IOCTL_MSM_COUNTER_GET which returns a counter ID for the reserved counter and the hi/lo offset of the counter register. The reserving application can either read the counter from within a PM4 stream or it can use the group ID and counter ID and read the value of the counter with DRM_MSM_COUNTER_READ. After the counter is no longer needed DRM_IOCTL_MSM_COUNTER_PUT returns it and it can be released for other countables if no other processes are sharing it. Reservations are tracked for each process and cleaned up if the process dies without putting back the counters. Change-Id: Ic0dedbadc45e85ab0063331b39ca6f3289523038 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions