RSS

(root)/calliope : /debug.h (revision 452)

Line Revision Contents
1 130 /*  Calliope Music Player
2 186  *  Copyright 2005-09 Sam Thursfield <ssssam gmail.com>
3 130  *
4  *  This program is free software: you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation, either version 3 of the License, or
7  *  (at your option) any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15 261  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 130  */
17
18 /* debug.h: #define flags useful for debugging various subsystems. */
19
20 261 /* FIXME: this file causes a total recompile when anything is changed. It's nice having all the
21  * debug flags in one file, but what can be done about recompiling?
22  *   -> Fix waf to be clever about header dependencies - this isn't really possible, as it needs to
23  *      store the state of all #defines to know what has changed.
24  *   -> Make this a wscript include that uses -D parameters - also hard, because it can't know what
25  *      to recompile without being able to look through each source file for the #define. Better
26  *      than the first idea however.
27 262  *   -> Put #defines back into local header files, and index the flags somewhere - probably the best
28  *      option really.
29 261  */
30
31 130 #ifndef _DEBUG_H
32 #define _DEBUG_H
33
34 179
35 261 /* This fellow tracks a name with each reference an entry has; useful for
36 130  * finding out which reference is being leaked when an entry is not being
37  * property unref'ed. */
38 223 #define ENTRY_TRACK_REFERENCE_OWNERS
39 130
40 132 /* Disable the internal entry cache in library, so every entry is read from the database
41  * every time it is queried. */
42 298 //#define LIBRARY_DISABLE_CACHE
43 132
44 451 /* Check internal musicsourceview structures after functions that might accidentally break them */
45 218 #define MUSIC_SOURCE_VIEW_CHECK_TREE
46 132
47 451 /* Check library cache for consistency after complicated operations. */
48 #define LIBRARY_CHECK_CACHE
49
50 269
51 /* Trace Process system. */
52 //#define PROCESS_TRACE
53
54 451 /* Trace basic entry manipulations. */
55 //#define ENTRY_TRACE
56
57 269 /* Log add/remove_entry etc. */
58 452 //#define MUSIC_SOURCE_TRACE_EDITING
59 269
60 358 /* Log the entry notifications emitted by music sources. */
61 360 //#define MUSIC_SOURCE_TRACE_NOTIFY
62 132
63 356 /* Disable library completely. Useful if you are breaking musicsource experimentally. */
64 451 //#define LIBRARY_DISABLE
65 356
66 132 /* Logs all of library's queries. */
67 //#define LIBRARY_TRACE_QUERIES
68
69 /* Logs cache interaction in library. */
70 280 //#define LIBRARY_TRACE_CACHE
71 261
72 132 /* Trace internal library functions. */
73 //#define LIBRARY_TRACE_METHODS
74
75 143
76 132 /* Trace internal musicsourceview interface calls. */
77 //#define MUSIC_SOURCE_VIEW_TRACE_INTERFACE
78
79 436 /* Track _locate_entry functions within genericview. [1 - 6] */
80 //#define GENERIC_VIEW_TRACE_LOCATION  6
81 130
82 434 /* Track initial page reads of genericview. [1 - 4] */
83 435 //#define GENERIC_VIEW_TRACE_READING  4
84 434
85 354 /* Track entries being inserted/removed internally in genericview. */
86 418 //#define GENERIC_VIEW_TRACE_CHANGES
87 206
88 132 /* Logs all of libraryview's queries. (But /not/ library's). */
89 434 // FIXME: would TRACE_READING be a better name?
90 259 //#define LIBRARY_VIEW_TRACE_QUERIES
91 130
92 261 /* Log all the crazy tricks libraryview plays estimating row counts and stuff. */
93 //#define LIBRARY_VIEW_TRACE_CHAINING
94
95 182
96 /* Trace through file searches and imports. */
97 244 //#define FILES_TRACE
98 182
99 184 /* Trace character set conversion during imports. */
100 //#define TRACK_CHARSET_CONVERSION
101
102 130 #endif

Loggerhead is a web-based interface for Bazaar branches