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 ("$FreeBSD$")
 
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

◆ PC_TO_INDEX

#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 99 of file subr_prof.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ addupc_intr()

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

Definition at line 116 of file subr_prof.c.

References PC_TO_INDEX, and ticks.

Referenced by profclock().

Here is the caller graph for this function:

◆ addupc_task()

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

Definition at line 143 of file subr_prof.c.

References addr, 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:

◆ sys_profil()

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

Definition at line 65 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: