aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_hw_branches.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/trace_hw_branches.c')
-rw-r--r--kernel/trace/trace_hw_branches.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/trace/trace_hw_branches.c b/kernel/trace/trace_hw_branches.c
index e720c001db2b..2aa1c9f4c7d8 100644
--- a/kernel/trace/trace_hw_branches.c
+++ b/kernel/trace/trace_hw_branches.c
@@ -189,16 +189,15 @@ void trace_hw_branch(u64 from, u64 to)
189 if (atomic_inc_return(&tr->data[cpu]->disabled) != 1) 189 if (atomic_inc_return(&tr->data[cpu]->disabled) != 1)
190 goto out; 190 goto out;
191 191
192 event = ring_buffer_lock_reserve(tr->buffer, sizeof(*entry)); 192 event = trace_buffer_lock_reserve(tr, TRACE_HW_BRANCHES,
193 sizeof(*entry), 0, 0);
193 if (!event) 194 if (!event)
194 goto out; 195 goto out;
195 entry = ring_buffer_event_data(event); 196 entry = ring_buffer_event_data(event);
196 tracing_generic_entry_update(&entry->ent, 0, from);
197 entry->ent.type = TRACE_HW_BRANCHES;
198 entry->ent.cpu = cpu; 197 entry->ent.cpu = cpu;
199 entry->from = from; 198 entry->from = from;
200 entry->to = to; 199 entry->to = to;
201 ring_buffer_unlock_commit(tr->buffer, event); 200 trace_buffer_unlock_commit(tr, event, 0, 0);
202 201
203 out: 202 out:
204 atomic_dec(&tr->data[cpu]->disabled); 203 atomic_dec(&tr->data[cpu]->disabled);