blob: 1786fae62765d98a27be28e25da08f9304b6aa06 [file] [log] [blame]
Upstreamcc2ee171970-01-12 13:46:40 +00001/**
2 * @file op_config_24.h
3 *
4 * Parameters a user may want to change
5 *
6 * @remark Copyright 2002 OProfile authors
7 * @remark Read the file COPYING
8 *
9 * @author John Levon
10 * @author Philippe Elie
11 */
12
13#ifndef OP_CONFIG_24_H
14#define OP_CONFIG_24_H
15
16#define OP_MOUNT "/proc/sys/dev/oprofile/"
Ben Cheng2b16b5f2008-10-23 16:07:43 -070017
18extern char op_device[];
19extern char op_note_device[];
20extern char op_hash_device[];
Upstreamcc2ee171970-01-12 13:46:40 +000021
22/*@{\name module default/min/max settings */
23
24/** 65536 * sizeof(op_sample) */
25#define OP_DEFAULT_BUF_SIZE 65536
Ben Cheng2b16b5f2008-10-23 16:07:43 -070026/**
27 * we don't try to wake-up daemon until it remains more than this free entry
28 * in eviction buffer
29 */
Upstreamcc2ee171970-01-12 13:46:40 +000030#define OP_PRE_WATERMARK(buffer_size) \
31 (((buffer_size) / 8) < OP_MIN_PRE_WATERMARK \
32 ? OP_MIN_PRE_WATERMARK \
33 : (buffer_size) / 8)
Ben Cheng2b16b5f2008-10-23 16:07:43 -070034/** minimal buffer water mark before we try to wakeup daemon */
Upstreamcc2ee171970-01-12 13:46:40 +000035#define OP_MIN_PRE_WATERMARK 8192
36/** maximum number of entry in samples eviction buffer */
37#define OP_MAX_BUF_SIZE 1048576
38/** minimum number of entry in samples eviction buffer */
39#define OP_MIN_BUF_SIZE (32768 + OP_PRE_WATERMARK(32768))
40
41/** 16384 * sizeof(op_note) = 273680 bytes default */
42#define OP_DEFAULT_NOTE_SIZE 16384
Ben Cheng2b16b5f2008-10-23 16:07:43 -070043/**
44 * we don't try to wake-up daemon until it remains more than this free entry
45 * in note buffer
46 */
Upstreamcc2ee171970-01-12 13:46:40 +000047#define OP_PRE_NOTE_WATERMARK(note_size) \
48 (((note_size) / 32) < OP_MIN_NOTE_PRE_WATERMARK \
49 ? OP_MIN_NOTE_PRE_WATERMARK \
50 : (note_size) / 32)
Ben Cheng2b16b5f2008-10-23 16:07:43 -070051/** minimal note buffer water mark before we try to wakeup daemon */
Upstreamcc2ee171970-01-12 13:46:40 +000052#define OP_MIN_NOTE_PRE_WATERMARK 512
53/** maximum number of entry in note buffer */
54#define OP_MAX_NOTE_TABLE_SIZE 1048576
55/** minimum number of entry in note buffer */
56#define OP_MIN_NOTE_TABLE_SIZE (1024 + OP_PRE_NOTE_WATERMARK(1024))
57
58/** maximum sampling rate when using RTC */
59#define OP_MAX_RTC_COUNT 4096
60/** minimum sampling rate when using RTC */
61#define OP_MIN_RTC_COUNT 2
62
63/*@}*/
64
Ben Cheng2b16b5f2008-10-23 16:07:43 -070065/**
66 * nr entries in hash map. This is the maximum number of name components
67 * allowed. Must be a prime number
68 */
Upstreamcc2ee171970-01-12 13:46:40 +000069#define OP_HASH_MAP_NR 4093
70
71/** size of string pool in bytes */
72#define POOL_SIZE 65536
73
74#ifndef NR_CPUS
75/** maximum number of cpus present in the box */
76#define NR_CPUS 32
77#endif
78
79#endif /* OP_CONFIG_24_H */