FreeBSD kernel kern code
subr_prof.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/sysproto.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/resourcevar.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
Include dependency graph for subr_prof.c:

Go to the source code of this file.

Data Structures

struct  profil_args
 

Macros

#define PC_TO_INDEX(pc, prof)
 

Functions

 __FBSDID ("$BSDSUniX$")
 
int sys_profil (struct thread *td, struct profil_args *uap)
 
void addupc_intr (struct thread *td, uintfptr_t pc, u_int ticks)
 
void addupc_task (struct thread *td, uintfptr_t pc, u_int ticks)
 

Macro Definition Documentation

#define PC_TO_INDEX (   pc,
  prof 
)
Value:
((int)(((u_quad_t)((pc) - (prof)->pr_off) * \
(u_quad_t)((prof)->pr_scale)) >> 16) & ~1)

Definition at line 441 of file subr_prof.c.

Referenced by addupc_intr(), and addupc_task().

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
void addupc_intr ( struct thread *  td,
uintfptr_t  pc,
u_int  ticks 
)

Definition at line 459 of file subr_prof.c.

References PC_TO_INDEX, and ticks.

Referenced by profclock_cnt().

Here is the caller graph for this function:

void addupc_task ( struct thread *  td,
uintfptr_t  pc,
u_int  ticks 
)

Definition at line 493 of file subr_prof.c.

References PC_TO_INDEX, stop, stopprofclock(), ticks, and wakeup().

Referenced by ast(), and userret().

Here is the call graph for this function:

Here is the caller graph for this function:

int sys_profil ( struct thread *  td,
struct profil_args uap 
)

Definition at line 407 of file subr_prof.c.

References profil_args::offset, profil_args::samples, profil_args::scale, profil_args::size, startprofclock(), and stopprofclock().

Here is the call graph for this function: