blob: 2212adda8f77f7d8cb44b0bdb0b22445b1fcb87d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Maarten Lankhorste9417592014-07-01 12:57:14 +02002#undef TRACE_SYSTEM
Chris Wilsonf54d1862016-10-25 13:00:45 +01003#define TRACE_SYSTEM dma_fence
Maarten Lankhorste9417592014-07-01 12:57:14 +02004
5#if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ)
Chris Wilsonf54d1862016-10-25 13:00:45 +01006#define _TRACE_DMA_FENCE_H
Maarten Lankhorste9417592014-07-01 12:57:14 +02007
8#include <linux/tracepoint.h>
9
Chris Wilsonf54d1862016-10-25 13:00:45 +010010struct dma_fence;
Maarten Lankhorste9417592014-07-01 12:57:14 +020011
Chris Wilsonf54d1862016-10-25 13:00:45 +010012DECLARE_EVENT_CLASS(dma_fence,
Maarten Lankhorste9417592014-07-01 12:57:14 +020013
Chris Wilsonf54d1862016-10-25 13:00:45 +010014 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020015
16 TP_ARGS(fence),
17
18 TP_STRUCT__entry(
19 __string(driver, fence->ops->get_driver_name(fence))
20 __string(timeline, fence->ops->get_timeline_name(fence))
21 __field(unsigned int, context)
22 __field(unsigned int, seqno)
23 ),
24
25 TP_fast_assign(
26 __assign_str(driver, fence->ops->get_driver_name(fence))
27 __assign_str(timeline, fence->ops->get_timeline_name(fence))
28 __entry->context = fence->context;
29 __entry->seqno = fence->seqno;
30 ),
31
32 TP_printk("driver=%s timeline=%s context=%u seqno=%u",
33 __get_str(driver), __get_str(timeline), __entry->context,
34 __entry->seqno)
35);
36
Chris Wilsonf54d1862016-10-25 13:00:45 +010037DEFINE_EVENT(dma_fence, dma_fence_emit,
Maarten Lankhorste9417592014-07-01 12:57:14 +020038
Chris Wilsonf54d1862016-10-25 13:00:45 +010039 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020040
41 TP_ARGS(fence)
42);
43
Chris Wilsonf54d1862016-10-25 13:00:45 +010044DEFINE_EVENT(dma_fence, dma_fence_init,
Maarten Lankhorste9417592014-07-01 12:57:14 +020045
Chris Wilsonf54d1862016-10-25 13:00:45 +010046 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020047
48 TP_ARGS(fence)
49);
50
Chris Wilsonf54d1862016-10-25 13:00:45 +010051DEFINE_EVENT(dma_fence, dma_fence_destroy,
Maarten Lankhorste9417592014-07-01 12:57:14 +020052
Chris Wilsonf54d1862016-10-25 13:00:45 +010053 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020054
55 TP_ARGS(fence)
56);
57
Chris Wilsonf54d1862016-10-25 13:00:45 +010058DEFINE_EVENT(dma_fence, dma_fence_enable_signal,
Maarten Lankhorste9417592014-07-01 12:57:14 +020059
Chris Wilsonf54d1862016-10-25 13:00:45 +010060 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020061
62 TP_ARGS(fence)
63);
64
Chris Wilsonf54d1862016-10-25 13:00:45 +010065DEFINE_EVENT(dma_fence, dma_fence_signaled,
Maarten Lankhorste9417592014-07-01 12:57:14 +020066
Chris Wilsonf54d1862016-10-25 13:00:45 +010067 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020068
69 TP_ARGS(fence)
70);
71
Chris Wilsonf54d1862016-10-25 13:00:45 +010072DEFINE_EVENT(dma_fence, dma_fence_wait_start,
Maarten Lankhorste9417592014-07-01 12:57:14 +020073
Chris Wilsonf54d1862016-10-25 13:00:45 +010074 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020075
76 TP_ARGS(fence)
77);
78
Chris Wilsonf54d1862016-10-25 13:00:45 +010079DEFINE_EVENT(dma_fence, dma_fence_wait_end,
Maarten Lankhorste9417592014-07-01 12:57:14 +020080
Chris Wilsonf54d1862016-10-25 13:00:45 +010081 TP_PROTO(struct dma_fence *fence),
Maarten Lankhorste9417592014-07-01 12:57:14 +020082
83 TP_ARGS(fence)
84);
85
Chris Wilsonf54d1862016-10-25 13:00:45 +010086#endif /* _TRACE_DMA_FENCE_H */
Maarten Lankhorste9417592014-07-01 12:57:14 +020087
88/* This part must be outside protection */
89#include <trace/define_trace.h>