1
/* Copyright (C) 2005 PrimeBase Technologies GmbH
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
* 2005-02-07 Paul McCullagh
23
#ifndef __xt_trace_h__
24
#define __xt_trace_h__
28
xtBool xt_init_trace(void);
29
void xt_exit_trace(void);
30
void xt_dump_trace(void);
31
void xt_print_trace(void);
33
void xt_trace(const char *fmt, ...);
34
void xt_ttraceq(struct XTThread *self, char *query);
35
void xt_ttracef(struct XTThread *self, char *fmt, ...);
36
xtWord8 xt_trace_clock(void);
37
char *xt_trace_clock_str(char *ptr);
38
char *xt_trace_clock_diff(char *ptr);
39
char *xt_trace_clock_diff(char *ptr, xtWord8 start_time);
40
void xt_set_fflush(xtBool on);
41
void xt_ftracef(char *fmt, ...);
43
#define XT_DEBUG_TRACE(x)
44
#define XT_DISABLED_TRACE(x)
46
//#define PBXT_HANDLER_TRACE
50
* -----------------------------------------------------------------------
55
//#define XT_TRACK_CONNECTIONS
58
#ifdef XT_TRACK_CONNECTIONS
59
#define XT_TRACK_MAX_CONNS 500
61
typedef struct XTConnInfo {
63
xtXactID ci_curr_xact_id;
64
xtWord8 ci_xact_start;
66
xtXactID ci_prev_xact_id;
67
xtWord8 ci_prev_xact_time;
68
} XTConnInfoRec, *XTConnInfoPtr;
70
extern XTConnInfoRec xt_track_conn_info[XT_TRACK_MAX_CONNS];
72
void xt_dump_conn_tracking(void);