aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 13:49:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 13:49:03 -0400
commiteeee78cf77df0450ca285a7cd6d73842181e825c (patch)
tree330540323eae82977756e5086492654b9e461871 /include/trace
parent3f3c73de77b5598e9f87812ac4da9445090c3b4a (diff)
parent9828413d4715d4ed12bc92b161f4ed377d777ffb (diff)
Merge tag 'trace-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing updates from Steven Rostedt: "Some clean ups and small fixes, but the biggest change is the addition of the TRACE_DEFINE_ENUM() macro that can be used by tracepoints. Tracepoints have helper functions for the TP_printk() called __print_symbolic() and __print_flags() that lets a numeric number be displayed as a a human comprehensible text. What is placed in the TP_printk() is also shown in the tracepoint format file such that user space tools like perf and trace-cmd can parse the binary data and express the values too. Unfortunately, the way the TRACE_EVENT() macro works, anything placed in the TP_printk() will be shown pretty much exactly as is. The problem arises when enums are used. That's because unlike macros, enums will not be changed into their values by the C pre-processor. Thus, the enum string is exported to the format file, and this makes it useless for user space tools. The TRACE_DEFINE_ENUM() solves this by converting the enum strings in the TP_printk() format into their number, and that is what is shown to user space. For example, the tracepoint tlb_flush currently has this in its format file: __print_symbolic(REC->reason, { TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" }, { TLB_REMOTE_SHOOTDOWN, "remote shootdown" }, { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" }) After adding: TRACE_DEFINE_ENUM(TLB_FLUSH_ON_TASK_SWITCH); TRACE_DEFINE_ENUM(TLB_REMOTE_SHOOTDOWN); TRACE_DEFINE_ENUM(TLB_LOCAL_SHOOTDOWN); TRACE_DEFINE_ENUM(TLB_LOCAL_MM_SHOOTDOWN); Its format file will contain this: __print_symbolic(REC->reason, { 0, "flush on task switch" }, { 1, "remote shootdown" }, { 2, "local shootdown" }, { 3, "local mm shootdown" })" * tag 'trace-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (27 commits) tracing: Add enum_map file to show enums that have been mapped writeback: Export enums used by tracepoint to user space v4l: Export enums used by tracepoints to user space SUNRPC: Export enums in tracepoints to user space mm: tracing: Export enums in tracepoints to user space irq/tracing: Export enums in tracepoints to user space f2fs: Export the enums in the tracepoints to userspace net/9p/tracing: Export enums in tracepoints to userspace x86/tlb/trace: Export enums in used by tlb_flush tracepoint tracing/samples: Update the trace-event-sample.h with TRACE_DEFINE_ENUM() tracing: Allow for modules to convert their enums to values tracing: Add TRACE_DEFINE_ENUM() macro to map enums to their values tracing: Update trace-event-sample with TRACE_SYSTEM_VAR documentation tracing: Give system name a pointer brcmsmac: Move each system tracepoints to their own header iwlwifi: Move each system tracepoints to their own header mac80211: Move message tracepoints to their own header tracing: Add TRACE_SYSTEM_VAR to xhci-hcd tracing: Add TRACE_SYSTEM_VAR to kvm-s390 tracing: Add TRACE_SYSTEM_VAR to intel-sst ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/9p.h157
-rw-r--r--include/trace/events/btrfs.h4
-rw-r--r--include/trace/events/ext3.h2
-rw-r--r--include/trace/events/ext4.h6
-rw-r--r--include/trace/events/f2fs.h30
-rw-r--r--include/trace/events/intel-sst.h7
-rw-r--r--include/trace/events/irq.h39
-rw-r--r--include/trace/events/migrate.h42
-rw-r--r--include/trace/events/module.h4
-rw-r--r--include/trace/events/random.h10
-rw-r--r--include/trace/events/sunrpc.h62
-rw-r--r--include/trace/events/tlb.h30
-rw-r--r--include/trace/events/v4l2.h75
-rw-r--r--include/trace/events/writeback.h33
-rw-r--r--include/trace/ftrace.h41
15 files changed, 377 insertions, 165 deletions
diff --git a/include/trace/events/9p.h b/include/trace/events/9p.h
index a0666362c111..633ee9ee9778 100644
--- a/include/trace/events/9p.h
+++ b/include/trace/events/9p.h
@@ -6,76 +6,95 @@
6 6
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8 8
9#define P9_MSG_T \
10 EM( P9_TLERROR, "P9_TLERROR" ) \
11 EM( P9_RLERROR, "P9_RLERROR" ) \
12 EM( P9_TSTATFS, "P9_TSTATFS" ) \
13 EM( P9_RSTATFS, "P9_RSTATFS" ) \
14 EM( P9_TLOPEN, "P9_TLOPEN" ) \
15 EM( P9_RLOPEN, "P9_RLOPEN" ) \
16 EM( P9_TLCREATE, "P9_TLCREATE" ) \
17 EM( P9_RLCREATE, "P9_RLCREATE" ) \
18 EM( P9_TSYMLINK, "P9_TSYMLINK" ) \
19 EM( P9_RSYMLINK, "P9_RSYMLINK" ) \
20 EM( P9_TMKNOD, "P9_TMKNOD" ) \
21 EM( P9_RMKNOD, "P9_RMKNOD" ) \
22 EM( P9_TRENAME, "P9_TRENAME" ) \
23 EM( P9_RRENAME, "P9_RRENAME" ) \
24 EM( P9_TREADLINK, "P9_TREADLINK" ) \
25 EM( P9_RREADLINK, "P9_RREADLINK" ) \
26 EM( P9_TGETATTR, "P9_TGETATTR" ) \
27 EM( P9_RGETATTR, "P9_RGETATTR" ) \
28 EM( P9_TSETATTR, "P9_TSETATTR" ) \
29 EM( P9_RSETATTR, "P9_RSETATTR" ) \
30 EM( P9_TXATTRWALK, "P9_TXATTRWALK" ) \
31 EM( P9_RXATTRWALK, "P9_RXATTRWALK" ) \
32 EM( P9_TXATTRCREATE, "P9_TXATTRCREATE" ) \
33 EM( P9_RXATTRCREATE, "P9_RXATTRCREATE" ) \
34 EM( P9_TREADDIR, "P9_TREADDIR" ) \
35 EM( P9_RREADDIR, "P9_RREADDIR" ) \
36 EM( P9_TFSYNC, "P9_TFSYNC" ) \
37 EM( P9_RFSYNC, "P9_RFSYNC" ) \
38 EM( P9_TLOCK, "P9_TLOCK" ) \
39 EM( P9_RLOCK, "P9_RLOCK" ) \
40 EM( P9_TGETLOCK, "P9_TGETLOCK" ) \
41 EM( P9_RGETLOCK, "P9_RGETLOCK" ) \
42 EM( P9_TLINK, "P9_TLINK" ) \
43 EM( P9_RLINK, "P9_RLINK" ) \
44 EM( P9_TMKDIR, "P9_TMKDIR" ) \
45 EM( P9_RMKDIR, "P9_RMKDIR" ) \
46 EM( P9_TRENAMEAT, "P9_TRENAMEAT" ) \
47 EM( P9_RRENAMEAT, "P9_RRENAMEAT" ) \
48 EM( P9_TUNLINKAT, "P9_TUNLINKAT" ) \
49 EM( P9_RUNLINKAT, "P9_RUNLINKAT" ) \
50 EM( P9_TVERSION, "P9_TVERSION" ) \
51 EM( P9_RVERSION, "P9_RVERSION" ) \
52 EM( P9_TAUTH, "P9_TAUTH" ) \
53 EM( P9_RAUTH, "P9_RAUTH" ) \
54 EM( P9_TATTACH, "P9_TATTACH" ) \
55 EM( P9_RATTACH, "P9_RATTACH" ) \
56 EM( P9_TERROR, "P9_TERROR" ) \
57 EM( P9_RERROR, "P9_RERROR" ) \
58 EM( P9_TFLUSH, "P9_TFLUSH" ) \
59 EM( P9_RFLUSH, "P9_RFLUSH" ) \
60 EM( P9_TWALK, "P9_TWALK" ) \
61 EM( P9_RWALK, "P9_RWALK" ) \
62 EM( P9_TOPEN, "P9_TOPEN" ) \
63 EM( P9_ROPEN, "P9_ROPEN" ) \
64 EM( P9_TCREATE, "P9_TCREATE" ) \
65 EM( P9_RCREATE, "P9_RCREATE" ) \
66 EM( P9_TREAD, "P9_TREAD" ) \
67 EM( P9_RREAD, "P9_RREAD" ) \
68 EM( P9_TWRITE, "P9_TWRITE" ) \
69 EM( P9_RWRITE, "P9_RWRITE" ) \
70 EM( P9_TCLUNK, "P9_TCLUNK" ) \
71 EM( P9_RCLUNK, "P9_RCLUNK" ) \
72 EM( P9_TREMOVE, "P9_TREMOVE" ) \
73 EM( P9_RREMOVE, "P9_RREMOVE" ) \
74 EM( P9_TSTAT, "P9_TSTAT" ) \
75 EM( P9_RSTAT, "P9_RSTAT" ) \
76 EM( P9_TWSTAT, "P9_TWSTAT" ) \
77 EMe(P9_RWSTAT, "P9_RWSTAT" )
78
79/* Define EM() to export the enums to userspace via TRACE_DEFINE_ENUM() */
80#undef EM
81#undef EMe
82#define EM(a, b) TRACE_DEFINE_ENUM(a);
83#define EMe(a, b) TRACE_DEFINE_ENUM(a);
84
85P9_MSG_T
86
87/*
88 * Now redefine the EM() and EMe() macros to map the enums to the strings
89 * that will be printed in the output.
90 */
91#undef EM
92#undef EMe
93#define EM(a, b) { a, b },
94#define EMe(a, b) { a, b }
95
9#define show_9p_op(type) \ 96#define show_9p_op(type) \
10 __print_symbolic(type, \ 97 __print_symbolic(type, P9_MSG_T)
11 { P9_TLERROR, "P9_TLERROR" }, \
12 { P9_RLERROR, "P9_RLERROR" }, \
13 { P9_TSTATFS, "P9_TSTATFS" }, \
14 { P9_RSTATFS, "P9_RSTATFS" }, \
15 { P9_TLOPEN, "P9_TLOPEN" }, \
16 { P9_RLOPEN, "P9_RLOPEN" }, \
17 { P9_TLCREATE, "P9_TLCREATE" }, \
18 { P9_RLCREATE, "P9_RLCREATE" }, \
19 { P9_TSYMLINK, "P9_TSYMLINK" }, \
20 { P9_RSYMLINK, "P9_RSYMLINK" }, \
21 { P9_TMKNOD, "P9_TMKNOD" }, \
22 { P9_RMKNOD, "P9_RMKNOD" }, \
23 { P9_TRENAME, "P9_TRENAME" }, \
24 { P9_RRENAME, "P9_RRENAME" }, \
25 { P9_TREADLINK, "P9_TREADLINK" }, \
26 { P9_RREADLINK, "P9_RREADLINK" }, \
27 { P9_TGETATTR, "P9_TGETATTR" }, \
28 { P9_RGETATTR, "P9_RGETATTR" }, \
29 { P9_TSETATTR, "P9_TSETATTR" }, \
30 { P9_RSETATTR, "P9_RSETATTR" }, \
31 { P9_TXATTRWALK, "P9_TXATTRWALK" }, \
32 { P9_RXATTRWALK, "P9_RXATTRWALK" }, \
33 { P9_TXATTRCREATE, "P9_TXATTRCREATE" }, \
34 { P9_RXATTRCREATE, "P9_RXATTRCREATE" }, \
35 { P9_TREADDIR, "P9_TREADDIR" }, \
36 { P9_RREADDIR, "P9_RREADDIR" }, \
37 { P9_TFSYNC, "P9_TFSYNC" }, \
38 { P9_RFSYNC, "P9_RFSYNC" }, \
39 { P9_TLOCK, "P9_TLOCK" }, \
40 { P9_RLOCK, "P9_RLOCK" }, \
41 { P9_TGETLOCK, "P9_TGETLOCK" }, \
42 { P9_RGETLOCK, "P9_RGETLOCK" }, \
43 { P9_TLINK, "P9_TLINK" }, \
44 { P9_RLINK, "P9_RLINK" }, \
45 { P9_TMKDIR, "P9_TMKDIR" }, \
46 { P9_RMKDIR, "P9_RMKDIR" }, \
47 { P9_TRENAMEAT, "P9_TRENAMEAT" }, \
48 { P9_RRENAMEAT, "P9_RRENAMEAT" }, \
49 { P9_TUNLINKAT, "P9_TUNLINKAT" }, \
50 { P9_RUNLINKAT, "P9_RUNLINKAT" }, \
51 { P9_TVERSION, "P9_TVERSION" }, \
52 { P9_RVERSION, "P9_RVERSION" }, \
53 { P9_TAUTH, "P9_TAUTH" }, \
54 { P9_RAUTH, "P9_RAUTH" }, \
55 { P9_TATTACH, "P9_TATTACH" }, \
56 { P9_RATTACH, "P9_RATTACH" }, \
57 { P9_TERROR, "P9_TERROR" }, \
58 { P9_RERROR, "P9_RERROR" }, \
59 { P9_TFLUSH, "P9_TFLUSH" }, \
60 { P9_RFLUSH, "P9_RFLUSH" }, \
61 { P9_TWALK, "P9_TWALK" }, \
62 { P9_RWALK, "P9_RWALK" }, \
63 { P9_TOPEN, "P9_TOPEN" }, \
64 { P9_ROPEN, "P9_ROPEN" }, \
65 { P9_TCREATE, "P9_TCREATE" }, \
66 { P9_RCREATE, "P9_RCREATE" }, \
67 { P9_TREAD, "P9_TREAD" }, \
68 { P9_RREAD, "P9_RREAD" }, \
69 { P9_TWRITE, "P9_TWRITE" }, \
70 { P9_RWRITE, "P9_RWRITE" }, \
71 { P9_TCLUNK, "P9_TCLUNK" }, \
72 { P9_RCLUNK, "P9_RCLUNK" }, \
73 { P9_TREMOVE, "P9_TREMOVE" }, \
74 { P9_RREMOVE, "P9_RREMOVE" }, \
75 { P9_TSTAT, "P9_TSTAT" }, \
76 { P9_RSTAT, "P9_RSTAT" }, \
77 { P9_TWSTAT, "P9_TWSTAT" }, \
78 { P9_RWSTAT, "P9_RWSTAT" })
79 98
80TRACE_EVENT(9p_client_req, 99TRACE_EVENT(9p_client_req,
81 TP_PROTO(struct p9_client *clnt, int8_t type, int tag), 100 TP_PROTO(struct p9_client *clnt, int8_t type, int tag),
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 1faecea101f3..572e6503394a 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -962,7 +962,7 @@ TRACE_EVENT(alloc_extent_state,
962 __entry->ip = IP 962 __entry->ip = IP
963 ), 963 ),
964 964
965 TP_printk("state=%p; mask = %s; caller = %pF", __entry->state, 965 TP_printk("state=%p; mask = %s; caller = %pS", __entry->state,
966 show_gfp_flags(__entry->mask), (void *)__entry->ip) 966 show_gfp_flags(__entry->mask), (void *)__entry->ip)
967); 967);
968 968
@@ -982,7 +982,7 @@ TRACE_EVENT(free_extent_state,
982 __entry->ip = IP 982 __entry->ip = IP
983 ), 983 ),
984 984
985 TP_printk(" state=%p; caller = %pF", __entry->state, 985 TP_printk(" state=%p; caller = %pS", __entry->state,
986 (void *)__entry->ip) 986 (void *)__entry->ip)
987); 987);
988 988
diff --git a/include/trace/events/ext3.h b/include/trace/events/ext3.h
index 6797b9de90ed..7f20707849bb 100644
--- a/include/trace/events/ext3.h
+++ b/include/trace/events/ext3.h
@@ -144,7 +144,7 @@ TRACE_EVENT(ext3_mark_inode_dirty,
144 __entry->ip = IP; 144 __entry->ip = IP;
145 ), 145 ),
146 146
147 TP_printk("dev %d,%d ino %lu caller %pF", 147 TP_printk("dev %d,%d ino %lu caller %pS",
148 MAJOR(__entry->dev), MINOR(__entry->dev), 148 MAJOR(__entry->dev), MINOR(__entry->dev),
149 (unsigned long) __entry->ino, (void *)__entry->ip) 149 (unsigned long) __entry->ino, (void *)__entry->ip)
150); 150);
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 6e5abd6d38a2..47fca36ee426 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -240,7 +240,7 @@ TRACE_EVENT(ext4_mark_inode_dirty,
240 __entry->ip = IP; 240 __entry->ip = IP;
241 ), 241 ),
242 242
243 TP_printk("dev %d,%d ino %lu caller %pF", 243 TP_printk("dev %d,%d ino %lu caller %pS",
244 MAJOR(__entry->dev), MINOR(__entry->dev), 244 MAJOR(__entry->dev), MINOR(__entry->dev),
245 (unsigned long) __entry->ino, (void *)__entry->ip) 245 (unsigned long) __entry->ino, (void *)__entry->ip)
246); 246);
@@ -1762,7 +1762,7 @@ TRACE_EVENT(ext4_journal_start,
1762 __entry->rsv_blocks = rsv_blocks; 1762 __entry->rsv_blocks = rsv_blocks;
1763 ), 1763 ),
1764 1764
1765 TP_printk("dev %d,%d blocks, %d rsv_blocks, %d caller %pF", 1765 TP_printk("dev %d,%d blocks, %d rsv_blocks, %d caller %pS",
1766 MAJOR(__entry->dev), MINOR(__entry->dev), 1766 MAJOR(__entry->dev), MINOR(__entry->dev),
1767 __entry->blocks, __entry->rsv_blocks, (void *)__entry->ip) 1767 __entry->blocks, __entry->rsv_blocks, (void *)__entry->ip)
1768); 1768);
@@ -1784,7 +1784,7 @@ TRACE_EVENT(ext4_journal_start_reserved,
1784 __entry->blocks = blocks; 1784 __entry->blocks = blocks;
1785 ), 1785 ),
1786 1786
1787 TP_printk("dev %d,%d blocks, %d caller %pF", 1787 TP_printk("dev %d,%d blocks, %d caller %pS",
1788 MAJOR(__entry->dev), MINOR(__entry->dev), 1788 MAJOR(__entry->dev), MINOR(__entry->dev),
1789 __entry->blocks, (void *)__entry->ip) 1789 __entry->blocks, (void *)__entry->ip)
1790); 1790);
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 5422dbfaf97d..36f4536b6149 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -9,6 +9,36 @@
9#define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev) 9#define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev)
10#define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino 10#define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino
11 11
12TRACE_DEFINE_ENUM(NODE);
13TRACE_DEFINE_ENUM(DATA);
14TRACE_DEFINE_ENUM(META);
15TRACE_DEFINE_ENUM(META_FLUSH);
16TRACE_DEFINE_ENUM(CURSEG_HOT_DATA);
17TRACE_DEFINE_ENUM(CURSEG_WARM_DATA);
18TRACE_DEFINE_ENUM(CURSEG_COLD_DATA);
19TRACE_DEFINE_ENUM(CURSEG_HOT_NODE);
20TRACE_DEFINE_ENUM(CURSEG_WARM_NODE);
21TRACE_DEFINE_ENUM(CURSEG_COLD_NODE);
22TRACE_DEFINE_ENUM(NO_CHECK_TYPE);
23TRACE_DEFINE_ENUM(GC_GREEDY);
24TRACE_DEFINE_ENUM(GC_CB);
25TRACE_DEFINE_ENUM(FG_GC);
26TRACE_DEFINE_ENUM(BG_GC);
27TRACE_DEFINE_ENUM(LFS);
28TRACE_DEFINE_ENUM(SSR);
29TRACE_DEFINE_ENUM(__REQ_RAHEAD);
30TRACE_DEFINE_ENUM(__REQ_WRITE);
31TRACE_DEFINE_ENUM(__REQ_SYNC);
32TRACE_DEFINE_ENUM(__REQ_NOIDLE);
33TRACE_DEFINE_ENUM(__REQ_FLUSH);
34TRACE_DEFINE_ENUM(__REQ_FUA);
35TRACE_DEFINE_ENUM(__REQ_PRIO);
36TRACE_DEFINE_ENUM(__REQ_META);
37TRACE_DEFINE_ENUM(CP_UMOUNT);
38TRACE_DEFINE_ENUM(CP_FASTBOOT);
39TRACE_DEFINE_ENUM(CP_SYNC);
40TRACE_DEFINE_ENUM(CP_DISCARD);
41
12#define show_block_type(type) \ 42#define show_block_type(type) \
13 __print_symbolic(type, \ 43 __print_symbolic(type, \
14 { NODE, "NODE" }, \ 44 { NODE, "NODE" }, \
diff --git a/include/trace/events/intel-sst.h b/include/trace/events/intel-sst.h
index 76c72d3f1902..edc24e6dea1b 100644
--- a/include/trace/events/intel-sst.h
+++ b/include/trace/events/intel-sst.h
@@ -1,6 +1,13 @@
1#undef TRACE_SYSTEM 1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM intel-sst 2#define TRACE_SYSTEM intel-sst
3 3
4/*
5 * The TRACE_SYSTEM_VAR defaults to TRACE_SYSTEM, but must be a
6 * legitimate C variable. It is not exported to user space.
7 */
8#undef TRACE_SYSTEM_VAR
9#define TRACE_SYSTEM_VAR intel_sst
10
4#if !defined(_TRACE_INTEL_SST_H) || defined(TRACE_HEADER_MULTI_READ) 11#if !defined(_TRACE_INTEL_SST_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_INTEL_SST_H 12#define _TRACE_INTEL_SST_H
6 13
diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h
index 3608bebd3d9c..ff8f6c091a15 100644
--- a/include/trace/events/irq.h
+++ b/include/trace/events/irq.h
@@ -9,19 +9,34 @@
9struct irqaction; 9struct irqaction;
10struct softirq_action; 10struct softirq_action;
11 11
12#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } 12#define SOFTIRQ_NAME_LIST \
13 softirq_name(HI) \
14 softirq_name(TIMER) \
15 softirq_name(NET_TX) \
16 softirq_name(NET_RX) \
17 softirq_name(BLOCK) \
18 softirq_name(BLOCK_IOPOLL) \
19 softirq_name(TASKLET) \
20 softirq_name(SCHED) \
21 softirq_name(HRTIMER) \
22 softirq_name_end(RCU)
23
24#undef softirq_name
25#undef softirq_name_end
26
27#define softirq_name(sirq) TRACE_DEFINE_ENUM(sirq##_SOFTIRQ);
28#define softirq_name_end(sirq) TRACE_DEFINE_ENUM(sirq##_SOFTIRQ);
29
30SOFTIRQ_NAME_LIST
31
32#undef softirq_name
33#undef softirq_name_end
34
35#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq },
36#define softirq_name_end(sirq) { sirq##_SOFTIRQ, #sirq }
37
13#define show_softirq_name(val) \ 38#define show_softirq_name(val) \
14 __print_symbolic(val, \ 39 __print_symbolic(val, SOFTIRQ_NAME_LIST)
15 softirq_name(HI), \
16 softirq_name(TIMER), \
17 softirq_name(NET_TX), \
18 softirq_name(NET_RX), \
19 softirq_name(BLOCK), \
20 softirq_name(BLOCK_IOPOLL), \
21 softirq_name(TASKLET), \
22 softirq_name(SCHED), \
23 softirq_name(HRTIMER), \
24 softirq_name(RCU))
25 40
26/** 41/**
27 * irq_handler_entry - called immediately before the irq action handler 42 * irq_handler_entry - called immediately before the irq action handler
diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h
index dd2b5467d905..539b25a76111 100644
--- a/include/trace/events/migrate.h
+++ b/include/trace/events/migrate.h
@@ -7,18 +7,40 @@
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8 8
9#define MIGRATE_MODE \ 9#define MIGRATE_MODE \
10 {MIGRATE_ASYNC, "MIGRATE_ASYNC"}, \ 10 EM( MIGRATE_ASYNC, "MIGRATE_ASYNC") \
11 {MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT"}, \ 11 EM( MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT") \
12 {MIGRATE_SYNC, "MIGRATE_SYNC"} 12 EMe(MIGRATE_SYNC, "MIGRATE_SYNC")
13
13 14
14#define MIGRATE_REASON \ 15#define MIGRATE_REASON \
15 {MR_COMPACTION, "compaction"}, \ 16 EM( MR_COMPACTION, "compaction") \
16 {MR_MEMORY_FAILURE, "memory_failure"}, \ 17 EM( MR_MEMORY_FAILURE, "memory_failure") \
17 {MR_MEMORY_HOTPLUG, "memory_hotplug"}, \ 18 EM( MR_MEMORY_HOTPLUG, "memory_hotplug") \
18 {MR_SYSCALL, "syscall_or_cpuset"}, \ 19 EM( MR_SYSCALL, "syscall_or_cpuset") \
19 {MR_MEMPOLICY_MBIND, "mempolicy_mbind"}, \ 20 EM( MR_MEMPOLICY_MBIND, "mempolicy_mbind") \
20 {MR_NUMA_MISPLACED, "numa_misplaced"}, \ 21 EM( MR_NUMA_MISPLACED, "numa_misplaced") \
21 {MR_CMA, "cma"} 22 EMe(MR_CMA, "cma")
23
24/*
25 * First define the enums in the above macros to be exported to userspace
26 * via TRACE_DEFINE_ENUM().
27 */
28#undef EM
29#undef EMe
30#define EM(a, b) TRACE_DEFINE_ENUM(a);
31#define EMe(a, b) TRACE_DEFINE_ENUM(a);
32
33MIGRATE_MODE
34MIGRATE_REASON
35
36/*
37 * Now redefine the EM() and EMe() macros to map the enums to the strings
38 * that will be printed in the output.
39 */
40#undef EM
41#undef EMe
42#define EM(a, b) {a, b},
43#define EMe(a, b) {a, b}
22 44
23TRACE_EVENT(mm_migrate_pages, 45TRACE_EVENT(mm_migrate_pages,
24 46
diff --git a/include/trace/events/module.h b/include/trace/events/module.h
index 81c4c183d348..28c45997e451 100644
--- a/include/trace/events/module.h
+++ b/include/trace/events/module.h
@@ -84,7 +84,7 @@ DECLARE_EVENT_CLASS(module_refcnt,
84 __assign_str(name, mod->name); 84 __assign_str(name, mod->name);
85 ), 85 ),
86 86
87 TP_printk("%s call_site=%pf refcnt=%d", 87 TP_printk("%s call_site=%ps refcnt=%d",
88 __get_str(name), (void *)__entry->ip, __entry->refcnt) 88 __get_str(name), (void *)__entry->ip, __entry->refcnt)
89); 89);
90 90
@@ -121,7 +121,7 @@ TRACE_EVENT(module_request,
121 __assign_str(name, name); 121 __assign_str(name, name);
122 ), 122 ),
123 123
124 TP_printk("%s wait=%d call_site=%pf", 124 TP_printk("%s wait=%d call_site=%ps",
125 __get_str(name), (int)__entry->wait, (void *)__entry->ip) 125 __get_str(name), (int)__entry->wait, (void *)__entry->ip)
126); 126);
127 127
diff --git a/include/trace/events/random.h b/include/trace/events/random.h
index 805af6db41cc..4684de344c5d 100644
--- a/include/trace/events/random.h
+++ b/include/trace/events/random.h
@@ -22,7 +22,7 @@ TRACE_EVENT(add_device_randomness,
22 __entry->IP = IP; 22 __entry->IP = IP;
23 ), 23 ),
24 24
25 TP_printk("bytes %d caller %pF", 25 TP_printk("bytes %d caller %pS",
26 __entry->bytes, (void *)__entry->IP) 26 __entry->bytes, (void *)__entry->IP)
27); 27);
28 28
@@ -43,7 +43,7 @@ DECLARE_EVENT_CLASS(random__mix_pool_bytes,
43 __entry->IP = IP; 43 __entry->IP = IP;
44 ), 44 ),
45 45
46 TP_printk("%s pool: bytes %d caller %pF", 46 TP_printk("%s pool: bytes %d caller %pS",
47 __entry->pool_name, __entry->bytes, (void *)__entry->IP) 47 __entry->pool_name, __entry->bytes, (void *)__entry->IP)
48); 48);
49 49
@@ -82,7 +82,7 @@ TRACE_EVENT(credit_entropy_bits,
82 ), 82 ),
83 83
84 TP_printk("%s pool: bits %d entropy_count %d entropy_total %d " 84 TP_printk("%s pool: bits %d entropy_count %d entropy_total %d "
85 "caller %pF", __entry->pool_name, __entry->bits, 85 "caller %pS", __entry->pool_name, __entry->bits,
86 __entry->entropy_count, __entry->entropy_total, 86 __entry->entropy_count, __entry->entropy_total,
87 (void *)__entry->IP) 87 (void *)__entry->IP)
88); 88);
@@ -207,7 +207,7 @@ DECLARE_EVENT_CLASS(random__get_random_bytes,
207 __entry->IP = IP; 207 __entry->IP = IP;
208 ), 208 ),
209 209
210 TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) 210 TP_printk("nbytes %d caller %pS", __entry->nbytes, (void *)__entry->IP)
211); 211);
212 212
213DEFINE_EVENT(random__get_random_bytes, get_random_bytes, 213DEFINE_EVENT(random__get_random_bytes, get_random_bytes,
@@ -242,7 +242,7 @@ DECLARE_EVENT_CLASS(random__extract_entropy,
242 __entry->IP = IP; 242 __entry->IP = IP;
243 ), 243 ),
244 244
245 TP_printk("%s pool: nbytes %d entropy_count %d caller %pF", 245 TP_printk("%s pool: nbytes %d entropy_count %d caller %pS",
246 __entry->pool_name, __entry->nbytes, __entry->entropy_count, 246 __entry->pool_name, __entry->nbytes, __entry->entropy_count,
247 (void *)__entry->IP) 247 (void *)__entry->IP)
248); 248);
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index b9c1dc6c825a..fd1a02cb3c82 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -179,27 +179,53 @@ DEFINE_EVENT(rpc_task_queued, rpc_task_wakeup,
179 179
180); 180);
181 181
182/*
183 * First define the enums in the below macros to be exported to userspace
184 * via TRACE_DEFINE_ENUM().
185 */
186#undef EM
187#undef EMe
188#define EM(a, b) TRACE_DEFINE_ENUM(a);
189#define EMe(a, b) TRACE_DEFINE_ENUM(a);
190
191#define RPC_SHOW_SOCKET \
192 EM( SS_FREE, "FREE" ) \
193 EM( SS_UNCONNECTED, "UNCONNECTED" ) \
194 EM( SS_CONNECTING, "CONNECTING," ) \
195 EM( SS_CONNECTED, "CONNECTED," ) \
196 EMe(SS_DISCONNECTING, "DISCONNECTING" )
197
182#define rpc_show_socket_state(state) \ 198#define rpc_show_socket_state(state) \
183 __print_symbolic(state, \ 199 __print_symbolic(state, RPC_SHOW_SOCKET)
184 { SS_FREE, "FREE" }, \ 200
185 { SS_UNCONNECTED, "UNCONNECTED" }, \ 201RPC_SHOW_SOCKET
186 { SS_CONNECTING, "CONNECTING," }, \ 202
187 { SS_CONNECTED, "CONNECTED," }, \ 203#define RPC_SHOW_SOCK \
188 { SS_DISCONNECTING, "DISCONNECTING" }) 204 EM( TCP_ESTABLISHED, "ESTABLISHED" ) \
205 EM( TCP_SYN_SENT, "SYN_SENT" ) \
206 EM( TCP_SYN_RECV, "SYN_RECV" ) \
207 EM( TCP_FIN_WAIT1, "FIN_WAIT1" ) \
208 EM( TCP_FIN_WAIT2, "FIN_WAIT2" ) \
209 EM( TCP_TIME_WAIT, "TIME_WAIT" ) \
210 EM( TCP_CLOSE, "CLOSE" ) \
211 EM( TCP_CLOSE_WAIT, "CLOSE_WAIT" ) \
212 EM( TCP_LAST_ACK, "LAST_ACK" ) \
213 EM( TCP_LISTEN, "LISTEN" ) \
214 EMe( TCP_CLOSING, "CLOSING" )
189 215
190#define rpc_show_sock_state(state) \ 216#define rpc_show_sock_state(state) \
191 __print_symbolic(state, \ 217 __print_symbolic(state, RPC_SHOW_SOCK)
192 { TCP_ESTABLISHED, "ESTABLISHED" }, \ 218
193 { TCP_SYN_SENT, "SYN_SENT" }, \ 219RPC_SHOW_SOCK
194 { TCP_SYN_RECV, "SYN_RECV" }, \ 220
195 { TCP_FIN_WAIT1, "FIN_WAIT1" }, \ 221/*
196 { TCP_FIN_WAIT2, "FIN_WAIT2" }, \ 222 * Now redefine the EM() and EMe() macros to map the enums to the strings
197 { TCP_TIME_WAIT, "TIME_WAIT" }, \ 223 * that will be printed in the output.
198 { TCP_CLOSE, "CLOSE" }, \ 224 */
199 { TCP_CLOSE_WAIT, "CLOSE_WAIT" }, \ 225#undef EM
200 { TCP_LAST_ACK, "LAST_ACK" }, \ 226#undef EMe
201 { TCP_LISTEN, "LISTEN" }, \ 227#define EM(a, b) {a, b},
202 { TCP_CLOSING, "CLOSING" }) 228#define EMe(a, b) {a, b}
203 229
204DECLARE_EVENT_CLASS(xs_socket_event, 230DECLARE_EVENT_CLASS(xs_socket_event,
205 231
diff --git a/include/trace/events/tlb.h b/include/trace/events/tlb.h
index 0e7635765153..4250f364a6ca 100644
--- a/include/trace/events/tlb.h
+++ b/include/trace/events/tlb.h
@@ -7,11 +7,31 @@
7#include <linux/mm_types.h> 7#include <linux/mm_types.h>
8#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
9 9
10#define TLB_FLUSH_REASON \ 10#define TLB_FLUSH_REASON \
11 { TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" }, \ 11 EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \
12 { TLB_REMOTE_SHOOTDOWN, "remote shootdown" }, \ 12 EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \
13 { TLB_LOCAL_SHOOTDOWN, "local shootdown" }, \ 13 EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \
14 { TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" } 14 EMe( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" )
15
16/*
17 * First define the enums in TLB_FLUSH_REASON to be exported to userspace
18 * via TRACE_DEFINE_ENUM().
19 */
20#undef EM
21#undef EMe
22#define EM(a,b) TRACE_DEFINE_ENUM(a);
23#define EMe(a,b) TRACE_DEFINE_ENUM(a);
24
25TLB_FLUSH_REASON
26
27/*
28 * Now redefine the EM() and EMe() macros to map the enums to the strings
29 * that will be printed in the output.
30 */
31#undef EM
32#undef EMe
33#define EM(a,b) { a, b },
34#define EMe(a,b) { a, b }
15 35
16TRACE_EVENT_CONDITION(tlb_flush, 36TRACE_EVENT_CONDITION(tlb_flush,
17 37
diff --git a/include/trace/events/v4l2.h b/include/trace/events/v4l2.h
index b9bb1f204693..20112170ff11 100644
--- a/include/trace/events/v4l2.h
+++ b/include/trace/events/v4l2.h
@@ -6,33 +6,58 @@
6 6
7#include <linux/tracepoint.h> 7#include <linux/tracepoint.h>
8 8
9#define show_type(type) \ 9/* Enums require being exported to userspace, for user tool parsing */
10 __print_symbolic(type, \ 10#undef EM
11 { V4L2_BUF_TYPE_VIDEO_CAPTURE, "VIDEO_CAPTURE" }, \ 11#undef EMe
12 { V4L2_BUF_TYPE_VIDEO_OUTPUT, "VIDEO_OUTPUT" }, \ 12#define EM(a, b) TRACE_DEFINE_ENUM(a);
13 { V4L2_BUF_TYPE_VIDEO_OVERLAY, "VIDEO_OVERLAY" }, \ 13#define EMe(a, b) TRACE_DEFINE_ENUM(a);
14 { V4L2_BUF_TYPE_VBI_CAPTURE, "VBI_CAPTURE" }, \ 14
15 { V4L2_BUF_TYPE_VBI_OUTPUT, "VBI_OUTPUT" }, \ 15#define show_type(type) \
16 { V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, "SLICED_VBI_CAPTURE" }, \ 16 __print_symbolic(type, SHOW_TYPE)
17 { V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, "SLICED_VBI_OUTPUT" }, \ 17
18 { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" },\ 18#define SHOW_TYPE \
19 { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" },\ 19 EM( V4L2_BUF_TYPE_VIDEO_CAPTURE, "VIDEO_CAPTURE" ) \
20 { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" }, \ 20 EM( V4L2_BUF_TYPE_VIDEO_OUTPUT, "VIDEO_OUTPUT" ) \
21 { V4L2_BUF_TYPE_SDR_CAPTURE, "SDR_CAPTURE" }, \ 21 EM( V4L2_BUF_TYPE_VIDEO_OVERLAY, "VIDEO_OVERLAY" ) \
22 { V4L2_BUF_TYPE_PRIVATE, "PRIVATE" }) 22 EM( V4L2_BUF_TYPE_VBI_CAPTURE, "VBI_CAPTURE" ) \
23 EM( V4L2_BUF_TYPE_VBI_OUTPUT, "VBI_OUTPUT" ) \
24 EM( V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, "SLICED_VBI_CAPTURE" ) \
25 EM( V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, "SLICED_VBI_OUTPUT" ) \
26 EM( V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" ) \
27 EM( V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" ) \
28 EM( V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" ) \
29 EM( V4L2_BUF_TYPE_SDR_CAPTURE, "SDR_CAPTURE" ) \
30 EMe(V4L2_BUF_TYPE_PRIVATE, "PRIVATE" )
31
32SHOW_TYPE
23 33
24#define show_field(field) \ 34#define show_field(field) \
25 __print_symbolic(field, \ 35 __print_symbolic(field, SHOW_FIELD)
26 { V4L2_FIELD_ANY, "ANY" }, \ 36
27 { V4L2_FIELD_NONE, "NONE" }, \ 37#define SHOW_FIELD \
28 { V4L2_FIELD_TOP, "TOP" }, \ 38 EM( V4L2_FIELD_ANY, "ANY" ) \
29 { V4L2_FIELD_BOTTOM, "BOTTOM" }, \ 39 EM( V4L2_FIELD_NONE, "NONE" ) \
30 { V4L2_FIELD_INTERLACED, "INTERLACED" }, \ 40 EM( V4L2_FIELD_TOP, "TOP" ) \
31 { V4L2_FIELD_SEQ_TB, "SEQ_TB" }, \ 41 EM( V4L2_FIELD_BOTTOM, "BOTTOM" ) \
32 { V4L2_FIELD_SEQ_BT, "SEQ_BT" }, \ 42 EM( V4L2_FIELD_INTERLACED, "INTERLACED" ) \
33 { V4L2_FIELD_ALTERNATE, "ALTERNATE" }, \ 43 EM( V4L2_FIELD_SEQ_TB, "SEQ_TB" ) \
34 { V4L2_FIELD_INTERLACED_TB, "INTERLACED_TB" }, \ 44 EM( V4L2_FIELD_SEQ_BT, "SEQ_BT" ) \
35 { V4L2_FIELD_INTERLACED_BT, "INTERLACED_BT" }) 45 EM( V4L2_FIELD_ALTERNATE, "ALTERNATE" ) \
46 EM( V4L2_FIELD_INTERLACED_TB, "INTERLACED_TB" ) \
47 EMe( V4L2_FIELD_INTERLACED_BT, "INTERLACED_BT" )
48
49SHOW_FIELD
50
51/*
52 * Now redefine the EM() and EMe() macros to map the enums to the strings
53 * that will be printed in the output.
54 */
55#undef EM
56#undef EMe
57#define EM(a, b) {a, b},
58#define EMe(a, b) {a, b}
59
60/* V4L2_TC_TYPE_* are macros, not defines, they do not need processing */
36 61
37#define show_timecode_type(type) \ 62#define show_timecode_type(type) \
38 __print_symbolic(type, \ 63 __print_symbolic(type, \
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 5a14ead59696..880dd7437172 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -23,15 +23,32 @@
23 {I_REFERENCED, "I_REFERENCED"} \ 23 {I_REFERENCED, "I_REFERENCED"} \
24 ) 24 )
25 25
26/* enums need to be exported to user space */
27#undef EM
28#undef EMe
29#define EM(a,b) TRACE_DEFINE_ENUM(a);
30#define EMe(a,b) TRACE_DEFINE_ENUM(a);
31
26#define WB_WORK_REASON \ 32#define WB_WORK_REASON \
27 {WB_REASON_BACKGROUND, "background"}, \ 33 EM( WB_REASON_BACKGROUND, "background") \
28 {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ 34 EM( WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages") \
29 {WB_REASON_SYNC, "sync"}, \ 35 EM( WB_REASON_SYNC, "sync") \
30 {WB_REASON_PERIODIC, "periodic"}, \ 36 EM( WB_REASON_PERIODIC, "periodic") \
31 {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ 37 EM( WB_REASON_LAPTOP_TIMER, "laptop_timer") \
32 {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ 38 EM( WB_REASON_FREE_MORE_MEM, "free_more_memory") \
33 {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ 39 EM( WB_REASON_FS_FREE_SPACE, "fs_free_space") \
34 {WB_REASON_FORKER_THREAD, "forker_thread"} 40 EMe(WB_REASON_FORKER_THREAD, "forker_thread")
41
42WB_WORK_REASON
43
44/*
45 * Now redefine the EM() and EMe() macros to map the enums to the strings
46 * that will be printed in the output.
47 */
48#undef EM
49#undef EMe
50#define EM(a,b) { a, b },
51#define EMe(a,b) { a, b }
35 52
36struct wb_writeback_work; 53struct wb_writeback_work;
37 54
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 41bf65f04dd9..37d4b10b111d 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -18,6 +18,34 @@
18 18
19#include <linux/ftrace_event.h> 19#include <linux/ftrace_event.h>
20 20
21#ifndef TRACE_SYSTEM_VAR
22#define TRACE_SYSTEM_VAR TRACE_SYSTEM
23#endif
24
25#define __app__(x, y) str__##x##y
26#define __app(x, y) __app__(x, y)
27
28#define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
29
30#define TRACE_MAKE_SYSTEM_STR() \
31 static const char TRACE_SYSTEM_STRING[] = \
32 __stringify(TRACE_SYSTEM)
33
34TRACE_MAKE_SYSTEM_STR();
35
36#undef TRACE_DEFINE_ENUM
37#define TRACE_DEFINE_ENUM(a) \
38 static struct trace_enum_map __used __initdata \
39 __##TRACE_SYSTEM##_##a = \
40 { \
41 .system = TRACE_SYSTEM_STRING, \
42 .enum_string = #a, \
43 .enum_value = a \
44 }; \
45 static struct trace_enum_map __used \
46 __attribute__((section("_ftrace_enum_map"))) \
47 *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a
48
21/* 49/*
22 * DECLARE_EVENT_CLASS can be used to add a generic function 50 * DECLARE_EVENT_CLASS can be used to add a generic function
23 * handlers for events. That is, if all events have the same 51 * handlers for events. That is, if all events have the same
@@ -105,7 +133,6 @@
105 133
106#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 134#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
107 135
108
109/* 136/*
110 * Stage 2 of the trace events. 137 * Stage 2 of the trace events.
111 * 138 *
@@ -122,6 +149,9 @@
122 * The size of an array is also encoded, in the higher 16 bits of <item>. 149 * The size of an array is also encoded, in the higher 16 bits of <item>.
123 */ 150 */
124 151
152#undef TRACE_DEFINE_ENUM
153#define TRACE_DEFINE_ENUM(a)
154
125#undef __field 155#undef __field
126#define __field(type, item) 156#define __field(type, item)
127 157
@@ -539,7 +569,7 @@ static inline notrace int ftrace_get_offsets_##call( \
539 * .trace = ftrace_raw_output_<call>, <-- stage 2 569 * .trace = ftrace_raw_output_<call>, <-- stage 2
540 * }; 570 * };
541 * 571 *
542 * static const char print_fmt_<call>[] = <TP_printk>; 572 * static char print_fmt_<call>[] = <TP_printk>;
543 * 573 *
544 * static struct ftrace_event_class __used event_class_<template> = { 574 * static struct ftrace_event_class __used event_class_<template> = {
545 * .system = "<system>", 575 * .system = "<system>",
@@ -690,9 +720,9 @@ static inline void ftrace_test_probe_##call(void) \
690#undef DECLARE_EVENT_CLASS 720#undef DECLARE_EVENT_CLASS
691#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ 721#define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \
692_TRACE_PERF_PROTO(call, PARAMS(proto)); \ 722_TRACE_PERF_PROTO(call, PARAMS(proto)); \
693static const char print_fmt_##call[] = print; \ 723static char print_fmt_##call[] = print; \
694static struct ftrace_event_class __used __refdata event_class_##call = { \ 724static struct ftrace_event_class __used __refdata event_class_##call = { \
695 .system = __stringify(TRACE_SYSTEM), \ 725 .system = TRACE_SYSTEM_STRING, \
696 .define_fields = ftrace_define_fields_##call, \ 726 .define_fields = ftrace_define_fields_##call, \
697 .fields = LIST_HEAD_INIT(event_class_##call.fields),\ 727 .fields = LIST_HEAD_INIT(event_class_##call.fields),\
698 .raw_init = trace_event_raw_init, \ 728 .raw_init = trace_event_raw_init, \
@@ -719,7 +749,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
719#undef DEFINE_EVENT_PRINT 749#undef DEFINE_EVENT_PRINT
720#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \ 750#define DEFINE_EVENT_PRINT(template, call, proto, args, print) \
721 \ 751 \
722static const char print_fmt_##call[] = print; \ 752static char print_fmt_##call[] = print; \
723 \ 753 \
724static struct ftrace_event_call __used event_##call = { \ 754static struct ftrace_event_call __used event_##call = { \
725 .class = &event_class_##template, \ 755 .class = &event_class_##template, \
@@ -735,6 +765,7 @@ __attribute__((section("_ftrace_events"))) *__event_##call = &event_##call
735 765
736#include TRACE_INCLUDE(TRACE_INCLUDE_FILE) 766#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
737 767
768#undef TRACE_SYSTEM_VAR
738 769
739#ifdef CONFIG_PERF_EVENTS 770#ifdef CONFIG_PERF_EVENTS
740 771