Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 2 | #undef TRACE_SYSTEM |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 3 | #define TRACE_SYSTEM dma_fence |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 4 | |
| 5 | #if !defined(_TRACE_FENCE_H) || defined(TRACE_HEADER_MULTI_READ) |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 6 | #define _TRACE_DMA_FENCE_H |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 7 | |
| 8 | #include <linux/tracepoint.h> |
| 9 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 10 | struct dma_fence; |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 11 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 12 | DECLARE_EVENT_CLASS(dma_fence, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 13 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 14 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 15 | |
| 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 Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 37 | DEFINE_EVENT(dma_fence, dma_fence_emit, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 38 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 39 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 40 | |
| 41 | TP_ARGS(fence) |
| 42 | ); |
| 43 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 44 | DEFINE_EVENT(dma_fence, dma_fence_init, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 45 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 46 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 47 | |
| 48 | TP_ARGS(fence) |
| 49 | ); |
| 50 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 51 | DEFINE_EVENT(dma_fence, dma_fence_destroy, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 52 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 53 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 54 | |
| 55 | TP_ARGS(fence) |
| 56 | ); |
| 57 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 58 | DEFINE_EVENT(dma_fence, dma_fence_enable_signal, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 59 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 60 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 61 | |
| 62 | TP_ARGS(fence) |
| 63 | ); |
| 64 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 65 | DEFINE_EVENT(dma_fence, dma_fence_signaled, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 66 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 67 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 68 | |
| 69 | TP_ARGS(fence) |
| 70 | ); |
| 71 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 72 | DEFINE_EVENT(dma_fence, dma_fence_wait_start, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 73 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 74 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 75 | |
| 76 | TP_ARGS(fence) |
| 77 | ); |
| 78 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 79 | DEFINE_EVENT(dma_fence, dma_fence_wait_end, |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 80 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 81 | TP_PROTO(struct dma_fence *fence), |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 82 | |
| 83 | TP_ARGS(fence) |
| 84 | ); |
| 85 | |
Chris Wilson | f54d186 | 2016-10-25 13:00:45 +0100 | [diff] [blame] | 86 | #endif /* _TRACE_DMA_FENCE_H */ |
Maarten Lankhorst | e941759 | 2014-07-01 12:57:14 +0200 | [diff] [blame] | 87 | |
| 88 | /* This part must be outside protection */ |
| 89 | #include <trace/define_trace.h> |