Marcelo Tosatti | 229456f | 2009-06-17 09:22:14 -0300 | [diff] [blame] | 1 | #if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ) |
| 2 | #define _TRACE_KVM_MAIN_H |
| 3 | |
| 4 | #include <linux/tracepoint.h> |
| 5 | |
| 6 | #undef TRACE_SYSTEM |
| 7 | #define TRACE_SYSTEM kvm |
| 8 | #define TRACE_INCLUDE_FILE kvm |
| 9 | |
| 10 | #if defined(__KVM_HAVE_IOAPIC) |
| 11 | TRACE_EVENT(kvm_set_irq, |
Avi Kivity | ae8c1c4 | 2009-07-01 12:09:41 +0300 | [diff] [blame^] | 12 | TP_PROTO(unsigned int gsi, int level, int irq_source_id), |
| 13 | TP_ARGS(gsi, level, irq_source_id), |
Marcelo Tosatti | 229456f | 2009-06-17 09:22:14 -0300 | [diff] [blame] | 14 | |
| 15 | TP_STRUCT__entry( |
| 16 | __field( unsigned int, gsi ) |
Avi Kivity | ae8c1c4 | 2009-07-01 12:09:41 +0300 | [diff] [blame^] | 17 | __field( int, level ) |
| 18 | __field( int, irq_source_id ) |
Marcelo Tosatti | 229456f | 2009-06-17 09:22:14 -0300 | [diff] [blame] | 19 | ), |
| 20 | |
| 21 | TP_fast_assign( |
| 22 | __entry->gsi = gsi; |
Avi Kivity | ae8c1c4 | 2009-07-01 12:09:41 +0300 | [diff] [blame^] | 23 | __entry->level = level; |
| 24 | __entry->irq_source_id = irq_source_id; |
Marcelo Tosatti | 229456f | 2009-06-17 09:22:14 -0300 | [diff] [blame] | 25 | ), |
| 26 | |
Avi Kivity | ae8c1c4 | 2009-07-01 12:09:41 +0300 | [diff] [blame^] | 27 | TP_printk("gsi %u level %d source %d", |
| 28 | __entry->gsi, __entry->level, __entry->irq_source_id) |
Marcelo Tosatti | 229456f | 2009-06-17 09:22:14 -0300 | [diff] [blame] | 29 | ); |
| 30 | |
| 31 | |
| 32 | #define kvm_irqchips \ |
| 33 | {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \ |
| 34 | {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \ |
| 35 | {KVM_IRQCHIP_IOAPIC, "IOAPIC"} |
| 36 | |
| 37 | TRACE_EVENT(kvm_ack_irq, |
| 38 | TP_PROTO(unsigned int irqchip, unsigned int pin), |
| 39 | TP_ARGS(irqchip, pin), |
| 40 | |
| 41 | TP_STRUCT__entry( |
| 42 | __field( unsigned int, irqchip ) |
| 43 | __field( unsigned int, pin ) |
| 44 | ), |
| 45 | |
| 46 | TP_fast_assign( |
| 47 | __entry->irqchip = irqchip; |
| 48 | __entry->pin = pin; |
| 49 | ), |
| 50 | |
| 51 | TP_printk("irqchip %s pin %u", |
| 52 | __print_symbolic(__entry->irqchip, kvm_irqchips), |
| 53 | __entry->pin) |
| 54 | ); |
| 55 | |
| 56 | |
| 57 | |
| 58 | #endif /* defined(__KVM_HAVE_IOAPIC) */ |
| 59 | #endif /* _TRACE_KVM_MAIN_H */ |
| 60 | |
| 61 | /* This part must be outside protection */ |
| 62 | #include <trace/define_trace.h> |