tracing: Fix ring-buffer and ksym tracer merge interaction
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 7 Sep 2009 01:23:20 +0000 (03:23 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 7 Sep 2009 06:22:10 +0000 (08:22 +0200)
The compiler warns us about:

  kernel/trace/trace_ksym.c: In function ksym_hbp_handler:
  kernel/trace/trace_ksym.c:92: attention : passing argument 1 of trace_buffer_lock_reserve from incompatible pointer type
  kernel/trace/trace_ksym.c:106: attention : passing argument 1 of trace_buffer_unlock_commit from incompatible pointer type

Commit "e77405ad" (tracing: pass around ring buffer
instead of tracer) has changed the central tracing
APIs. And this change has updated every callsites of
these APIs except those that aren't in tracing/core,
such as the ksym tracer.

Cc: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_ksym.c

index 2fde875ead4cff51ad09fec0d18fc53d0554bcdf..6d5609c67378f846345d60cd6f512ac56624df78 100644 (file)
@@ -78,17 +78,18 @@ void ksym_collect_stats(unsigned long hbp_hit_addr)
 void ksym_hbp_handler(struct hw_breakpoint *hbp, struct pt_regs *regs)
 {
        struct ring_buffer_event *event;
-       struct trace_array *tr;
        struct ksym_trace_entry *entry;
+       struct ring_buffer *buffer;
        int pc;
 
        if (!ksym_tracing_enabled)
                return;
 
-       tr = ksym_trace_array;
+       buffer = ksym_trace_array->buffer;
+
        pc = preempt_count();
 
-       event = trace_buffer_lock_reserve(tr, TRACE_KSYM,
+       event = trace_buffer_lock_reserve(buffer, TRACE_KSYM,
                                                        sizeof(*entry), 0, pc);
        if (!event)
                return;
@@ -103,7 +104,7 @@ void ksym_hbp_handler(struct hw_breakpoint *hbp, struct pt_regs *regs)
        ksym_collect_stats(hbp->info.address);
 #endif /* CONFIG_PROFILE_KSYM_TRACER */
 
-       trace_buffer_unlock_commit(tr, event, 0, pc);
+       trace_buffer_unlock_commit(buffer, event, 0, pc);
 }
 
 /* Valid access types are represented as
This page took 0.026225 seconds and 5 git commands to generate.