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); return; } if (!oprofile_begin_trace(cpu_buf)) return; /* 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); oprofile_end_trace(cpu_buf); }
|