mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 02:03:03 +01:00
Change debug defines names to DEBUG_*
This commit is contained in:
parent
19baa32ac4
commit
32ad3f4583
@ -24,7 +24,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: btr.cpp,v 1.15 2003-01-16 17:47:04 skidder Exp $
|
||||
$Id: btr.cpp,v 1.16 2003-02-10 00:03:54 brodsom Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -3146,7 +3146,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
BTR gc_page, parent_page, left_page, right_page = NULL;
|
||||
BTN node, parent_node, last_node;
|
||||
SLONG number, left_number;
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
SLONG previous_number;
|
||||
#endif
|
||||
USHORT relation_number, l;
|
||||
@ -3226,7 +3226,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
left_window.win_flags = 0;
|
||||
left_page = (BTR) CCH_FETCH(tdbb, &left_window, LCK_write, pag_index);
|
||||
while (left_page->btr_sibling != window->win_page) {
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, &parent_window);
|
||||
CCH_RELEASE(tdbb, &left_window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
@ -3270,7 +3270,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
CCH_RELEASE(tdbb, &left_window);
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CCH_RELEASE(tdbb, &right_window);
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
return contents_above_threshold;
|
||||
@ -3280,7 +3280,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
/* Find the node on the parent's level--the parent page could
|
||||
have split while we didn't have it locked */
|
||||
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
previous_number = 0;
|
||||
#endif
|
||||
for (parent_node = parent_page->btr_nodes;;) {
|
||||
@ -3299,7 +3299,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
if (number == window->win_page || number == END_LEVEL)
|
||||
break;
|
||||
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
previous_number = number;
|
||||
#endif
|
||||
parent_node = NEXT_NODE(parent_node);
|
||||
@ -3313,7 +3313,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
CCH_RELEASE(tdbb, &right_window);
|
||||
CCH_RELEASE(tdbb, &parent_window);
|
||||
CCH_RELEASE(tdbb, window);
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
return contents_above_threshold;
|
||||
@ -3403,7 +3403,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
return contents_above_threshold;
|
||||
}
|
||||
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
{
|
||||
SLONG next_number;
|
||||
BTN next_parent_node;
|
||||
@ -3512,7 +3512,7 @@ static CONTENTS garbage_collect(TDBB tdbb, WIN * window, SLONG parent_number)
|
||||
|
||||
left_page->btr_length = p - (UCHAR *) left_page;
|
||||
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
if (left_page->btr_length > dbb->dbb_page_size) {
|
||||
CCH_RELEASE(tdbb, &left_window);
|
||||
CCH_RELEASE(tdbb, window);
|
||||
@ -4205,7 +4205,7 @@ static CONTENTS remove_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
|
||||
if (number == END_LEVEL) {
|
||||
CCH_RELEASE(tdbb, window);
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
return contents_above_threshold;
|
||||
@ -4296,7 +4296,7 @@ static CONTENTS remove_leaf_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
|| key->key_length != BTN_LENGTH(node) + BTN_PREFIX(node))
|
||||
#endif /* IGNORE_NULL_IDX_KEY */
|
||||
{
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
@ -4308,7 +4308,7 @@ static CONTENTS remove_leaf_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
if ( (l = BTN_LENGTH(node)) )
|
||||
do
|
||||
if (*p++ != *q++) {
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
@ -4333,7 +4333,7 @@ static CONTENTS remove_leaf_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
if (number == END_LEVEL)
|
||||
#endif /* IGNORE_NULL_IDX_KEY */
|
||||
{
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
@ -4360,7 +4360,7 @@ static CONTENTS remove_leaf_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
!= key->key_length)
|
||||
#endif /* IGNORE_NULL_IDX_KEY */
|
||||
{
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
@ -4379,7 +4379,7 @@ static CONTENTS remove_leaf_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
node = page->btr_nodes;
|
||||
if ((l = BTN_LENGTH(node))
|
||||
!= key->key_length) {
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
@ -4391,7 +4391,7 @@ static CONTENTS remove_leaf_node(TDBB tdbb, IIB * insertion, WIN * window)
|
||||
q = key->key_data;
|
||||
do
|
||||
if (*p++ != *q++) {
|
||||
#ifdef BTR_DEBUG
|
||||
#ifdef DEBUG_BTR
|
||||
CCH_RELEASE(tdbb, window);
|
||||
CORRUPT(204); /* msg 204 index inconsistent */
|
||||
#endif
|
||||
|
@ -1691,7 +1691,7 @@ static void release(void)
|
||||
**************************************/
|
||||
int mutex_state;
|
||||
|
||||
#ifdef EVENT_DEBUG
|
||||
#ifdef DEBUG_EVENT
|
||||
validate();
|
||||
#endif
|
||||
|
||||
@ -1789,7 +1789,7 @@ static STATUS return_ok(STATUS * status_vector)
|
||||
}
|
||||
|
||||
|
||||
#ifdef EVENT_DEBUG
|
||||
#ifdef DEBUG_EVENT
|
||||
static int validate(void)
|
||||
{
|
||||
/**************************************
|
||||
|
@ -318,14 +318,14 @@ int ISC_event_blocked(USHORT count, EVENT * events, SLONG * values)
|
||||
|
||||
for (; count > 0; --count, ++events, ++values)
|
||||
if ((*events)->event_count >= *values) {
|
||||
#ifdef ISC_SYNC_DEBUG
|
||||
#ifdef DEBUG_ISC_SYNC
|
||||
ib_printf("ISC_event_blocked: FALSE (eg something to report)\n");
|
||||
ib_fflush(ib_stdout);
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef ISC_SYNC_DEBUG
|
||||
#ifdef DEBUG_ISC_SYNC
|
||||
ib_printf("ISC_event_blocked: TRUE (eg nothing happened yet)\n");
|
||||
ib_fflush(ib_stdout);
|
||||
#endif
|
||||
@ -546,14 +546,14 @@ int ISC_event_blocked(USHORT count, EVENT * events, SLONG * values)
|
||||
|
||||
for (; count > 0; --count, ++events, ++values)
|
||||
if ((*events)->event_count >= *values) {
|
||||
#ifdef ISC_SYNC_DEBUG
|
||||
#ifdef DEBUG_ISC_SYNC
|
||||
ib_printf("ISC_event_blocked: FALSE (eg something to report)\n");
|
||||
ib_fflush(ib_stdout);
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef ISC_SYNC_DEBUG
|
||||
#ifdef DEBUG_ISC_SYNC
|
||||
ib_printf("ISC_event_blocked: TRUE (eg nothing happened yet)\n");
|
||||
ib_fflush(ib_stdout);
|
||||
#endif
|
||||
@ -840,14 +840,14 @@ int ISC_event_blocked(USHORT count, EVENT * events, SLONG * values)
|
||||
|
||||
for (; count > 0; --count, ++events, ++values)
|
||||
if ((*events)->event_count >= *values) {
|
||||
#ifdef ISC_SYNC_DEBUG
|
||||
#ifdef DEBUG_ISC_SYNC
|
||||
ib_printf("ISC_event_blocked: FALSE (eg something to report)\n");
|
||||
ib_fflush(ib_stdout);
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#ifdef ISC_SYNC_DEBUG
|
||||
#ifdef DEBUG_ISC_SYNC
|
||||
ib_printf("ISC_event_blocked: TRUE (eg nothing happened yet)\n");
|
||||
ib_fflush(ib_stdout);
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <process.h>
|
||||
#include <windows.h>
|
||||
|
||||
// #define THREAD_PSCHED_DEBUG
|
||||
// #define DEBUG_THREAD_PSCHED
|
||||
|
||||
MUTX_T ThreadPriorityScheduler::mutex;
|
||||
MemoryPool * ThreadPriorityScheduler::pool = 0;
|
||||
@ -186,7 +186,7 @@ ThreadPriorityScheduler * ThreadPriorityScheduler::Attach(void) {
|
||||
chain = m;
|
||||
TlsSetValue(specific_key, m);
|
||||
THD_mutex_unlock(&mutex);
|
||||
#ifdef THREAD_PSCHED_DEBUG
|
||||
#ifdef DEBUG_THREAD_PSCHED
|
||||
gds__log("^ handle=%p priority=%d", m->handle,
|
||||
m->flags & THPS_BOOSTED ?
|
||||
THREAD_PRIORITY_HIGHEST : THREAD_PRIORITY_NORMAL);
|
||||
@ -259,7 +259,7 @@ unsigned int __stdcall ThreadPriorityScheduler::Scheduler(LPVOID) {
|
||||
THREAD_PRIORITY_HIGHEST))
|
||||
Firebird::system_call_failed::raise();
|
||||
|
||||
#ifdef THREAD_PSCHED_DEBUG
|
||||
#ifdef DEBUG_THREAD_PSCHED
|
||||
gds__log("+ handle=%p priority=%d", t->handle, THREAD_PRIORITY_HIGHEST);
|
||||
#endif
|
||||
t->flags |= THPS_BOOSTED;
|
||||
@ -280,7 +280,7 @@ unsigned int __stdcall ThreadPriorityScheduler::Scheduler(LPVOID) {
|
||||
if (! SetThreadPriority(t->handle,
|
||||
THREAD_PRIORITY_NORMAL))
|
||||
Firebird::system_call_failed::raise();
|
||||
#ifdef THREAD_PSCHED_DEBUG
|
||||
#ifdef DEBUG_THREAD_PSCHED
|
||||
gds__log("- handle=%p priority=%d", t->handle, THREAD_PRIORITY_NORMAL);
|
||||
#endif
|
||||
t->flags &= ~THPS_BOOSTED;
|
||||
@ -331,7 +331,7 @@ start_label:
|
||||
}
|
||||
ThreadPriorityScheduler *m = *pt;
|
||||
*pt = m->next;
|
||||
#ifdef THREAD_PSCHED_DEBUG
|
||||
#ifdef DEBUG_THREAD_PSCHED
|
||||
gds__log("~ handle=%p", m->handle);
|
||||
#endif
|
||||
CloseHandle(m->handle);
|
||||
|
@ -909,13 +909,13 @@ int THD_wlck_destroy(WLCK_T * wlock)
|
||||
**************************************/
|
||||
int status;
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
ib_fprintf(ib_stderr, "calling rwlock_destroy %x\n", wlock);
|
||||
#endif
|
||||
|
||||
status = rwlock_destroy(wlock);
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
if (status)
|
||||
ib_fprintf(ib_stderr, "status = %d errno = %d\n", status, errno);
|
||||
#endif
|
||||
@ -937,13 +937,13 @@ int THD_wlck_init(WLCK_T * wlock)
|
||||
**************************************/
|
||||
int status;
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
ib_fprintf(ib_stderr, "calling rwlock_init %x\n", wlock);
|
||||
#endif
|
||||
|
||||
status = rwlock_init(wlock, USYNC_THREAD, NULL);
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
if (status)
|
||||
ib_fprintf(ib_stderr, "status = %d errno = %d\n", status, errno);
|
||||
#endif
|
||||
@ -965,7 +965,7 @@ int THD_wlck_lock(WLCK_T * wlock, USHORT type)
|
||||
**************************************/
|
||||
int status;
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
if (type == WLCK_read)
|
||||
ib_fprintf(ib_stderr, "calling rwlock_rdlock %x\n", wlock);
|
||||
else
|
||||
@ -977,7 +977,7 @@ int THD_wlck_lock(WLCK_T * wlock, USHORT type)
|
||||
else
|
||||
status = rw_wrlock(wlock);
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
if (status)
|
||||
ib_fprintf(ib_stderr, "status = %d errno = %d\n", status, errno);
|
||||
#endif
|
||||
@ -999,13 +999,13 @@ int THD_wlck_unlock(WLCK_T * wlock)
|
||||
**************************************/
|
||||
int status;
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
ib_fprintf(ib_stderr, "calling rwlock_unlock %x\n", wlock);
|
||||
#endif
|
||||
|
||||
status = rw_unlock(wlock);
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
if (status)
|
||||
ib_fprintf(ib_stderr, "status = %d errno = %d\n", status, errno);
|
||||
#endif
|
||||
@ -1068,7 +1068,7 @@ int THD_wlck_lock(WLCK_T * wlock, USHORT type)
|
||||
**************************************/
|
||||
int status, incr;
|
||||
|
||||
#ifdef THREAD_DEBUG
|
||||
#ifdef DEBUG_THREAD
|
||||
if (type == WLCK_read)
|
||||
ib_fprintf(ib_stderr, "calling rwlock_rdlock %x\n", wlock);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user