@@ -186,11 +186,11 @@ print_syscall_exit(struct trace_iterator *iter, int flags,
186
186
187
187
extern char * __bad_type_size (void );
188
188
189
- #define SYSCALL_FIELD (type , name ) \
190
- sizeof(type) != sizeof(trace.name ) ? \
189
+ #define SYSCALL_FIELD (type , field , name ) \
190
+ sizeof(type) != sizeof(trace.field ) ? \
191
191
__bad_type_size() : \
192
- #type, #name, offsetof(typeof(trace), name ), \
193
- sizeof(trace.name ), is_signed_type(type)
192
+ #type, #name, offsetof(typeof(trace), field ), \
193
+ sizeof(trace.field ), is_signed_type(type)
194
194
195
195
static int __init
196
196
__set_enter_print_fmt (struct syscall_metadata * entry , char * buf , int len )
@@ -261,7 +261,8 @@ static int __init syscall_enter_define_fields(struct trace_event_call *call)
261
261
int i ;
262
262
int offset = offsetof(typeof (trace ), args );
263
263
264
- ret = trace_define_field (call , SYSCALL_FIELD (int , nr ), FILTER_OTHER );
264
+ ret = trace_define_field (call , SYSCALL_FIELD (int , nr , __syscall_nr ),
265
+ FILTER_OTHER );
265
266
if (ret )
266
267
return ret ;
267
268
@@ -281,11 +282,12 @@ static int __init syscall_exit_define_fields(struct trace_event_call *call)
281
282
struct syscall_trace_exit trace ;
282
283
int ret ;
283
284
284
- ret = trace_define_field (call , SYSCALL_FIELD (int , nr ), FILTER_OTHER );
285
+ ret = trace_define_field (call , SYSCALL_FIELD (int , nr , __syscall_nr ),
286
+ FILTER_OTHER );
285
287
if (ret )
286
288
return ret ;
287
289
288
- ret = trace_define_field (call , SYSCALL_FIELD (long , ret ),
290
+ ret = trace_define_field (call , SYSCALL_FIELD (long , ret , ret ),
289
291
FILTER_OTHER );
290
292
291
293
return ret ;
0 commit comments