Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm: Add mmu prealloc tracepoint

So we can monitor how many pages are getting preallocated vs how many
get used.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Tested-by: Antonino Maniscalco <antomani103@gmail.com>
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/661521/

authored by

Rob Clark and committed by
Rob Clark
05a24968 0b4339c5

+18
+14
drivers/gpu/drm/msm/msm_gpu_trace.h
··· 205 205 TP_printk("preempted to %u", __entry->ring_id) 206 206 ); 207 207 208 + TRACE_EVENT(msm_mmu_prealloc_cleanup, 209 + TP_PROTO(u32 count, u32 remaining), 210 + TP_ARGS(count, remaining), 211 + TP_STRUCT__entry( 212 + __field(u32, count) 213 + __field(u32, remaining) 214 + ), 215 + TP_fast_assign( 216 + __entry->count = count; 217 + __entry->remaining = remaining; 218 + ), 219 + TP_printk("count=%u, remaining=%u", __entry->count, __entry->remaining) 220 + ); 221 + 208 222 #endif 209 223 210 224 #undef TRACE_INCLUDE_PATH
+4
drivers/gpu/drm/msm/msm_iommu.c
··· 8 8 #include <linux/io-pgtable.h> 9 9 #include <linux/kmemleak.h> 10 10 #include "msm_drv.h" 11 + #include "msm_gpu_trace.h" 11 12 #include "msm_mmu.h" 12 13 13 14 struct msm_iommu { ··· 346 345 { 347 346 struct kmem_cache *pt_cache = get_pt_cache(mmu); 348 347 uint32_t remaining_pt_count = p->count - p->ptr; 348 + 349 + if (p->count > 0) 350 + trace_msm_mmu_prealloc_cleanup(p->count, remaining_pt_count); 349 351 350 352 kmem_cache_free_bulk(pt_cache, remaining_pt_count, &p->pages[p->ptr]); 351 353 kvfree(p->pages);