ia64/linux-2.6.18-xen.hg

view drivers/oprofile/timer_int.c @ 893:f994bfe9b93b

linux/blktap2: reduce TLB flush scope

c/s 885 added very coarse TLB flushing. Since these flushes always
follow single page updates, single page flushes (when available) are
sufficient.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:32:57 2009 +0100 (2009-06-04)
parents 831230e53067
children
line source
1 /**
2 * @file timer_int.c
3 *
4 * @remark Copyright 2002 OProfile authors
5 * @remark Read the file COPYING
6 *
7 * @author John Levon <levon@movementarian.org>
8 */
10 #include <linux/kernel.h>
11 #include <linux/notifier.h>
12 #include <linux/smp.h>
13 #include <linux/oprofile.h>
14 #include <linux/profile.h>
15 #include <linux/init.h>
16 #include <asm/ptrace.h>
18 #include "oprof.h"
20 static int timer_notify(struct pt_regs *regs)
21 {
22 oprofile_add_sample(regs, 0);
23 return 0;
24 }
26 static int timer_start(void)
27 {
28 return register_timer_hook(timer_notify);
29 }
32 static void timer_stop(void)
33 {
34 unregister_timer_hook(timer_notify);
35 }
38 void __init oprofile_timer_init(struct oprofile_operations * ops)
39 {
40 ops->create_files = NULL;
41 ops->setup = NULL;
42 ops->shutdown = NULL;
43 ops->start = timer_start;
44 ops->stop = timer_stop;
45 ops->cpu_type = "timer";
46 }