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