| .. | .. |
|---|
| 298 | 298 | struct syscall_metadata *sys_data; |
|---|
| 299 | 299 | struct ring_buffer_event *event; |
|---|
| 300 | 300 | struct trace_buffer *buffer; |
|---|
| 301 | | - unsigned int trace_ctx; |
|---|
| 301 | + unsigned long irq_flags; |
|---|
| 302 | 302 | unsigned long args[6]; |
|---|
| 303 | + int pc; |
|---|
| 303 | 304 | int syscall_nr; |
|---|
| 304 | 305 | int size; |
|---|
| 305 | 306 | |
|---|
| .. | .. |
|---|
| 321 | 322 | |
|---|
| 322 | 323 | size = sizeof(*entry) + sizeof(unsigned long) * sys_data->nb_args; |
|---|
| 323 | 324 | |
|---|
| 324 | | - trace_ctx = tracing_gen_ctx(); |
|---|
| 325 | + local_save_flags(irq_flags); |
|---|
| 326 | + pc = preempt_count(); |
|---|
| 325 | 327 | |
|---|
| 326 | 328 | buffer = tr->array_buffer.buffer; |
|---|
| 327 | 329 | event = trace_buffer_lock_reserve(buffer, |
|---|
| 328 | | - sys_data->enter_event->event.type, size, trace_ctx); |
|---|
| 330 | + sys_data->enter_event->event.type, size, irq_flags, pc); |
|---|
| 329 | 331 | if (!event) |
|---|
| 330 | 332 | return; |
|---|
| 331 | 333 | |
|---|
| .. | .. |
|---|
| 335 | 337 | memcpy(entry->args, args, sizeof(unsigned long) * sys_data->nb_args); |
|---|
| 336 | 338 | |
|---|
| 337 | 339 | event_trigger_unlock_commit(trace_file, buffer, event, entry, |
|---|
| 338 | | - trace_ctx); |
|---|
| 340 | + irq_flags, pc); |
|---|
| 339 | 341 | } |
|---|
| 340 | 342 | |
|---|
| 341 | 343 | static void ftrace_syscall_exit(void *data, struct pt_regs *regs, long ret) |
|---|
| .. | .. |
|---|
| 346 | 348 | struct syscall_metadata *sys_data; |
|---|
| 347 | 349 | struct ring_buffer_event *event; |
|---|
| 348 | 350 | struct trace_buffer *buffer; |
|---|
| 349 | | - unsigned int trace_ctx; |
|---|
| 351 | + unsigned long irq_flags; |
|---|
| 352 | + int pc; |
|---|
| 350 | 353 | int syscall_nr; |
|---|
| 351 | 354 | |
|---|
| 352 | 355 | syscall_nr = trace_get_syscall_nr(current, regs); |
|---|
| .. | .. |
|---|
| 365 | 368 | if (!sys_data) |
|---|
| 366 | 369 | return; |
|---|
| 367 | 370 | |
|---|
| 368 | | - trace_ctx = tracing_gen_ctx(); |
|---|
| 371 | + local_save_flags(irq_flags); |
|---|
| 372 | + pc = preempt_count(); |
|---|
| 369 | 373 | |
|---|
| 370 | 374 | buffer = tr->array_buffer.buffer; |
|---|
| 371 | 375 | event = trace_buffer_lock_reserve(buffer, |
|---|
| 372 | 376 | sys_data->exit_event->event.type, sizeof(*entry), |
|---|
| 373 | | - trace_ctx); |
|---|
| 377 | + irq_flags, pc); |
|---|
| 374 | 378 | if (!event) |
|---|
| 375 | 379 | return; |
|---|
| 376 | 380 | |
|---|
| .. | .. |
|---|
| 379 | 383 | entry->ret = syscall_get_return_value(current, regs); |
|---|
| 380 | 384 | |
|---|
| 381 | 385 | event_trigger_unlock_commit(trace_file, buffer, event, entry, |
|---|
| 382 | | - trace_ctx); |
|---|
| 386 | + irq_flags, pc); |
|---|
| 383 | 387 | } |
|---|
| 384 | 388 | |
|---|
| 385 | 389 | static int reg_event_syscall_enter(struct trace_event_file *file, |
|---|