• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file daemon/oprofiled.h
3  * Initialisation and setup
4  *
5  * @remark Copyright 2002, 2003 OProfile authors
6  * @remark Read the file COPYING
7  *
8  * @author John Levon
9  * @author Philippe Elie
10  * Modified by Aravind Menon for Xen
11  * These modifications are:
12  * Copyright (C) 2005 Hewlett-Packard Co.
13  */
14 
15 #ifndef OPROFILED_H
16 
17 #include <signal.h>
18 
19 struct oprofiled_ops {
20 	void (*init)(void);
21 	void (*start)(void);
22 	void (*exit)(void);
23 };
24 
25 
26 /**
27  * opd_open_logfile - open the log file
28  *
29  * Open the logfile on stdout and stderr. This function
30  * assumes that 1 and 2 are the lowest close()d file
31  * descriptors. Failure to open on either descriptor is
32  * a fatal error.
33  */
34 void opd_open_logfile(void);
35 
36 
37 /**
38  * is_image_ignored - check if we must ignore this image
39  * @param name the name to check
40  *
41  * Return true if the image should not be profiled
42  */
43 int is_image_ignored(char const * name);
44 
45 /** return the int in the given oprofilefs file, error is fatal if !is_fatal */
46 int opd_read_fs_int(char const * path, char const * name, int is_fatal);
47 
48 
49 /** global variable positioned by signal handler */
50 extern sig_atomic_t signal_alarm;
51 extern sig_atomic_t signal_hup;
52 extern sig_atomic_t signal_term;
53 extern sig_atomic_t signal_child;
54 extern sig_atomic_t signal_usr1;
55 extern sig_atomic_t signal_usr2;
56 
57 extern unsigned int op_nr_counters;
58 extern int separate_lib;
59 extern int separate_kernel;
60 extern int separate_thread;
61 extern int separate_cpu;
62 extern int no_vmlinux;
63 extern char * vmlinux;
64 extern char * kernel_range;
65 extern int no_xen;
66 extern char * xenimage;
67 extern char * xen_range;
68 
69 #endif /* OPROFILED_H */
70