FreeBSD kernel kern code
subr_counter.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/sched.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
#include <vm/uma.h>
#include <sys/counter.h>
Include dependency graph for subr_counter.c:

Go to the source code of this file.

Macros

#define IN_SUBR_COUNTER_C
 

Functions

 __FBSDID ("$FreeBSD$")
 
void counter_u64_zero (counter_u64_t c)
 
uint64_t counter_u64_fetch (counter_u64_t c)
 
counter_u64_t counter_u64_alloc (int flags)
 
void counter_u64_free (counter_u64_t c)
 
int sysctl_handle_counter_u64 (SYSCTL_HANDLER_ARGS)
 
int sysctl_handle_counter_u64_array (SYSCTL_HANDLER_ARGS)
 
int64_t counter_ratecheck (struct counter_rate *cr, int64_t limit)
 
void counter_u64_sysinit (void *arg)
 
void counter_u64_sysuninit (void *arg)
 

Macro Definition Documentation

◆ IN_SUBR_COUNTER_C

#define IN_SUBR_COUNTER_C

Definition at line 43 of file subr_counter.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ counter_ratecheck()

int64_t counter_ratecheck ( struct counter_rate *  cr,
int64_t  limit 
)

Definition at line 130 of file subr_counter.c.

References counter_u64_fetch(), counter_u64_zero(), hz, and ticks.

Here is the call graph for this function:

◆ counter_u64_alloc()

counter_u64_t counter_u64_alloc ( int  flags)

Definition at line 61 of file subr_counter.c.

References flags, and pcpu_zone_8.

Referenced by bufinit(), counter_u64_sysinit(), epoch_init(), mbuf_init(), and vntblinit().

Here is the caller graph for this function:

◆ counter_u64_fetch()

uint64_t counter_u64_fetch ( counter_u64_t  c)

Definition at line 54 of file subr_counter.c.

Referenced by counter_ratecheck(), sysctl_handle_counter_u64(), sysctl_handle_counter_u64_array(), and sysctl_nchstats().

Here is the caller graph for this function:

◆ counter_u64_free()

void counter_u64_free ( counter_u64_t  c)

Definition at line 68 of file subr_counter.c.

References pcpu_zone_8.

Referenced by counter_u64_sysuninit().

Here is the caller graph for this function:

◆ counter_u64_sysinit()

void counter_u64_sysinit ( void *  arg)

Definition at line 177 of file subr_counter.c.

References counter_u64_alloc().

Here is the call graph for this function:

◆ counter_u64_sysuninit()

void counter_u64_sysuninit ( void *  arg)

Definition at line 186 of file subr_counter.c.

References counter_u64_free().

Here is the call graph for this function:

◆ counter_u64_zero()

void counter_u64_zero ( counter_u64_t  c)

Definition at line 47 of file subr_counter.c.

Referenced by counter_ratecheck(), sysctl_handle_counter_u64(), and sysctl_handle_counter_u64_array().

Here is the caller graph for this function:

◆ sysctl_handle_counter_u64()

int sysctl_handle_counter_u64 ( SYSCTL_HANDLER_ARGS  )

Definition at line 75 of file subr_counter.c.

References counter_u64_fetch(), and counter_u64_zero().

Here is the call graph for this function:

◆ sysctl_handle_counter_u64_array()

int sysctl_handle_counter_u64_array ( SYSCTL_HANDLER_ARGS  )

Definition at line 96 of file subr_counter.c.

References counter_u64_fetch(), counter_u64_zero(), free(), and malloc().

Here is the call graph for this function: