|
@@ -34,6 +34,7 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
|
|
struct trace_array *tr = branch_tracer;
|
|
struct trace_array *tr = branch_tracer;
|
|
struct ring_buffer_event *event;
|
|
struct ring_buffer_event *event;
|
|
struct trace_branch *entry;
|
|
struct trace_branch *entry;
|
|
|
|
+ struct ring_buffer *buffer;
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
int cpu, pc;
|
|
int cpu, pc;
|
|
const char *p;
|
|
const char *p;
|
|
@@ -54,7 +55,8 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
|
|
goto out;
|
|
goto out;
|
|
|
|
|
|
pc = preempt_count();
|
|
pc = preempt_count();
|
|
- event = trace_buffer_lock_reserve(tr->buffer, TRACE_BRANCH,
|
|
|
|
|
|
+ buffer = tr->buffer;
|
|
|
|
+ event = trace_buffer_lock_reserve(buffer, TRACE_BRANCH,
|
|
sizeof(*entry), flags, pc);
|
|
sizeof(*entry), flags, pc);
|
|
if (!event)
|
|
if (!event)
|
|
goto out;
|
|
goto out;
|
|
@@ -74,8 +76,8 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
|
|
entry->line = f->line;
|
|
entry->line = f->line;
|
|
entry->correct = val == expect;
|
|
entry->correct = val == expect;
|
|
|
|
|
|
- if (!filter_check_discard(call, entry, tr->buffer, event))
|
|
|
|
- ring_buffer_unlock_commit(tr->buffer, event);
|
|
|
|
|
|
+ if (!filter_check_discard(call, entry, buffer, event))
|
|
|
|
+ ring_buffer_unlock_commit(buffer, event);
|
|
|
|
|
|
out:
|
|
out:
|
|
atomic_dec(&tr->data[cpu]->disabled);
|
|
atomic_dec(&tr->data[cpu]->disabled);
|