Logo Search packages:      
Sourcecode: linux version File versions

void oprofile_add_ext_sample ( unsigned long  pc,
struct pt_regs *const   regs,
unsigned long  event,
int  is_kernel 

Add an extended sample. Use this when the PC is not from the regs, and we cannot determine if we're in kernel mode from the regs.

This function does perform a backtrace.

Definition at line 243 of file cpu_buffer.c.

Referenced by oprofile_add_sample().

      struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer);

      if (!backtrace_depth) {
            log_sample(cpu_buf, pc, is_kernel, event);

      if (!oprofile_begin_trace(cpu_buf))

      /* if log_sample() fail we can't backtrace since we lost the source
       * of this event */
      if (log_sample(cpu_buf, pc, is_kernel, event))
            oprofile_ops.backtrace(regs, backtrace_depth);

Generated by  Doxygen 1.6.0   Back to index