Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
trace.h
Go to the documentation of this file.
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM powerpc
3 
4 #if !defined(_TRACE_POWERPC_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_POWERPC_H
6 
7 #include <linux/tracepoint.h>
8 
9 struct pt_regs;
10 
11 DECLARE_EVENT_CLASS(ppc64_interrupt_class,
12 
13  TP_PROTO(struct pt_regs *regs),
14 
15  TP_ARGS(regs),
16 
18  __field(struct pt_regs *, regs)
19  ),
20 
22  __entry->regs = regs;
23  ),
24 
25  TP_printk("pt_regs=%p", __entry->regs)
26 );
27 
28 DEFINE_EVENT(ppc64_interrupt_class, irq_entry,
29 
30  TP_PROTO(struct pt_regs *regs),
31 
32  TP_ARGS(regs)
33 );
34 
35 DEFINE_EVENT(ppc64_interrupt_class, irq_exit,
36 
37  TP_PROTO(struct pt_regs *regs),
38 
39  TP_ARGS(regs)
40 );
41 
42 DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_entry,
43 
44  TP_PROTO(struct pt_regs *regs),
45 
46  TP_ARGS(regs)
47 );
48 
49 DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
50 
51  TP_PROTO(struct pt_regs *regs),
52 
53  TP_ARGS(regs)
54 );
55 
56 #ifdef CONFIG_PPC_PSERIES
57 extern void hcall_tracepoint_regfunc(void);
58 extern void hcall_tracepoint_unregfunc(void);
59 
60 TRACE_EVENT_FN(hcall_entry,
61 
62  TP_PROTO(unsigned long opcode, unsigned long *args),
63 
64  TP_ARGS(opcode, args),
65 
67  __field(unsigned long, opcode)
68  ),
69 
71  __entry->opcode = opcode;
72  ),
73 
74  TP_printk("opcode=%lu", __entry->opcode),
75 
76  hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
77 );
78 
79 TRACE_EVENT_FN(hcall_exit,
80 
81  TP_PROTO(unsigned long opcode, unsigned long retval,
82  unsigned long *retbuf),
83 
84  TP_ARGS(opcode, retval, retbuf),
85 
87  __field(unsigned long, opcode)
88  __field(unsigned long, retval)
89  ),
90 
92  __entry->opcode = opcode;
93  __entry->retval = retval;
94  ),
95 
96  TP_printk("opcode=%lu retval=%lu", __entry->opcode, __entry->retval),
97 
98  hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
99 );
100 #endif
101 
102 #endif /* _TRACE_POWERPC_H */
103 
104 #undef TRACE_INCLUDE_PATH
105 #undef TRACE_INCLUDE_FILE
106 
107 #define TRACE_INCLUDE_PATH asm
108 #define TRACE_INCLUDE_FILE trace
109 
110 #include <trace/define_trace.h>