Pratap Nirujogi | 6e75991 | 2018-01-17 17:51:17 +0530 | [diff] [blame^] | 1 | /* Copyright (c) 2016, 2018, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | #undef TRACE_SYSTEM |
| 14 | #define TRACE_SYSTEM msm_cam |
| 15 | |
| 16 | #if !defined(_TRACE_MSM_VFE_H) || defined(TRACE_HEADER_MULTI_READ) |
| 17 | #define _TRACE_MSM_VFE_H |
| 18 | |
| 19 | #include "msm_isp.h" |
| 20 | #include <linux/types.h> |
| 21 | #include <linux/tracepoint.h> |
| 22 | |
| 23 | #define STRING_LEN 80 |
| 24 | |
| 25 | |
| 26 | TRACE_EVENT(msm_cam_string, |
| 27 | TP_PROTO(const char *str), |
| 28 | TP_ARGS(str), |
| 29 | TP_STRUCT__entry( |
| 30 | __array(char, str, STRING_LEN) |
| 31 | ), |
| 32 | TP_fast_assign( |
| 33 | strlcpy(__entry->str, str, STRING_LEN); |
| 34 | ), |
| 35 | TP_printk("msm_cam: %s", __entry->str) |
| 36 | ); |
| 37 | |
| 38 | TRACE_EVENT(msm_cam_tasklet_debug_dump, |
| 39 | TP_PROTO(struct msm_vfe_irq_debug_info tasklet_state), |
| 40 | TP_ARGS(tasklet_state), |
| 41 | TP_STRUCT__entry( |
| 42 | __field(unsigned int, vfe_id) |
| 43 | __field(unsigned int, core_id) |
| 44 | __field(unsigned int, irq_status0) |
| 45 | __field(unsigned int, irq_status1) |
| 46 | __field(unsigned int, ping_pong_status) |
| 47 | __field(long, tv_sec) |
| 48 | __field(long, tv_usec) |
| 49 | ), |
| 50 | TP_fast_assign( |
| 51 | __entry->vfe_id = tasklet_state.vfe_id; |
| 52 | __entry->irq_status0 = |
| 53 | tasklet_state.irq_status0[tasklet_state.vfe_id]; |
| 54 | __entry->irq_status1 = |
| 55 | tasklet_state.irq_status1[tasklet_state.vfe_id]; |
| 56 | __entry->core_id = tasklet_state.core_id; |
| 57 | __entry->ping_pong_status = |
| 58 | tasklet_state.ping_pong_status[tasklet_state.vfe_id]; |
| 59 | __entry->tv_sec = |
| 60 | tasklet_state.ts.buf_time.tv_sec; |
| 61 | __entry->tv_usec = |
| 62 | tasklet_state.ts.buf_time.tv_usec; |
| 63 | ), |
| 64 | TP_printk("vfe_id %d, core %d, irq_st0 0x%x, irq_st1 0x%x\n" |
| 65 | "pi_po_st 0x%x, time %ld:%ld", |
| 66 | __entry->vfe_id, |
| 67 | __entry->core_id, |
| 68 | __entry->irq_status0, |
| 69 | __entry->irq_status1, |
| 70 | __entry->ping_pong_status, |
| 71 | __entry->tv_sec, |
| 72 | __entry->tv_usec |
| 73 | ) |
| 74 | ); |
| 75 | |
| 76 | TRACE_EVENT(msm_cam_ping_pong_debug_dump, |
| 77 | TP_PROTO(struct msm_vfe_irq_debug_info ping_pong_state), |
| 78 | TP_ARGS(ping_pong_state), |
| 79 | TP_STRUCT__entry( |
| 80 | __field(unsigned int, curr_vfe_id) |
| 81 | __field(unsigned int, curr_irq_status0) |
| 82 | __field(unsigned int, curr_irq_status1) |
| 83 | __field(unsigned int, curr_ping_pong_status) |
| 84 | __field(unsigned int, othr_vfe_id) |
| 85 | __field(unsigned int, othr_irq_status0) |
| 86 | __field(unsigned int, othr_irq_status1) |
| 87 | __field(unsigned int, othr_ping_pong_status) |
| 88 | __field(long, othr_tv_sec) |
| 89 | __field(long, othr_tv_usec) |
| 90 | __field(unsigned int, core_id) |
| 91 | ), |
| 92 | TP_fast_assign( |
| 93 | __entry->curr_vfe_id = |
| 94 | ping_pong_state.vfe_id; |
| 95 | __entry->curr_irq_status0 = |
| 96 | ping_pong_state.irq_status0[ping_pong_state.vfe_id]; |
| 97 | __entry->curr_irq_status1 = |
| 98 | ping_pong_state.irq_status1[ping_pong_state.vfe_id]; |
| 99 | __entry->curr_ping_pong_status = |
| 100 | ping_pong_state. |
| 101 | ping_pong_status[ping_pong_state.vfe_id]; |
| 102 | __entry->othr_vfe_id = |
| 103 | !ping_pong_state.vfe_id; |
| 104 | __entry->othr_irq_status0 = |
| 105 | ping_pong_state.irq_status0[!ping_pong_state.vfe_id]; |
| 106 | __entry->othr_irq_status1 = |
| 107 | ping_pong_state.irq_status1[!ping_pong_state.vfe_id]; |
| 108 | __entry->othr_ping_pong_status = |
| 109 | ping_pong_state. |
| 110 | ping_pong_status[!ping_pong_state.vfe_id]; |
| 111 | __entry->othr_tv_sec = |
| 112 | ping_pong_state.ts.buf_time.tv_sec; |
| 113 | __entry->othr_tv_usec = |
| 114 | ping_pong_state.ts.buf_time.tv_usec; |
| 115 | __entry->core_id = ping_pong_state.core_id; |
| 116 | ), |
| 117 | TP_printk("vfe_id %d, irq_st0 0x%x, irq_st1 0x%x, pi_po_st 0x%x\n" |
| 118 | "other vfe_id %d, irq_st0 0x%x, irq_st1 0x%x\n" |
| 119 | "pi_po_st 0x%x, time %ld:%ld core %d", |
| 120 | __entry->curr_vfe_id, |
| 121 | __entry->curr_irq_status0, |
| 122 | __entry->curr_irq_status1, |
| 123 | __entry->curr_ping_pong_status, |
| 124 | __entry->othr_vfe_id, |
| 125 | __entry->othr_irq_status0, |
| 126 | __entry->othr_irq_status1, |
| 127 | __entry->othr_ping_pong_status, |
| 128 | __entry->othr_tv_sec, |
| 129 | __entry->othr_tv_usec, |
| 130 | __entry->core_id |
| 131 | ) |
| 132 | ); |
| 133 | |
| 134 | #endif /* _MSM_CAM_TRACE_H */ |
| 135 | /* This part must be outside protection */ |
| 136 | #include <trace/define_trace.h> |