blob: 23f40d2f9e81f87d2b0d72d06dd684ee2ba6bd38 [file] [log] [blame]
Upstreamcc2ee171970-01-12 13:46:40 +00001/**
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 */
11
12#ifndef OPROFILED_H
13
14#include <signal.h>
15
16struct oprofiled_ops {
17 void (*init)(void);
18 void (*start)(void);
19 void (*exit)(void);
20};
21
22
23/**
24 * opd_open_logfile - open the log file
25 *
26 * Open the logfile on stdout and stderr. This function
27 * assumes that 1 and 2 are the lowest close()d file
28 * descriptors. Failure to open on either descriptor is
29 * a fatal error.
30 */
31void opd_open_logfile(void);
32
33
34/**
35 * is_image_ignored - check if we must ignore this image
36 * @param name the name to check
37 *
38 * Return true if the image should not be profiled
39 */
40int is_image_ignored(char const * name);
41
42/** return the int in the given oprofilefs file, error is fatal if !is_fatal */
43int opd_read_fs_int(char const * path, char const * name, int is_fatal);
44
45
46/** global variable positioned by signal handler */
47extern sig_atomic_t signal_alarm;
48extern sig_atomic_t signal_hup;
49extern sig_atomic_t signal_term;
50extern sig_atomic_t signal_usr1;
51extern sig_atomic_t signal_usr2;
52
53extern unsigned int op_nr_counters;
54extern int separate_lib;
55extern int separate_kernel;
56extern int separate_thread;
57extern int separate_cpu;
58extern int no_vmlinux;
59extern char * vmlinux;
60extern char * kernel_range;
61
62#endif /* OPROFILED_H */