File indexing completed on 2026-01-08 10:33:33
0001 #ifndef ___OFS_TRACE_H___
0002 #define ___OFS_TRACE_H___
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 #ifndef NODEBUG
0034
0035 #include "XrdSys/XrdSysHeaders.hh"
0036 #include "XrdSys/XrdSysTrace.hh"
0037 #include "XrdOfs/XrdOfs.hh"
0038
0039 #define GTRACE(act) OfsTrace.What & TRACE_ ## act
0040
0041 #define TRACES(x) {SYSTRACE(OfsTrace.,tident,epname,0,x)}
0042
0043 #define FTRACE(act, x) \
0044 if (GTRACE(act)) \
0045 TRACES(x <<" fn=" << (oh->Name()))
0046
0047 #define XTRACE(act, target, x) \
0048 if (GTRACE(act)) TRACES(x <<" fn=" <<target)
0049
0050 #define ZTRACE(act, x) if (GTRACE(act)) TRACES(x)
0051
0052 #define DEBUG(x) if (GTRACE(debug)) TRACES(x)
0053
0054 #define EPNAME(x) static const char *epname = x;
0055
0056 #else
0057
0058 #define FTRACE(x, y)
0059 #define GTRACE(x) 0
0060 #define TRACES(x)
0061 #define XTRACE(x, y, a1)
0062 #define YTRACE(x, y, a1, a2, a3, a4, a5)
0063 #define ZTRACE(x, y)
0064 #define DEBUG(x)
0065 #define EPNAME(x)
0066
0067 #endif
0068
0069
0070
0071 #define TRACE_MOST 0x3fcd
0072 #define TRACE_ALL 0xffff
0073 #define TRACE_opendir 0x0001
0074 #define TRACE_readdir 0x0002
0075 #define TRACE_closedir TRACE_opendir
0076 #define TRACE_delay 0x0400
0077 #define TRACE_dir TRACE_opendir | TRACE_readdir | TRACE_closedir
0078 #define TRACE_open 0x0004
0079 #define TRACE_qscan 0x0008
0080 #define TRACE_close TRACE_open
0081 #define TRACE_read 0x0010
0082 #define TRACE_redirect 0x0800
0083 #define TRACE_write 0x0020
0084 #define TRACE_IO TRACE_read | TRACE_write | TRACE_aio
0085 #define TRACE_exists 0x0040
0086 #define TRACE_chmod TRACE_exists
0087 #define TRACE_getmode TRACE_exists
0088 #define TRACE_getsize TRACE_exists
0089 #define TRACE_remove 0x0080
0090 #define TRACE_rename TRACE_remove
0091 #define TRACE_sync 0x0100
0092 #define TRACE_truncate 0x0200
0093 #define TRACE_fsctl 0x0400
0094 #define TRACE_getstats 0x0800
0095 #define TRACE_mkdir 0x1000
0096 #define TRACE_stat 0x2000
0097 #define TRACE_aio 0x4000
0098 #define TRACE_debug 0x008000
0099 #define TRACE_chkpnt 0x010000
0100
0101 #endif