Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
kernel_stat.h File Reference
#include <linux/smp.h>
#include <linux/threads.h>
#include <linux/percpu.h>
#include <linux/cpumask.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <asm/irq.h>
#include <asm/cputime.h>

Go to the source code of this file.

Data Structures

struct  kernel_cpustat
 
struct  kernel_stat
 

Macros

#define kstat_this_cpu   (&__get_cpu_var(kstat))
 
#define kcpustat_this_cpu   (&__get_cpu_var(kernel_cpustat))
 
#define kstat_cpu(cpu)   per_cpu(kstat, cpu)
 
#define kcpustat_cpu(cpu)   per_cpu(kernel_cpustat, cpu)
 

Enumerations

enum  cpu_usage_stat {
  CPUTIME_USER, CPUTIME_NICE, CPUTIME_SYSTEM, CPUTIME_SOFTIRQ,
  CPUTIME_IRQ, CPUTIME_IDLE, CPUTIME_IOWAIT, CPUTIME_STEAL,
  CPUTIME_GUEST, CPUTIME_GUEST_NICE, NR_STATS
}
 

Functions

 DECLARE_PER_CPU (struct kernel_stat, kstat)
 
 DECLARE_PER_CPU (struct kernel_cpustat, kernel_cpustat)
 
unsigned long long nr_context_switches (void)
 
unsigned long long task_delta_exec (struct task_struct *)
 
void account_user_time (struct task_struct *, cputime_t, cputime_t)
 
void account_system_time (struct task_struct *, int, cputime_t, cputime_t)
 
void account_steal_time (cputime_t)
 
void account_idle_time (cputime_t)
 
void account_process_tick (struct task_struct *, int user)
 
void account_steal_ticks (unsigned long ticks)
 
void account_idle_ticks (unsigned long ticks)
 

Macro Definition Documentation

#define kcpustat_cpu (   cpu)    per_cpu(kernel_cpustat, cpu)

Definition at line 52 of file kernel_stat.h.

#define kcpustat_this_cpu   (&__get_cpu_var(kernel_cpustat))

Definition at line 50 of file kernel_stat.h.

#define kstat_cpu (   cpu)    per_cpu(kstat, cpu)

Definition at line 51 of file kernel_stat.h.

#define kstat_this_cpu   (&__get_cpu_var(kstat))

Definition at line 49 of file kernel_stat.h.

Enumeration Type Documentation

Enumerator:
CPUTIME_USER 
CPUTIME_NICE 
CPUTIME_SYSTEM 
CPUTIME_SOFTIRQ 
CPUTIME_IRQ 
CPUTIME_IDLE 
CPUTIME_IOWAIT 
CPUTIME_STEAL 
CPUTIME_GUEST 
CPUTIME_GUEST_NICE 
NR_STATS 

Definition at line 19 of file kernel_stat.h.

Function Documentation

void account_idle_ticks ( unsigned long  ticks)

Definition at line 403 of file cputime.c.

void account_idle_time ( cputime_t  )

Definition at line 261 of file cputime.c.

void account_process_tick ( struct task_struct ,
int  user 
)

Definition at line 115 of file vtime.c.

void account_steal_ticks ( unsigned long  ticks)

Definition at line 394 of file cputime.c.

void account_steal_time ( cputime_t  )

Definition at line 250 of file cputime.c.

void account_system_time ( struct task_struct ,
int  ,
cputime_t  ,
cputime_t   
)

Definition at line 226 of file cputime.c.

void account_user_time ( struct task_struct ,
cputime_t  ,
cputime_t   
)

Definition at line 150 of file cputime.c.

DECLARE_PER_CPU ( struct kernel_stat  ,
kstat   
)
DECLARE_PER_CPU ( struct kernel_cpustat  ,
kernel_cpustat   
)
unsigned long long nr_context_switches ( void  )

Definition at line 1936 of file core.c.

unsigned long long task_delta_exec ( struct task_struct )

Definition at line 2588 of file core.c.