mmlr + bonefish:

Add helper macros for placing markers in the source, so we can get the
address ranges of code we're interested in.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43071 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2011-11-01 17:19:26 +00:00
parent 69d7ad7dc5
commit 97ac7257f6

View File

@ -82,6 +82,25 @@
# define KDEBUG_ONLY(x) /* nothing */
#endif
// Macros for for placing marker functions. They can be used to mark the
// beginning and end of code sections (e.g. used in the slab code).
#define RANGE_MARKER_FUNCTION(functionName) \
void functionName() {}
#define RANGE_MARKER_FUNCTION_BEGIN(scope) \
RANGE_MARKER_FUNCTION(scope##_begin)
#define RANGE_MARKER_FUNCTION_END(scope) \
RANGE_MARKER_FUNCTION(scope##_end)
#define RANGE_MARKER_FUNCTION_PROTOTYPE(functionName) \
void functionName();
#define RANGE_MARKER_FUNCTION_PROTOTYPES(scope) \
RANGE_MARKER_FUNCTION_PROTOTYPE(scope##_begin) \
RANGE_MARKER_FUNCTION_PROTOTYPE(scope##_end)
#define RANGE_MARKER_FUNCTION_ADDRESS_RANGE(scope) \
(addr_t)&scope##_begin, (addr_t)&scope##_end
// command return value
#define B_KDEBUG_ERROR 4
#define B_KDEBUG_RESTART_PIPE 5