51
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MEMSPYDRIVERLOG_H
|
|
19 |
#define MEMSPYDRIVERLOG_H
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <kernel.h>
|
|
23 |
|
|
24 |
// Uncomment this line to enable minimal op code tracing
|
|
25 |
//#define TRACE_TYPE_OPCODES
|
|
26 |
|
|
27 |
// Uncomment this line to enable driver tracing
|
|
28 |
//#define TRACE_TYPE_GENERAL
|
|
29 |
|
|
30 |
// Uncomment this line to dump raw binary data - usually heaps & stacks.
|
|
31 |
//#define TRACE_TYPE_DATA
|
|
32 |
|
|
33 |
// Uncomment this line to trace heap walking etc
|
|
34 |
//#define TRACE_TYPE_USERHEAP
|
|
35 |
|
|
36 |
// Uncomment this line to trace chunks
|
|
37 |
//#define TRACE_TYPE_CHUNK
|
|
38 |
|
|
39 |
// Uncomment this line to trace event monitor functionality
|
|
40 |
//#define TRACE_TYPE_EVENTMONITOR
|
|
41 |
|
|
42 |
// Uncomment this line to trace kernel heap operations
|
|
43 |
//#define TRACE_TYPE_KERNELHEAP
|
|
44 |
|
|
45 |
// Uncomment this line to trace heap walking
|
|
46 |
//#define TRACE_TYPE_HEAPWALK
|
|
47 |
|
|
48 |
// This block switches on basic tracing in UDEB HW builds
|
|
49 |
#if (defined(_DEBUG) && !defined(__WINS__))
|
|
50 |
# define TRACE_TYPE_OPCODES
|
|
51 |
# define TRACE_TYPE_GENERAL
|
|
52 |
//# define TRACE_TYPE_HEAPWALK
|
|
53 |
# define TRACE_TYPE_CHUNK
|
|
54 |
//# define TRACE_TYPE_EVENTMONITOR
|
|
55 |
//# define TRACE_TYPE_DATA
|
|
56 |
//# define TRACE_TYPE_USERHEAP
|
|
57 |
# define TRACE_TYPE_KERNELHEAP
|
|
58 |
#endif
|
|
59 |
|
|
60 |
|
|
61 |
#if defined(TRACE_TYPE_OPCODES)
|
|
62 |
# define TRACE_OP( x ) x
|
|
63 |
#else
|
|
64 |
# define TRACE_OP( x )
|
|
65 |
#endif
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
#if defined(TRACE_TYPE_GENERAL)
|
|
70 |
# define TRACE( x ) x
|
|
71 |
#else
|
|
72 |
# define TRACE( x )
|
|
73 |
#endif
|
|
74 |
|
|
75 |
|
|
76 |
|
|
77 |
#if defined(TRACE_TYPE_USERHEAP)
|
|
78 |
# define TRACE_HEAP( x ) x
|
|
79 |
#else
|
|
80 |
# define TRACE_HEAP( x )
|
|
81 |
#endif
|
|
82 |
|
|
83 |
|
|
84 |
|
|
85 |
#if defined(TRACE_TYPE_KERNELHEAP)
|
|
86 |
# define TRACE_KH( x ) x
|
|
87 |
#else
|
|
88 |
# define TRACE_KH( x )
|
|
89 |
#endif
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
#if defined(TRACE_TYPE_HEAPWALK )
|
|
94 |
# define TRACE_HEAPWALK( x ) x
|
|
95 |
#else
|
|
96 |
# define TRACE_HEAPWALK( x )
|
|
97 |
#endif
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
#if defined(TRACE_TYPE_EVENTMONITOR)
|
|
102 |
# define TRACE_EM( x ) x
|
|
103 |
#else
|
|
104 |
# define TRACE_EM( x )
|
|
105 |
#endif
|
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
#if defined(TRACE_TYPE_DATA)
|
|
110 |
# define TRACE_DATA( x ) x
|
|
111 |
#else
|
|
112 |
# define TRACE_DATA( x )
|
|
113 |
#endif
|
|
114 |
|
|
115 |
|
|
116 |
#if defined(TRACE_TYPE_CHUNK)
|
|
117 |
# define TRACE_CHUNK( x ) x
|
|
118 |
#else
|
|
119 |
# define TRACE_CHUNK( x )
|
|
120 |
#endif
|
|
121 |
|
|
122 |
#define LOG(args...) TRACE(Kern::Printf(args))
|
|
123 |
|
|
124 |
#endif
|