xref: /OK3568_Linux_fs/kernel/drivers/oprofile/oprof.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /**
2*4882a593Smuzhiyun  * @file oprof.h
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * @remark Copyright 2002 OProfile authors
5*4882a593Smuzhiyun  * @remark Read the file COPYING
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * @author John Levon <levon@movementarian.org>
8*4882a593Smuzhiyun  */
9*4882a593Smuzhiyun 
10*4882a593Smuzhiyun #ifndef OPROF_H
11*4882a593Smuzhiyun #define OPROF_H
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun int oprofile_setup(void);
14*4882a593Smuzhiyun void oprofile_shutdown(void);
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun int oprofilefs_register(void);
17*4882a593Smuzhiyun void oprofilefs_unregister(void);
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun int oprofile_start(void);
20*4882a593Smuzhiyun void oprofile_stop(void);
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun struct oprofile_operations;
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun extern unsigned long oprofile_buffer_size;
25*4882a593Smuzhiyun extern unsigned long oprofile_cpu_buffer_size;
26*4882a593Smuzhiyun extern unsigned long oprofile_buffer_watershed;
27*4882a593Smuzhiyun extern unsigned long oprofile_time_slice;
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun extern struct oprofile_operations oprofile_ops;
30*4882a593Smuzhiyun extern unsigned long oprofile_started;
31*4882a593Smuzhiyun extern unsigned long oprofile_backtrace_depth;
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun struct dentry;
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun void oprofile_create_files(struct dentry *root);
36*4882a593Smuzhiyun int oprofile_timer_init(struct oprofile_operations *ops);
37*4882a593Smuzhiyun #ifdef CONFIG_OPROFILE_NMI_TIMER
38*4882a593Smuzhiyun int op_nmi_timer_init(struct oprofile_operations *ops);
39*4882a593Smuzhiyun #else
op_nmi_timer_init(struct oprofile_operations * ops)40*4882a593Smuzhiyun static inline int op_nmi_timer_init(struct oprofile_operations *ops)
41*4882a593Smuzhiyun {
42*4882a593Smuzhiyun 	return -ENODEV;
43*4882a593Smuzhiyun }
44*4882a593Smuzhiyun #endif
45*4882a593Smuzhiyun 
46*4882a593Smuzhiyun 
47*4882a593Smuzhiyun int oprofile_set_ulong(unsigned long *addr, unsigned long val);
48*4882a593Smuzhiyun int oprofile_set_timeout(unsigned long time);
49*4882a593Smuzhiyun 
50*4882a593Smuzhiyun #endif /* OPROF_H */
51