diff options
Diffstat (limited to 'include/trace/ftrace.h')
| -rw-r--r-- | include/trace/ftrace.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index bfbc842600a1..308bafd93325 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h | |||
| @@ -460,13 +460,15 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | |||
| 460 | * { | 460 | * { |
| 461 | * struct ring_buffer_event *event; | 461 | * struct ring_buffer_event *event; |
| 462 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 | 462 | * struct ftrace_raw_<call> *entry; <-- defined in stage 1 |
| 463 | * struct ring_buffer *buffer; | ||
| 463 | * unsigned long irq_flags; | 464 | * unsigned long irq_flags; |
| 464 | * int pc; | 465 | * int pc; |
| 465 | * | 466 | * |
| 466 | * local_save_flags(irq_flags); | 467 | * local_save_flags(irq_flags); |
| 467 | * pc = preempt_count(); | 468 | * pc = preempt_count(); |
| 468 | * | 469 | * |
| 469 | * event = trace_current_buffer_lock_reserve(event_<call>.id, | 470 | * event = trace_current_buffer_lock_reserve(&buffer, |
| 471 | * event_<call>.id, | ||
| 470 | * sizeof(struct ftrace_raw_<call>), | 472 | * sizeof(struct ftrace_raw_<call>), |
| 471 | * irq_flags, pc); | 473 | * irq_flags, pc); |
| 472 | * if (!event) | 474 | * if (!event) |
| @@ -476,7 +478,7 @@ static void ftrace_profile_disable_##call(struct ftrace_event_call *event_call)\ | |||
| 476 | * <assign>; <-- Here we assign the entries by the __field and | 478 | * <assign>; <-- Here we assign the entries by the __field and |
| 477 | * __array macros. | 479 | * __array macros. |
| 478 | * | 480 | * |
| 479 | * trace_current_buffer_unlock_commit(event, irq_flags, pc); | 481 | * trace_current_buffer_unlock_commit(buffer, event, irq_flags, pc); |
| 480 | * } | 482 | * } |
| 481 | * | 483 | * |
| 482 | * static int ftrace_raw_reg_event_<call>(void) | 484 | * static int ftrace_raw_reg_event_<call>(void) |
| @@ -568,6 +570,7 @@ static void ftrace_raw_event_##call(proto) \ | |||
| 568 | struct ftrace_event_call *event_call = &event_##call; \ | 570 | struct ftrace_event_call *event_call = &event_##call; \ |
| 569 | struct ring_buffer_event *event; \ | 571 | struct ring_buffer_event *event; \ |
| 570 | struct ftrace_raw_##call *entry; \ | 572 | struct ftrace_raw_##call *entry; \ |
| 573 | struct ring_buffer *buffer; \ | ||
| 571 | unsigned long irq_flags; \ | 574 | unsigned long irq_flags; \ |
| 572 | int __data_size; \ | 575 | int __data_size; \ |
| 573 | int pc; \ | 576 | int pc; \ |
| @@ -577,7 +580,8 @@ static void ftrace_raw_event_##call(proto) \ | |||
| 577 | \ | 580 | \ |
| 578 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ | 581 | __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ |
| 579 | \ | 582 | \ |
| 580 | event = trace_current_buffer_lock_reserve(event_##call.id, \ | 583 | event = trace_current_buffer_lock_reserve(&buffer, \ |
| 584 | event_##call.id, \ | ||
| 581 | sizeof(*entry) + __data_size, \ | 585 | sizeof(*entry) + __data_size, \ |
| 582 | irq_flags, pc); \ | 586 | irq_flags, pc); \ |
| 583 | if (!event) \ | 587 | if (!event) \ |
| @@ -589,8 +593,9 @@ static void ftrace_raw_event_##call(proto) \ | |||
| 589 | \ | 593 | \ |
| 590 | { assign; } \ | 594 | { assign; } \ |
| 591 | \ | 595 | \ |
| 592 | if (!filter_current_check_discard(event_call, entry, event)) \ | 596 | if (!filter_current_check_discard(buffer, event_call, entry, event)) \ |
| 593 | trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \ | 597 | trace_nowake_buffer_unlock_commit(buffer, \ |
| 598 | event, irq_flags, pc); \ | ||
| 594 | } \ | 599 | } \ |
| 595 | \ | 600 | \ |
| 596 | static int ftrace_raw_reg_event_##call(void *ptr) \ | 601 | static int ftrace_raw_reg_event_##call(void *ptr) \ |
