Logo Search packages:      
Sourcecode: linux version File versions  Download package

void oprofile_add_sample ( struct pt_regs *const   regs,
unsigned long  event 
)

Add a sample. This may be called from any context.

Definition at line 322 of file cpu_buffer.c.

{
      int is_kernel;
      unsigned long pc;

      if (likely(regs)) {
            is_kernel = !user_mode(regs);
            pc = profile_pc(regs);
      } else {
            is_kernel = 0;    /* This value will not be used */
            pc = ESCAPE_CODE; /* as this causes an early return. */
      }

      __oprofile_add_ext_sample(pc, regs, event, is_kernel);
}

Generated by  Doxygen 1.6.0   Back to index