diff options
author | Qiang Yu <yuq825@gmail.com> | 2020-03-07 21:54:38 +0800 |
---|---|---|
committer | Qiang Yu <yuq825@gmail.com> | 2020-03-22 09:57:21 +0800 |
commit | 7f60c4b9d964f604262327a0bfdbfd1721288ef8 (patch) | |
tree | 7bc798ca5935f1f37dcfab36c49db1758504319c /drivers/gpu/drm/lima/lima_sched.c | |
parent | 57b517cecea05f35fd4a1a00708f9255db7382c8 (diff) | |
download | lwn-7f60c4b9d964f604262327a0bfdbfd1721288ef8.tar.gz lwn-7f60c4b9d964f604262327a0bfdbfd1721288ef8.zip |
drm/lima: add trace point for tasks
track lima task start which can be combined with
dma_fence_signal to identify task execution time.
example command to record:
trace-cmd record -i \
-e "lima:lima_task_submit" -e "lima:lima_task_run" \
-e "*fence:*fence_signaled" -e "drm:drm_vblank_event" \
-e "drm:drm_vblank_event_queued" sleep 4
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200307135438.9981-1-yuq825@gmail.com
Diffstat (limited to 'drivers/gpu/drm/lima/lima_sched.c')
-rw-r--r-- | drivers/gpu/drm/lima/lima_sched.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index 86192422a689..4fbf2c489507 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -3,7 +3,6 @@ #include <linux/kthread.h> #include <linux/slab.h> -#include <linux/xarray.h> #include <linux/vmalloc.h> #include "lima_drv.h" @@ -12,6 +11,7 @@ #include "lima_mmu.h" #include "lima_l2_cache.h" #include "lima_gem.h" +#include "lima_trace.h" struct lima_fence { struct dma_fence base; @@ -177,6 +177,7 @@ struct dma_fence *lima_sched_context_queue_task(struct lima_sched_context *conte { struct dma_fence *fence = dma_fence_get(&task->base.s_fence->finished); + trace_lima_task_submit(task); drm_sched_entity_push_job(&task->base, &context->base); return fence; } @@ -251,6 +252,8 @@ static struct dma_fence *lima_sched_run_job(struct drm_sched_job *job) if (last_vm) lima_vm_put(last_vm); + trace_lima_task_run(task); + pipe->error = false; pipe->task_run(pipe, task); |