12 #ifndef ROOT_XrdProofdTrace
13 #define ROOT_XrdProofdTrace
29 #define TRACE_ALL 0xff7f
32 #define TRACE_XERR 0x0001
33 #define TRACE_REQ 0x0002
34 #define TRACE_DBG 0x0004
35 #define TRACE_LOGIN 0x0008
36 #define TRACE_FORK 0x0010
37 #define TRACE_MEM 0x0020
38 #define TRACE_HDBG 0x0040
42 #define TRACE_DOMAINS 0xFF00
43 #define TRACE_RSP 0x0100
44 #define TRACE_AUX 0x0200
45 #define TRACE_CMGR 0x0400
46 #define TRACE_SMGR 0x0800
47 #define TRACE_NMGR 0x1000
48 #define TRACE_PMGR 0x2000
49 #define TRACE_GMGR 0x4000
50 #define TRACE_SCHED 0x8000
57 #ifndef ROOT_DllImport
60 #include "XrdOuc/XrdOucTrace.hh"
67 #if defined(__GNUC__) && (__GNUC__ >= 5) && !defined(__INTEL_COMPILER)
68 #pragma GCC diagnostic ignored "-Wnonnull-compare"
75 #define XPDDOM(d) unsigned int xpdtracingdomain = (unsigned int)(TRACE_ ## d & TRACE_ALL);
76 #define XPDLOC(d,x) unsigned int xpdtracingdomain = (unsigned int)(TRACE_ ## d & TRACE_ALL); \
77 const char *xpdloc = x;
79 #define TRACINGALL(x) (TRACE_ALL == TRACE_ ## x)
80 #define TRACINGERR(x) (TRACE_XERR == TRACE_ ## x)
81 #define TRACINGACT(x) (XrdProofdTrace && (XrdProofdTrace->What & TRACE_ ## x))
82 #define TRACINGDOM (XrdProofdTrace && (XrdProofdTrace->What & xpdtracingdomain))
83 #define TRACING(x) (TRACINGALL(x) || TRACINGERR(x) || (TRACINGACT(x) && TRACINGDOM))
85 #define TRACESET(act,on) \
87 XrdProofdTrace->What |= TRACE_ ## act; \
89 XrdProofdTrace->What &= ~(TRACE_ ## act & TRACE_ALL); \
93 {XrdProofdTrace->Beg("-I"); std::cerr << xpdloc <<": "<< x; XrdProofdTrace->End();}
96 {XrdProofdTrace->Beg("-E"); std::cerr << xpdloc <<": "<< x; XrdProofdTrace->End();}
98 #define TRACE(act, x) \
100 if (TRACINGERR(act)) { \
107 #define TRACET(tid, act, x) \
108 if (TRACING(act)) { \
109 const char *typ = (TRACINGERR(act)) ? "-E" : "-I"; \
110 XrdProofdTrace->Beg(typ, 0, tid); std::cerr << xpdloc <<": "<< x; XrdProofdTrace->End(); \
113 #define TRACEP(p, act, x) \
114 if (TRACING(act)) { \
115 const char *typ = (TRACINGERR(act)) ? "-E" : "-I"; \
117 XrdProofdTrace->Beg(typ, 0, p->TraceID()); std::cerr << xpdloc <<": "<< x; XrdProofdTrace->End(); \
120 #define TRACEI(id, act, x) \
121 if (TRACING(act)) { \
122 if (TRACINGERR(act)) { \
124 XrdProofdTrace->Beg("-E", 0, id); std::cerr << xpdloc <<": "<< x; XrdProofdTrace->End(); \
125 } else { XPDERR(x); }\
128 XrdProofdTrace->Beg("-I", 0, id); std::cerr << xpdloc <<": "<< x; XrdProofdTrace->End(); \
129 } else { XPDPRT(x); }\
138 #define TRACINGERR(x) (0)
139 #define TRACESET(act,on)
143 #define TRACE(act, x)
144 #define TRACEID(tid, act, x)
145 #define TRACEP(p, act, x)
146 #define TRACEI(id, act, x)
R__EXTERN XrdOucTrace * XrdProofdTrace