[fcb818]: libop / op_config.h Maximize Restore History

Download this file

op_config.h    81 lines (66 with data), 1.9 kB

 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
70
71
72
73
74
75
76
77
78
79
80
/**
* @file op_config.h
*
* Parameters a user may want to change. See
* also op_config_24.h
*
* @remark Copyright 2002 OProfile authors
* @remark Read the file COPYING
*
* @author John Levon
* @author Philippe Elie
* @Modifications Daniel Hansel
*/
#ifndef OP_CONFIG_H
#define OP_CONFIG_H
#if defined(__cplusplus)
extern "C" {
#endif
/**
* must be called to initialize the paths below.
* @param session_dir the non-NULL value of the base session directory
*/
void init_op_config_dirs(char const * session_dir);
#define OP_SESSION_DIR_DEFAULT "/var/lib/oprofile/"
/*@{\name module default/min/max settings */
/** 65536 * sizeof(op_sample) */
#define OP_DEFAULT_BUF_SIZE 65536
/**
* we don't try to wake-up daemon until it remains more than this free entry
* in eviction buffer
*/
#define OP_PRE_WATERMARK(buffer_size) \
(((buffer_size) / 8) < OP_MIN_PRE_WATERMARK \
? OP_MIN_PRE_WATERMARK \
: (buffer_size) / 8)
/** minimal buffer water mark before we try to wakeup daemon */
#define OP_MIN_PRE_WATERMARK 8192
/** maximum number of entry in samples eviction buffer */
#define OP_MAX_BUF_SIZE 1048576
/** minimum number of entry in samples eviction buffer */
#define OP_MIN_BUF_SIZE (32768 + OP_PRE_WATERMARK(32768))
/** maximum sampling rate when using RTC */
#define OP_MAX_RTC_COUNT 4096
/*
* various paths, corresponding to opcontrol, that should be
* initialized by init_op_config_dirs() above.
*/
extern char op_session_dir[];
extern char op_samples_dir[];
extern char op_samples_current_dir[];
extern char op_lock_file[];
extern char op_log_file[];
extern char op_pipe_file[];
extern char op_dump_status[];
/* Global directory that stores debug files */
#ifndef DEBUGDIR
#define DEBUGDIR "/usr/lib/debug"
#endif
#define OPD_MAGIC "DAE\n"
#define OPD_VERSION 0x12
#define OP_MIN_CPU_BUF_SIZE 2048
#define OP_MAX_CPU_BUF_SIZE 131072
#if defined(__cplusplus)
}
#endif
#endif /* OP_CONFIG_H */