~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/trace_xt.h

  • Committer: Brian Aker
  • Date: 2009-10-15 00:22:33 UTC
  • mto: (1183.1.11 merge)
  • mto: This revision was merged to the branch mainline in revision 1198.
  • Revision ID: brian@gaz-20091015002233-fa4ao2mbc67wls91
First pass of information engine. OMG, ponies... is it so much easier to
deal with creating and engine.

The list table iterator though... its ass, needs to go. We should also
abstract out share. Very few engines need a custom one. Just say'in

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2005 PrimeBase Technologies GmbH
2
 
 *
3
 
 * PrimeBase XT
4
 
 *
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.
9
 
 *
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.
14
 
 *
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
18
 
 *
19
 
 * 2005-02-07   Paul McCullagh
20
 
 *
21
 
 * H&G2JCtL
22
 
 */
23
 
#ifndef __xt_trace_h__
24
 
#define __xt_trace_h__
25
 
 
26
 
#include "xt_defs.h"
27
 
 
28
 
xtBool  xt_init_trace(void);
29
 
void    xt_exit_trace(void);
30
 
void    xt_dump_trace(void);
31
 
void    xt_print_trace(void);
32
 
 
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, ...);
42
 
 
43
 
#define XT_DEBUG_TRACE(x)
44
 
#define XT_DISABLED_TRACE(x)
45
 
#ifdef DEBUG
46
 
//#define PBXT_HANDLER_TRACE
47
 
#endif
48
 
 
49
 
/*
50
 
 * -----------------------------------------------------------------------
51
 
 * CONNECTION TRACKING
52
 
 */
53
 
 
54
 
#ifdef DEBUG
55
 
//#define XT_TRACK_CONNECTIONS
56
 
#endif
57
 
 
58
 
#ifdef XT_TRACK_CONNECTIONS
59
 
#define XT_TRACK_MAX_CONNS              500
60
 
 
61
 
typedef struct XTConnInfo {
62
 
        xtThreadID                      cu_t_id;
63
 
        xtXactID                        ci_curr_xact_id;
64
 
        xtWord8                         ci_xact_start;
65
 
 
66
 
        xtXactID                        ci_prev_xact_id;
67
 
        xtWord8                         ci_prev_xact_time;
68
 
} XTConnInfoRec, *XTConnInfoPtr;
69
 
 
70
 
extern XTConnInfoRec xt_track_conn_info[XT_TRACK_MAX_CONNS];
71
 
 
72
 
void    xt_dump_conn_tracking(void);
73
 
 
74
 
#endif
75
 
 
76
 
#endif