]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - include/xfs_btree_trace.h
include: don't collide __bitwise definitions in 4.10
[thirdparty/xfsprogs-dev.git] / include / xfs_btree_trace.h
1 /*
2 * Copyright (c) 2008 Silicon Graphics, Inc.
3 * All Rights Reserved.
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it would be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 #ifndef __XFS_BTREE_TRACE_H__
19 #define __XFS_BTREE_TRACE_H__
20
21 struct xfs_btree_cur;
22 struct xfs_buf;
23
24
25 /*
26 * Trace hooks.
27 * i,j = integer (32 bit)
28 * b = btree block buffer (xfs_buf_t)
29 * p = btree ptr
30 * r = btree record
31 * k = btree key
32 */
33
34 #ifdef XFS_BTREE_TRACE
35
36 /*
37 * Trace buffer entry types.
38 */
39 #define XFS_BTREE_KTRACE_ARGBI 1
40 #define XFS_BTREE_KTRACE_ARGBII 2
41 #define XFS_BTREE_KTRACE_ARGFFFI 3
42 #define XFS_BTREE_KTRACE_ARGI 4
43 #define XFS_BTREE_KTRACE_ARGIPK 5
44 #define XFS_BTREE_KTRACE_ARGIPR 6
45 #define XFS_BTREE_KTRACE_ARGIK 7
46 #define XFS_BTREE_KTRACE_ARGR 8
47 #define XFS_BTREE_KTRACE_CUR 9
48
49 /*
50 * Sub-types for cursor traces.
51 */
52 #define XBT_ARGS 0
53 #define XBT_ENTRY 1
54 #define XBT_ERROR 2
55 #define XBT_EXIT 3
56
57 void xfs_btree_trace_argbi(const char *, struct xfs_btree_cur *,
58 struct xfs_buf *, int, int);
59 void xfs_btree_trace_argbii(const char *, struct xfs_btree_cur *,
60 struct xfs_buf *, int, int, int);
61 void xfs_btree_trace_argi(const char *, struct xfs_btree_cur *, int, int);
62 void xfs_btree_trace_argipk(const char *, struct xfs_btree_cur *, int,
63 union xfs_btree_ptr, union xfs_btree_key *, int);
64 void xfs_btree_trace_argipr(const char *, struct xfs_btree_cur *, int,
65 union xfs_btree_ptr, union xfs_btree_rec *, int);
66 void xfs_btree_trace_argik(const char *, struct xfs_btree_cur *, int,
67 union xfs_btree_key *, int);
68 void xfs_btree_trace_argr(const char *, struct xfs_btree_cur *,
69 union xfs_btree_rec *, int);
70 void xfs_btree_trace_cursor(const char *, struct xfs_btree_cur *, int, int);
71
72 #define XFS_BTREE_TRACE_ARGBI(c, b, i) \
73 xfs_btree_trace_argbi(__func__, c, b, i, __LINE__)
74 #define XFS_BTREE_TRACE_ARGBII(c, b, i, j) \
75 xfs_btree_trace_argbii(__func__, c, b, i, j, __LINE__)
76 #define XFS_BTREE_TRACE_ARGI(c, i) \
77 xfs_btree_trace_argi(__func__, c, i, __LINE__)
78 #define XFS_BTREE_TRACE_ARGIPK(c, i, p, k) \
79 xfs_btree_trace_argipk(__func__, c, i, p, k, __LINE__)
80 #define XFS_BTREE_TRACE_ARGIPR(c, i, p, r) \
81 xfs_btree_trace_argipr(__func__, c, i, p, r, __LINE__)
82 #define XFS_BTREE_TRACE_ARGIK(c, i, k) \
83 xfs_btree_trace_argik(__func__, c, i, k, __LINE__)
84 #define XFS_BTREE_TRACE_ARGR(c, r) \
85 xfs_btree_trace_argr(__func__, c, r, __LINE__)
86 #define XFS_BTREE_TRACE_CURSOR(c, t) \
87 xfs_btree_trace_cursor(__func__, c, t, __LINE__)
88 #else
89 #define XFS_BTREE_TRACE_ARGBI(c, b, i)
90 #define XFS_BTREE_TRACE_ARGBII(c, b, i, j)
91 #define XFS_BTREE_TRACE_ARGI(c, i)
92 #define XFS_BTREE_TRACE_ARGIPK(c, i, p, s)
93 #define XFS_BTREE_TRACE_ARGIPR(c, i, p, r)
94 #define XFS_BTREE_TRACE_ARGIK(c, i, k)
95 #define XFS_BTREE_TRACE_ARGR(c, r)
96 #define XFS_BTREE_TRACE_CURSOR(c, t)
97 #endif /* XFS_BTREE_TRACE */
98
99 #endif /* __XFS_BTREE_TRACE_H__ */