|
16 | 16 | #include <linux/dma-fence.h> |
17 | 17 | #include <linux/sched/signal.h> |
18 | 18 | #include <linux/seq_file.h> |
| 19 | +#include <linux/dept_sdt.h> |
19 | 20 |
|
20 | 21 | #define CREATE_TRACE_POINTS |
21 | 22 | #include <trace/events/dma_fence.h> |
@@ -741,6 +742,7 @@ dma_fence_default_wait_cb(struct dma_fence *fence, struct dma_fence_cb *cb) |
741 | 742 | struct default_wait_cb *wait = |
742 | 743 | container_of(cb, struct default_wait_cb, base); |
743 | 744 |
|
| 745 | + sdt_event(&fence->dmap); |
744 | 746 | wake_up_state(wait->task, TASK_NORMAL); |
745 | 747 | } |
746 | 748 |
|
@@ -789,6 +791,7 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout) |
789 | 791 | __set_current_state(TASK_UNINTERRUPTIBLE); |
790 | 792 | spin_unlock_irqrestore(fence->lock, flags); |
791 | 793 |
|
| 794 | + sdt_wait(&fence->dmap); |
792 | 795 | ret = schedule_timeout(ret); |
793 | 796 |
|
794 | 797 | spin_lock_irqsave(fence->lock, flags); |
@@ -950,6 +953,7 @@ dma_fence_init(struct dma_fence *fence, const struct dma_fence_ops *ops, |
950 | 953 | BUG_ON(!lock); |
951 | 954 | BUG_ON(!ops || !ops->get_driver_name || !ops->get_timeline_name); |
952 | 955 |
|
| 956 | + sdt_map_init(&fence->dmap); |
953 | 957 | kref_init(&fence->refcount); |
954 | 958 | fence->ops = ops; |
955 | 959 | INIT_LIST_HEAD(&fence->cb_list); |
|
0 commit comments