oprofiled.h revision 10e23eebca4175a8dfe3a788b2bebacb1fcfce54
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
19struct 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 */
34void 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 */
43int is_image_ignored(char const * name);
44
45/** return the int in the given oprofilefs file, error is fatal if !is_fatal */
46int opd_read_fs_int(char const * path, char const * name, int is_fatal);
47
48
49/** global variable positioned by signal handler */
50extern sig_atomic_t signal_alarm;
51extern sig_atomic_t signal_hup;
52extern sig_atomic_t signal_term;
53extern sig_atomic_t signal_child;
54extern sig_atomic_t signal_usr1;
55extern sig_atomic_t signal_usr2;
56
57extern unsigned int op_nr_counters;
58extern int separate_lib;
59extern int separate_kernel;
60extern int separate_thread;
61extern int separate_cpu;
62extern int no_vmlinux;
63extern char * vmlinux;
64extern char * kernel_range;
65extern int no_xen;
66extern char * xenimage;
67extern char * xen_range;
68
69#endif /* OPROFILED_H */
70