aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-01-26 03:22:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-26 16:15:45 -0500
commitba99d93b3d7bb3a6406bc86f41ab863895968a0f (patch)
tree511152e36ae9982361a7241e557aafba79bf8ecf /net/mac80211
parent62362dee83c2a50465cc64ba701ebd741996ec80 (diff)
mac80211: use DECLARE_EVENT_CLASS
For events that include only the local struct as their parameter, we can use DECLARE_EVENT_CLASS and save quite some binary size across segments as well lines of code. text data bss dec hex filename 375745 19296 916 395957 60ab5 mac80211.ko.before 367473 17888 916 386277 5e4e5 mac80211.ko.after -8272 -1408 0 -9680 -25d0 delta Some more tracepoints with identical arguments could be combined like this but for now this is the one that benefits most. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/driver-trace.h202
1 files changed, 33 insertions, 169 deletions
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index fbabbc2f181..e5cce19a7d6 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -9,6 +9,11 @@
9#undef TRACE_EVENT 9#undef TRACE_EVENT
10#define TRACE_EVENT(name, proto, ...) \ 10#define TRACE_EVENT(name, proto, ...) \
11static inline void trace_ ## name(proto) {} 11static inline void trace_ ## name(proto) {}
12#undef DECLARE_EVENT_CLASS
13#define DECLARE_EVENT_CLASS(...)
14#undef DEFINE_EVENT
15#define DEFINE_EVENT(evt_class, name, proto, ...) \
16static inline void trace_ ## name(proto) {}
12#endif 17#endif
13 18
14#undef TRACE_SYSTEM 19#undef TRACE_SYSTEM
@@ -38,7 +43,7 @@ static inline void trace_ ## name(proto) {}
38 * Tracing for driver callbacks. 43 * Tracing for driver callbacks.
39 */ 44 */
40 45
41TRACE_EVENT(drv_return_void, 46DECLARE_EVENT_CLASS(local_only_evt,
42 TP_PROTO(struct ieee80211_local *local), 47 TP_PROTO(struct ieee80211_local *local),
43 TP_ARGS(local), 48 TP_ARGS(local),
44 TP_STRUCT__entry( 49 TP_STRUCT__entry(
@@ -50,6 +55,11 @@ TRACE_EVENT(drv_return_void,
50 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG) 55 TP_printk(LOCAL_PR_FMT, LOCAL_PR_ARG)
51); 56);
52 57
58DEFINE_EVENT(local_only_evt, drv_return_void,
59 TP_PROTO(struct ieee80211_local *local),
60 TP_ARGS(local)
61);
62
53TRACE_EVENT(drv_return_int, 63TRACE_EVENT(drv_return_int,
54 TP_PROTO(struct ieee80211_local *local, int ret), 64 TP_PROTO(struct ieee80211_local *local, int ret),
55 TP_ARGS(local, ret), 65 TP_ARGS(local, ret),
@@ -78,40 +88,14 @@ TRACE_EVENT(drv_return_u64,
78 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret) 88 TP_printk(LOCAL_PR_FMT " - %llu", LOCAL_PR_ARG, __entry->ret)
79); 89);
80 90
81TRACE_EVENT(drv_start, 91DEFINE_EVENT(local_only_evt, drv_start,
82 TP_PROTO(struct ieee80211_local *local), 92 TP_PROTO(struct ieee80211_local *local),
83 93 TP_ARGS(local)
84 TP_ARGS(local),
85
86 TP_STRUCT__entry(
87 LOCAL_ENTRY
88 ),
89
90 TP_fast_assign(
91 LOCAL_ASSIGN;
92 ),
93
94 TP_printk(
95 LOCAL_PR_FMT, LOCAL_PR_ARG
96 )
97); 94);
98 95
99TRACE_EVENT(drv_stop, 96DEFINE_EVENT(local_only_evt, drv_stop,
100 TP_PROTO(struct ieee80211_local *local), 97 TP_PROTO(struct ieee80211_local *local),
101 98 TP_ARGS(local)
102 TP_ARGS(local),
103
104 TP_STRUCT__entry(
105 LOCAL_ENTRY
106 ),
107
108 TP_fast_assign(
109 LOCAL_ASSIGN;
110 ),
111
112 TP_printk(
113 LOCAL_PR_FMT, LOCAL_PR_ARG
114 )
115); 99);
116 100
117TRACE_EVENT(drv_add_interface, 101TRACE_EVENT(drv_add_interface,
@@ -439,40 +423,14 @@ TRACE_EVENT(drv_hw_scan,
439 ) 423 )
440); 424);
441 425
442TRACE_EVENT(drv_sw_scan_start, 426DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
443 TP_PROTO(struct ieee80211_local *local), 427 TP_PROTO(struct ieee80211_local *local),
444 428 TP_ARGS(local)
445 TP_ARGS(local),
446
447 TP_STRUCT__entry(
448 LOCAL_ENTRY
449 ),
450
451 TP_fast_assign(
452 LOCAL_ASSIGN;
453 ),
454
455 TP_printk(
456 LOCAL_PR_FMT, LOCAL_PR_ARG
457 )
458); 429);
459 430
460TRACE_EVENT(drv_sw_scan_complete, 431DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
461 TP_PROTO(struct ieee80211_local *local), 432 TP_PROTO(struct ieee80211_local *local),
462 433 TP_ARGS(local)
463 TP_ARGS(local),
464
465 TP_STRUCT__entry(
466 LOCAL_ENTRY
467 ),
468
469 TP_fast_assign(
470 LOCAL_ASSIGN;
471 ),
472
473 TP_printk(
474 LOCAL_PR_FMT, LOCAL_PR_ARG
475 )
476); 434);
477 435
478TRACE_EVENT(drv_get_stats, 436TRACE_EVENT(drv_get_stats,
@@ -702,23 +660,9 @@ TRACE_EVENT(drv_conf_tx,
702 ) 660 )
703); 661);
704 662
705TRACE_EVENT(drv_get_tsf, 663DEFINE_EVENT(local_only_evt, drv_get_tsf,
706 TP_PROTO(struct ieee80211_local *local), 664 TP_PROTO(struct ieee80211_local *local),
707 665 TP_ARGS(local)
708 TP_ARGS(local),
709
710 TP_STRUCT__entry(
711 LOCAL_ENTRY
712 ),
713
714 TP_fast_assign(
715 LOCAL_ASSIGN;
716 ),
717
718 TP_printk(
719 LOCAL_PR_FMT,
720 LOCAL_PR_ARG
721 )
722); 666);
723 667
724TRACE_EVENT(drv_set_tsf, 668TRACE_EVENT(drv_set_tsf,
@@ -742,41 +686,14 @@ TRACE_EVENT(drv_set_tsf,
742 ) 686 )
743); 687);
744 688
745TRACE_EVENT(drv_reset_tsf, 689DEFINE_EVENT(local_only_evt, drv_reset_tsf,
746 TP_PROTO(struct ieee80211_local *local), 690 TP_PROTO(struct ieee80211_local *local),
747 691 TP_ARGS(local)
748 TP_ARGS(local),
749
750 TP_STRUCT__entry(
751 LOCAL_ENTRY
752 ),
753
754 TP_fast_assign(
755 LOCAL_ASSIGN;
756 ),
757
758 TP_printk(
759 LOCAL_PR_FMT, LOCAL_PR_ARG
760 )
761); 692);
762 693
763TRACE_EVENT(drv_tx_last_beacon, 694DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
764 TP_PROTO(struct ieee80211_local *local), 695 TP_PROTO(struct ieee80211_local *local),
765 696 TP_ARGS(local)
766 TP_ARGS(local),
767
768 TP_STRUCT__entry(
769 LOCAL_ENTRY
770 ),
771
772 TP_fast_assign(
773 LOCAL_ASSIGN;
774 ),
775
776 TP_printk(
777 LOCAL_PR_FMT,
778 LOCAL_PR_ARG
779 )
780); 697);
781 698
782TRACE_EVENT(drv_ampdu_action, 699TRACE_EVENT(drv_ampdu_action,
@@ -962,22 +879,9 @@ TRACE_EVENT(drv_remain_on_channel,
962 ) 879 )
963); 880);
964 881
965TRACE_EVENT(drv_cancel_remain_on_channel, 882DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
966 TP_PROTO(struct ieee80211_local *local), 883 TP_PROTO(struct ieee80211_local *local),
967 884 TP_ARGS(local)
968 TP_ARGS(local),
969
970 TP_STRUCT__entry(
971 LOCAL_ENTRY
972 ),
973
974 TP_fast_assign(
975 LOCAL_ASSIGN;
976 ),
977
978 TP_printk(
979 LOCAL_PR_FMT, LOCAL_PR_ARG
980 )
981); 885);
982 886
983/* 887/*
@@ -1072,23 +976,9 @@ TRACE_EVENT(api_stop_tx_ba_cb,
1072 ) 976 )
1073); 977);
1074 978
1075TRACE_EVENT(api_restart_hw, 979DEFINE_EVENT(local_only_evt, api_restart_hw,
1076 TP_PROTO(struct ieee80211_local *local), 980 TP_PROTO(struct ieee80211_local *local),
1077 981 TP_ARGS(local)
1078 TP_ARGS(local),
1079
1080 TP_STRUCT__entry(
1081 LOCAL_ENTRY
1082 ),
1083
1084 TP_fast_assign(
1085 LOCAL_ASSIGN;
1086 ),
1087
1088 TP_printk(
1089 LOCAL_PR_FMT,
1090 LOCAL_PR_ARG
1091 )
1092); 982);
1093 983
1094TRACE_EVENT(api_beacon_loss, 984TRACE_EVENT(api_beacon_loss,
@@ -1217,40 +1107,14 @@ TRACE_EVENT(api_chswitch_done,
1217 ) 1107 )
1218); 1108);
1219 1109
1220TRACE_EVENT(api_ready_on_channel, 1110DEFINE_EVENT(local_only_evt, api_ready_on_channel,
1221 TP_PROTO(struct ieee80211_local *local), 1111 TP_PROTO(struct ieee80211_local *local),
1222 1112 TP_ARGS(local)
1223 TP_ARGS(local),
1224
1225 TP_STRUCT__entry(
1226 LOCAL_ENTRY
1227 ),
1228
1229 TP_fast_assign(
1230 LOCAL_ASSIGN;
1231 ),
1232
1233 TP_printk(
1234 LOCAL_PR_FMT, LOCAL_PR_ARG
1235 )
1236); 1113);
1237 1114
1238TRACE_EVENT(api_remain_on_channel_expired, 1115DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
1239 TP_PROTO(struct ieee80211_local *local), 1116 TP_PROTO(struct ieee80211_local *local),
1240 1117 TP_ARGS(local)
1241 TP_ARGS(local),
1242
1243 TP_STRUCT__entry(
1244 LOCAL_ENTRY
1245 ),
1246
1247 TP_fast_assign(
1248 LOCAL_ASSIGN;
1249 ),
1250
1251 TP_printk(
1252 LOCAL_PR_FMT, LOCAL_PR_ARG
1253 )
1254); 1118);
1255 1119
1256/* 1120/*