dma_fence.h 1.7 KB
Newer Older
1
/* SPDX-License-Identifier: GPL-2.0 */
2
#undef TRACE_SYSTEM
3
#define TRACE_SYSTEM dma_fence
4

5
#if !defined(_TRACE_DMA_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
6
#define _TRACE_DMA_FENCE_H
7 8 9

#include <linux/tracepoint.h>

10
struct dma_fence;
11

12
DECLARE_EVENT_CLASS(dma_fence,
13

14
	TP_PROTO(struct dma_fence *fence),
15 16 17 18 19 20 21 22 23 24 25

	TP_ARGS(fence),

	TP_STRUCT__entry(
		__string(driver, fence->ops->get_driver_name(fence))
		__string(timeline, fence->ops->get_timeline_name(fence))
		__field(unsigned int, context)
		__field(unsigned int, seqno)
	),

	TP_fast_assign(
26 27
		__assign_str(driver, fence->ops->get_driver_name(fence));
		__assign_str(timeline, fence->ops->get_timeline_name(fence));
28 29 30 31 32 33 34 35 36
		__entry->context = fence->context;
		__entry->seqno = fence->seqno;
	),

	TP_printk("driver=%s timeline=%s context=%u seqno=%u",
		  __get_str(driver), __get_str(timeline), __entry->context,
		  __entry->seqno)
);

37
DEFINE_EVENT(dma_fence, dma_fence_emit,
38

39
	TP_PROTO(struct dma_fence *fence),
40 41 42 43

	TP_ARGS(fence)
);

44
DEFINE_EVENT(dma_fence, dma_fence_init,
45

46
	TP_PROTO(struct dma_fence *fence),
47 48 49 50

	TP_ARGS(fence)
);

51
DEFINE_EVENT(dma_fence, dma_fence_destroy,
52

53
	TP_PROTO(struct dma_fence *fence),
54 55 56 57

	TP_ARGS(fence)
);

58
DEFINE_EVENT(dma_fence, dma_fence_enable_signal,
59

60
	TP_PROTO(struct dma_fence *fence),
61 62 63 64

	TP_ARGS(fence)
);

65
DEFINE_EVENT(dma_fence, dma_fence_signaled,
66

67
	TP_PROTO(struct dma_fence *fence),
68 69 70 71

	TP_ARGS(fence)
);

72
DEFINE_EVENT(dma_fence, dma_fence_wait_start,
73

74
	TP_PROTO(struct dma_fence *fence),
75 76 77 78

	TP_ARGS(fence)
);

79
DEFINE_EVENT(dma_fence, dma_fence_wait_end,
80

81
	TP_PROTO(struct dma_fence *fence),
82 83 84 85

	TP_ARGS(fence)
);

86
#endif /*  _TRACE_DMA_FENCE_H */
87 88 89

/* This part must be outside protection */
#include <trace/define_trace.h>