]> git.hungrycats.org Git - linux/commit
[PATCH] add context switch counters
authorAndrew Morton <akpm@osdl.org>
Sun, 31 Aug 2003 11:32:56 +0000 (04:32 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 31 Aug 2003 11:32:56 +0000 (04:32 -0700)
commita776ac8d7331991be8298247d3547761bf54779b
tree40c3cc4bb8f2867d60f99777f8094c062dcc13c8
parent8890739713c95dbd26da852acc73f24a1d58593f
[PATCH] add context switch counters

From: Peter Chubb <peterc@gelato.unsw.edu.au>

Currently, the context switch counters reported by getrusage() are
always zero.  The appended patch adds fields to struct task_struct to
count context switches, and adds code to do the counting.

The patch adds 4 longs to struct task struct, and a single addition to
the fast path in schedule().
include/linux/sched.h
kernel/exit.c
kernel/fork.c
kernel/sched.c
kernel/sys.c