Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
timer_stats.c File Reference
#include <linux/proc_fs.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
#include <linux/seq_file.h>
#include <linux/kallsyms.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  entry
 

Macros

#define MAX_ENTRIES_BITS   10
 
#define MAX_ENTRIES   (1UL << MAX_ENTRIES_BITS)
 
#define TSTAT_HASH_BITS   (MAX_ENTRIES_BITS - 1)
 
#define TSTAT_HASH_SIZE   (1UL << TSTAT_HASH_BITS)
 
#define TSTAT_HASH_MASK   (TSTAT_HASH_SIZE - 1)
 
#define __tstat_hashfn(entry)
 
#define tstat_hashentry(entry)   (tstat_hash_table + __tstat_hashfn(entry))
 

Functions

void timer_stats_update_stats (void *timer, pid_t pid, void *startf, void *timerf, char *comm, unsigned int timer_flag)
 
void __init init_timer_stats (void)
 
 __initcall (init_tstats_procfs)
 

Variables

struct entry ____cacheline_aligned_in_smp
 
int __read_mostly timer_stats_active
 

Macro Definition Documentation

#define __tstat_hashfn (   entry)
Value:
(((unsigned long)(entry)->timer ^ \
(unsigned long)(entry)->start_func ^ \
(unsigned long)(entry)->expire_func ^ \
(unsigned long)(entry)->pid ) & TSTAT_HASH_MASK)

Definition at line 128 of file timer_stats.c.

#define MAX_ENTRIES   (1UL << MAX_ENTRIES_BITS)

Definition at line 114 of file timer_stats.c.

#define MAX_ENTRIES_BITS   10

Definition at line 113 of file timer_stats.c.

#define TSTAT_HASH_BITS   (MAX_ENTRIES_BITS - 1)

Definition at line 124 of file timer_stats.c.

#define TSTAT_HASH_MASK   (TSTAT_HASH_SIZE - 1)

Definition at line 126 of file timer_stats.c.

#define TSTAT_HASH_SIZE   (1UL << TSTAT_HASH_BITS)

Definition at line 125 of file timer_stats.c.

#define tstat_hashentry (   entry)    (tstat_hash_table + __tstat_hashfn(entry))

Definition at line 134 of file timer_stats.c.

Function Documentation

__initcall ( init_tstats_procfs  )
void __init init_timer_stats ( void  )

Definition at line 408 of file timer_stats.c.

void timer_stats_update_stats ( void timer,
pid_t  pid,
void startf,
void timerf,
char comm,
unsigned int  timer_flag 
)

timer_stats_update_stats - Update the statistics for a timer. : pointer to either a timer_list or a hrtimer : the pid of the task which set up the timer : pointer to the function which did the timer setup : pointer to the timer callback function of the timer : name of the process which set up the timer

When the timer is already registered, then the event counter is incremented. Otherwise the timer is registered in a free slot.

Definition at line 234 of file timer_stats.c.

Variable Documentation

struct entry ____cacheline_aligned_in_smp
int __read_mostly timer_stats_active

Definition at line 99 of file timer_stats.c.