mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 11:16:11 +00:00
tracing: fix warning on kernel/trace/trace_branch.c andtrace_hw_branches.c
fix warnings that caused the API change of trace_buffer_lock_reserve() change files: kernel/trace/trace_hw_branch.c kernel/trace/trace_branch.c Signed-off-by: Zhenwen Xu <helight.xu@gmail.com> LKML-Reference: <20091008012146.GA4170@helight> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
3279ba37db
commit
c8647b2872
2 changed files with 6 additions and 4 deletions
|
@ -54,7 +54,7 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
|
|||
goto out;
|
||||
|
||||
pc = preempt_count();
|
||||
event = trace_buffer_lock_reserve(tr, TRACE_BRANCH,
|
||||
event = trace_buffer_lock_reserve(tr->buffer, TRACE_BRANCH,
|
||||
sizeof(*entry), flags, pc);
|
||||
if (!event)
|
||||
goto out;
|
||||
|
|
|
@ -165,6 +165,7 @@ void trace_hw_branch(u64 from, u64 to)
|
|||
struct ftrace_event_call *call = &event_hw_branch;
|
||||
struct trace_array *tr = hw_branch_trace;
|
||||
struct ring_buffer_event *event;
|
||||
struct ring_buffer *buf;
|
||||
struct hw_branch_entry *entry;
|
||||
unsigned long irq1;
|
||||
int cpu;
|
||||
|
@ -180,7 +181,8 @@ void trace_hw_branch(u64 from, u64 to)
|
|||
if (atomic_inc_return(&tr->data[cpu]->disabled) != 1)
|
||||
goto out;
|
||||
|
||||
event = trace_buffer_lock_reserve(tr, TRACE_HW_BRANCHES,
|
||||
buf = tr->buffer;
|
||||
event = trace_buffer_lock_reserve(buf, TRACE_HW_BRANCHES,
|
||||
sizeof(*entry), 0, 0);
|
||||
if (!event)
|
||||
goto out;
|
||||
|
@ -189,8 +191,8 @@ void trace_hw_branch(u64 from, u64 to)
|
|||
entry->ent.type = TRACE_HW_BRANCHES;
|
||||
entry->from = from;
|
||||
entry->to = to;
|
||||
if (!filter_check_discard(call, entry, tr->buffer, event))
|
||||
trace_buffer_unlock_commit(tr, event, 0, 0);
|
||||
if (!filter_check_discard(call, entry, buf, event))
|
||||
trace_buffer_unlock_commit(buf, event, 0, 0);
|
||||
|
||||
out:
|
||||
atomic_dec(&tr->data[cpu]->disabled);
|
||||
|
|
Loading…
Reference in a new issue