Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Punit Agrawal | d784e29 | 2014-11-18 11:41:27 +0000 | [diff] [blame] | 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM emulation |
| 4 | |
| 5 | #if !defined(_TRACE_EMULATION_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define _TRACE_EMULATION_H |
| 7 | |
| 8 | #include <linux/tracepoint.h> |
| 9 | |
| 10 | TRACE_EVENT(instruction_emulation, |
| 11 | |
| 12 | TP_PROTO(const char *instr, u64 addr), |
| 13 | TP_ARGS(instr, addr), |
| 14 | |
| 15 | TP_STRUCT__entry( |
| 16 | __string(instr, instr) |
| 17 | __field(u64, addr) |
| 18 | ), |
| 19 | |
| 20 | TP_fast_assign( |
| 21 | __assign_str(instr, instr); |
| 22 | __entry->addr = addr; |
| 23 | ), |
| 24 | |
| 25 | TP_printk("instr=\"%s\" addr=0x%llx", __get_str(instr), __entry->addr) |
| 26 | ); |
| 27 | |
| 28 | #endif /* _TRACE_EMULATION_H */ |
| 29 | |
| 30 | /* This part must be outside protection */ |
| 31 | #undef TRACE_INCLUDE_PATH |
| 32 | #undef TRACE_INCLUDE_FILE |
| 33 | #define TRACE_INCLUDE_PATH . |
| 34 | |
| 35 | #define TRACE_INCLUDE_FILE trace-events-emulation |
| 36 | #include <trace/define_trace.h> |