diff options
Diffstat (limited to 'include/trace/events/signal.h')
-rw-r--r-- | include/trace/events/signal.h | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/include/trace/events/signal.h b/include/trace/events/signal.h index a510b75ac304..17df43464df0 100644 --- a/include/trace/events/signal.h +++ b/include/trace/events/signal.h | |||
@@ -10,7 +10,8 @@ | |||
10 | 10 | ||
11 | #define TP_STORE_SIGINFO(__entry, info) \ | 11 | #define TP_STORE_SIGINFO(__entry, info) \ |
12 | do { \ | 12 | do { \ |
13 | if (info == SEND_SIG_NOINFO) { \ | 13 | if (info == SEND_SIG_NOINFO || \ |
14 | info == SEND_SIG_FORCED) { \ | ||
14 | __entry->errno = 0; \ | 15 | __entry->errno = 0; \ |
15 | __entry->code = SI_USER; \ | 16 | __entry->code = SI_USER; \ |
16 | } else if (info == SEND_SIG_PRIV) { \ | 17 | } else if (info == SEND_SIG_PRIV) { \ |
@@ -100,18 +101,7 @@ TRACE_EVENT(signal_deliver, | |||
100 | __entry->sa_handler, __entry->sa_flags) | 101 | __entry->sa_handler, __entry->sa_flags) |
101 | ); | 102 | ); |
102 | 103 | ||
103 | /** | 104 | 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 | 105 | ||
116 | TP_PROTO(int sig, int group, struct siginfo *info), | 106 | TP_PROTO(int sig, int group, struct siginfo *info), |
117 | 107 | ||
@@ -135,6 +125,24 @@ TRACE_EVENT(signal_overflow_fail, | |||
135 | ); | 125 | ); |
136 | 126 | ||
137 | /** | 127 | /** |
128 | * signal_overflow_fail - called when signal queue is overflow | ||
129 | * @sig: signal number | ||
130 | * @group: signal to process group or not (bool) | ||
131 | * @info: pointer to struct siginfo | ||
132 | * | ||
133 | * Kernel fails to generate 'sig' signal with 'info' siginfo, because | ||
134 | * siginfo queue is overflow, and the signal is dropped. | ||
135 | * 'group' is not 0 if the signal will be sent to a process group. | ||
136 | * 'sig' is always one of RT signals. | ||
137 | */ | ||
138 | DEFINE_EVENT(signal_queue_overflow, signal_overflow_fail, | ||
139 | |||
140 | TP_PROTO(int sig, int group, struct siginfo *info), | ||
141 | |||
142 | TP_ARGS(sig, group, info) | ||
143 | ); | ||
144 | |||
145 | /** | ||
138 | * signal_lose_info - called when siginfo is lost | 146 | * signal_lose_info - called when siginfo is lost |
139 | * @sig: signal number | 147 | * @sig: signal number |
140 | * @group: signal to process group or not (bool) | 148 | * @group: signal to process group or not (bool) |
@@ -145,28 +153,13 @@ TRACE_EVENT(signal_overflow_fail, | |||
145 | * 'group' is not 0 if the signal will be sent to a process group. | 153 | * 'group' is not 0 if the signal will be sent to a process group. |
146 | * 'sig' is always one of non-RT signals. | 154 | * 'sig' is always one of non-RT signals. |
147 | */ | 155 | */ |
148 | TRACE_EVENT(signal_lose_info, | 156 | DEFINE_EVENT(signal_queue_overflow, signal_lose_info, |
149 | 157 | ||
150 | TP_PROTO(int sig, int group, struct siginfo *info), | 158 | TP_PROTO(int sig, int group, struct siginfo *info), |
151 | 159 | ||
152 | TP_ARGS(sig, group, info), | 160 | 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 | ); | 161 | ); |
162 | |||
170 | #endif /* _TRACE_SIGNAL_H */ | 163 | #endif /* _TRACE_SIGNAL_H */ |
171 | 164 | ||
172 | /* This part must be outside protection */ | 165 | /* This part must be outside protection */ |