oprofile: add traceme to clock interrupt, fix bug.
authorRonald G. Minnich <rminnich@google.com>
Fri, 23 May 2014 00:47:59 +0000 (17:47 -0700)
committerRonald G. Minnich <rminnich@google.com>
Fri, 23 May 2014 00:47:59 +0000 (17:47 -0700)
but nothing is traced yet.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
kern/src/oprofile/cpu_buffer.c
kern/src/time.c

index 1b69480..a94483d 100644 (file)
@@ -621,11 +621,12 @@ void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
 
 void oprofile_add_trace(unsigned long pc)
 {
+       if (! op_cpu_buffer)
+               return;
        //print_func_entry();
        struct oprofile_cpu_buffer *cpu_buf = &op_cpu_buffer[core_id()];
 
        if (!cpu_buf->tracing) {
-               printk("%s: not tracing\n", __func__);
                //print_func_exit();
                return;
        }
index cd886ef..d69b56b 100644 (file)
@@ -56,6 +56,7 @@ void udelay_sched(uint64_t usec)
  * you want something to happen in the future, set an alarm. */
 void timer_interrupt(struct hw_trapframe *hw_tf, void *data)
 {
+       TRACEME();
        int coreid = core_id();
        /* run the alarms out of RKM context, so that event delivery works nicely
         * (keeps the proc lock and ksched lock non-irqsave) */