diff options
| author | Li Zefan <lizf@cn.fujitsu.com> | 2010-03-23 22:58:05 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-31 22:56:54 -0400 |
| commit | 4bdde044dc36ac7b01f7502394d52619af9d1927 (patch) | |
| tree | 08e00ab8c3970c986e8bc0b3c039b6bf13b62cba | |
| parent | 2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6 (diff) | |
tracing: Convert some signal events to DEFINE_TRACE
Use DECLARE_EVENT_CLASS to remove duplicate code:
text data bss dec hex filename
23639 6084 8 29731 7423 kernel/signal.o.orig
22727 6084 8 28819 7093 kernel/signal.o
2 events are converted:
signal_queue_overflow: signal_overflow_fail, signal_lose_info
No functional change.
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4BA97FBD.8070703@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | include/trace/events/signal.h | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/include/trace/events/signal.h b/include/trace/events/signal.h index a510b75ac304..814566c99d29 100644 --- a/include/trace/events/signal.h +++ b/include/trace/events/signal.h | |||
| @@ -100,18 +100,7 @@ TRACE_EVENT(signal_deliver, | |||
| 100 | __entry->sa_handler, __entry->sa_flags) | 100 | __entry->sa_handler, __entry->sa_flags) |
| 101 | ); | 101 | ); |
| 102 | 102 | ||
| 103 | /** | 103 | DECLARE_EVENT_CLASS(signal_queue_overflow, |
| 104 | * signal_overflow_fail - called when signal queue is overflow | ||
| 105 | * @sig: signal number | ||
| 106 | * @group: signal to process group or not (bool) | ||
| 107 | * @info: pointer to struct siginfo | ||
| 108 | * | ||
| 109 | * Kernel fails to generate 'sig' signal with 'info' siginfo, because | ||
| 110 | * siginfo queue is overflow, and the signal is dropped. | ||
| 111 | * 'group' is not 0 if the signal will be sent to a process group. | ||
| 112 | * 'sig' is always one of RT signals. | ||
| 113 | */ | ||
| 114 | TRACE_EVENT(signal_overflow_fail, | ||
| 115 | 104 | ||
| 116 | TP_PROTO(int sig, int group, struct siginfo *info), | 105 | TP_PROTO(int sig, int group, struct siginfo *info), |
| 117 | 106 | ||
| @@ -135,6 +124,24 @@ TRACE_EVENT(signal_overflow_fail, | |||
| 135 | ); | 124 | ); |
| 136 | 125 | ||
| 137 | /** | 126 | /** |
| 127 | * signal_overflow_fail - called when signal queue is overflow | ||
| 128 | * @sig: signal number | ||
| 129 | * @group: signal to process group or not (bool) | ||
| 130 | * @info: pointer to struct siginfo | ||
| 131 | * | ||
| 132 | * Kernel fails to generate 'sig' signal with 'info' siginfo, because | ||
| 133 | * siginfo queue is overflow, and the signal is dropped. | ||
| 134 | * 'group' is not 0 if the signal will be sent to a process group. | ||
| 135 | * 'sig' is always one of RT signals. | ||
| 136 | */ | ||
| 137 | DEFINE_EVENT(signal_queue_overflow, signal_overflow_fail, | ||
| 138 | |||
| 139 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
| 140 | |||
| 141 | TP_ARGS(sig, group, info) | ||
| 142 | ); | ||
| 143 | |||
| 144 | /** | ||
| 138 | * signal_lose_info - called when siginfo is lost | 145 | * signal_lose_info - called when siginfo is lost |
| 139 | * @sig: signal number | 146 | * @sig: signal number |
| 140 | * @group: signal to process group or not (bool) | 147 | * @group: signal to process group or not (bool) |
| @@ -145,28 +152,13 @@ TRACE_EVENT(signal_overflow_fail, | |||
| 145 | * 'group' is not 0 if the signal will be sent to a process group. | 152 | * 'group' is not 0 if the signal will be sent to a process group. |
| 146 | * 'sig' is always one of non-RT signals. | 153 | * 'sig' is always one of non-RT signals. |
| 147 | */ | 154 | */ |
| 148 | TRACE_EVENT(signal_lose_info, | 155 | DEFINE_EVENT(signal_queue_overflow, signal_lose_info, |
| 149 | 156 | ||
| 150 | TP_PROTO(int sig, int group, struct siginfo *info), | 157 | TP_PROTO(int sig, int group, struct siginfo *info), |
| 151 | 158 | ||
| 152 | TP_ARGS(sig, group, info), | 159 | TP_ARGS(sig, group, info) |
| 153 | |||
| 154 | TP_STRUCT__entry( | ||
| 155 | __field( int, sig ) | ||
| 156 | __field( int, group ) | ||
| 157 | __field( int, errno ) | ||
| 158 | __field( int, code ) | ||
| 159 | ), | ||
| 160 | |||
| 161 | TP_fast_assign( | ||
| 162 | __entry->sig = sig; | ||
| 163 | __entry->group = group; | ||
| 164 | TP_STORE_SIGINFO(__entry, info); | ||
| 165 | ), | ||
| 166 | |||
| 167 | TP_printk("sig=%d group=%d errno=%d code=%d", | ||
| 168 | __entry->sig, __entry->group, __entry->errno, __entry->code) | ||
| 169 | ); | 160 | ); |
| 161 | |||
| 170 | #endif /* _TRACE_SIGNAL_H */ | 162 | #endif /* _TRACE_SIGNAL_H */ |
| 171 | 163 | ||
| 172 | /* This part must be outside protection */ | 164 | /* This part must be outside protection */ |
