• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file op_config.h
3  *
4  * Parameters a user may want to change. See
5  * also op_config_24.h
6  *
7  * @remark Copyright 2002 OProfile authors
8  * @remark Read the file COPYING
9  *
10  * @author John Levon
11  * @author Philippe Elie
12  * @Modifications Daniel Hansel
13  */
14 
15 #ifndef OP_CONFIG_H
16 #define OP_CONFIG_H
17 
18 #if defined(__cplusplus)
19 extern "C" {
20 #endif
21 
22 /**
23  * must be called to initialize the paths below.
24  * @param session_dir  the non-NULL value of the base session directory
25  */
26 void init_op_config_dirs(char const * session_dir);
27 
28 #if !defined(ANDROID) || defined(ANDROID_HOST)
29 #define OP_SESSION_DIR_DEFAULT "/var/lib/oprofile/"
30 #endif
31 
32 /*
33  * various paths, corresponding to opcontrol, that should be
34  * initialized by init_op_config_dirs() above.
35  */
36 extern char op_session_dir[];
37 extern char op_samples_dir[];
38 extern char op_samples_current_dir[];
39 extern char op_lock_file[];
40 extern char op_log_file[];
41 extern char op_pipe_file[];
42 extern char op_dump_status[];
43 
44 #if ANDROID
45 #define OP_DRIVER_BASE  "/dev/oprofile"
46 #define OP_DATA_DIR     "/data/oprofile"
47 #endif
48 
49 /* Global directory that stores debug files */
50 #ifndef DEBUGDIR
51 #define DEBUGDIR "/usr/lib/debug"
52 #endif
53 
54 #define OPD_MAGIC "DAE\n"
55 #define OPD_VERSION 0x11
56 
57 #define OP_MIN_CPU_BUF_SIZE 2048
58 #define OP_MAX_CPU_BUF_SIZE 131072
59 
60 #if defined(__cplusplus)
61 }
62 #endif
63 
64 #endif /* OP_CONFIG_H */
65