rbandi | 32f19a6 | 2018-10-18 11:31:32 -0700 | [diff] [blame] | 1 | /* Copyright (c) 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 | |
| 14 | #if !defined(_HID_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) |
| 15 | #define _HID_TRACE_H |
| 16 | |
| 17 | #undef TRACE_SYSTEM |
| 18 | #define TRACE_SYSTEM hid |
| 19 | #undef TRACE_INCLUDE_PATH |
| 20 | #define TRACE_INCLUDE_PATH . |
| 21 | #undef TRACE_INCLUDE_FILE |
| 22 | #define TRACE_INCLUDE_FILE hid-trace |
| 23 | |
| 24 | #include <linux/tracepoint.h> |
| 25 | |
| 26 | TRACE_EVENT(qvr_recv_sensor, |
| 27 | TP_PROTO(char *sensor, uint64_t ts, s32 x, s32 y, s32 z), |
| 28 | TP_ARGS(sensor, ts, x, y, z), |
| 29 | TP_STRUCT__entry( |
| 30 | __field(char *, sensor) |
| 31 | __field(uint64_t, ts) |
| 32 | __field(int, x) |
| 33 | __field(int, y) |
| 34 | __field(int, z) |
| 35 | ), |
| 36 | TP_fast_assign( |
| 37 | __entry->sensor = sensor; |
| 38 | __entry->ts = ts; |
| 39 | __entry->x = x; |
| 40 | __entry->y = y; |
| 41 | __entry->z = z; |
| 42 | ), |
| 43 | TP_printk( |
| 44 | "%s - ts=%llu x=%d y=%d z=%d", |
| 45 | __entry->sensor, |
| 46 | __entry->ts, |
| 47 | __entry->x, |
| 48 | __entry->y, |
| 49 | __entry->z |
| 50 | ) |
| 51 | ); |
| 52 | |
| 53 | #endif /* _HID_TRACE_H */ |
| 54 | |
| 55 | /* This part must be outside protection */ |
| 56 | #include <trace/define_trace.h> |