blob: f8b56c4aa112865e57c2fdd18c496b1cc4d21718 [file] [log] [blame]
The Android Open Source Project10e23ee2009-03-03 19:30:30 -08001/**
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)
19extern "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 */
26void init_op_config_dirs(char const * session_dir);
27
Jeff Brownb415fab2011-01-11 12:38:32 -080028#if !defined(ANDROID) || defined(ANDROID_HOST)
Ben Cheng5a4eb4e2009-09-14 16:00:41 -070029#define OP_SESSION_DIR_DEFAULT "/var/lib/oprofile/"
30#endif
31
The Android Open Source Project10e23ee2009-03-03 19:30:30 -080032/*
33 * various paths, corresponding to opcontrol, that should be
34 * initialized by init_op_config_dirs() above.
35 */
36extern char op_session_dir[];
37extern char op_samples_dir[];
38extern char op_samples_current_dir[];
39extern char op_lock_file[];
40extern char op_log_file[];
41extern char op_pipe_file[];
42extern char op_dump_status[];
43
Ben Cheng5a4eb4e2009-09-14 16:00:41 -070044#if ANDROID
The Android Open Source Project10e23ee2009-03-03 19:30:30 -080045#define OP_DRIVER_BASE "/dev/oprofile"
46#define OP_DATA_DIR "/data/oprofile"
Ben Cheng5a4eb4e2009-09-14 16:00:41 -070047#endif
The Android Open Source Project10e23ee2009-03-03 19:30:30 -080048
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 */