aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_vnode.h
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 00:42:19 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 00:42:19 -0500
commitcf441eeb79c32471379f0a4d97feaef691432a03 (patch)
tree283347fcc807a87339a8244d3a45029eac90c825 /fs/xfs/linux-2.6/xfs_vnode.h
parent44866d39282d0782b15fa4cb62aad937bf0a0897 (diff)
[XFS] clean up vnode/inode tracing
Simplify vnode tracing calls by embedding function name & return addr in the calling macro. Also do a lot of vnode->inode renaming for consistency, while we're at it. SGI-PV: 970335 SGI-Modid: xfs-linux-melb:xfs-kern:29650a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_vnode.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_vnode.h51
1 files changed, 29 insertions, 22 deletions
diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h
index 55fb46948589..09763067da11 100644
--- a/fs/xfs/linux-2.6/xfs_vnode.h
+++ b/fs/xfs/linux-2.6/xfs_vnode.h
@@ -210,12 +210,12 @@ static inline int vn_count(bhv_vnode_t *vp)
210 */ 210 */
211extern bhv_vnode_t *vn_hold(bhv_vnode_t *); 211extern bhv_vnode_t *vn_hold(bhv_vnode_t *);
212 212
213#if defined(XFS_VNODE_TRACE) 213#if defined(XFS_INODE_TRACE)
214#define VN_HOLD(vp) \ 214#define VN_HOLD(vp) \
215 ((void)vn_hold(vp), \ 215 ((void)vn_hold(vp), \
216 vn_trace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address)) 216 xfs_itrace_hold(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address))
217#define VN_RELE(vp) \ 217#define VN_RELE(vp) \
218 (vn_trace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \ 218 (xfs_itrace_rele(xfs_vtoi(vp), __FILE__, __LINE__, (inst_t *)__return_address), \
219 iput(vn_to_inode(vp))) 219 iput(vn_to_inode(vp)))
220#else 220#else
221#define VN_HOLD(vp) ((void)vn_hold(vp)) 221#define VN_HOLD(vp) ((void)vn_hold(vp))
@@ -296,26 +296,33 @@ static inline void vn_atime_to_time_t(bhv_vnode_t *vp, time_t *tt)
296/* 296/*
297 * Tracking vnode activity. 297 * Tracking vnode activity.
298 */ 298 */
299#if defined(XFS_VNODE_TRACE) 299#if defined(XFS_INODE_TRACE)
300 300
301#define VNODE_TRACE_SIZE 16 /* number of trace entries */ 301#define INODE_TRACE_SIZE 16 /* number of trace entries */
302#define VNODE_KTRACE_ENTRY 1 302#define INODE_KTRACE_ENTRY 1
303#define VNODE_KTRACE_EXIT 2 303#define INODE_KTRACE_EXIT 2
304#define VNODE_KTRACE_HOLD 3 304#define INODE_KTRACE_HOLD 3
305#define VNODE_KTRACE_REF 4 305#define INODE_KTRACE_REF 4
306#define VNODE_KTRACE_RELE 5 306#define INODE_KTRACE_RELE 5
307 307
308extern void vn_trace_entry(struct xfs_inode *, const char *, inst_t *); 308extern void _xfs_itrace_entry(struct xfs_inode *, const char *, inst_t *);
309extern void vn_trace_exit(struct xfs_inode *, const char *, inst_t *); 309extern void _xfs_itrace_exit(struct xfs_inode *, const char *, inst_t *);
310extern void vn_trace_hold(struct xfs_inode *, char *, int, inst_t *); 310extern void xfs_itrace_hold(struct xfs_inode *, char *, int, inst_t *);
311extern void vn_trace_ref(struct xfs_inode *, char *, int, inst_t *); 311extern void _xfs_itrace_ref(struct xfs_inode *, char *, int, inst_t *);
312extern void vn_trace_rele(struct xfs_inode *, char *, int, inst_t *); 312extern void xfs_itrace_rele(struct xfs_inode *, char *, int, inst_t *);
313#define xfs_itrace_entry(ip) \
314 _xfs_itrace_entry(ip, __FUNCTION__, (inst_t *)__return_address)
315#define xfs_itrace_exit(ip) \
316 _xfs_itrace_exit(ip, __FUNCTION__, (inst_t *)__return_address)
317#define xfs_itrace_ref(ip) \
318 _xfs_itrace_ref(ip, __FILE__, __LINE__, (inst_t *)__return_address)
319
313#else 320#else
314#define vn_trace_entry(a,b,c) 321#define xfs_itrace_entry(a)
315#define vn_trace_exit(a,b,c) 322#define xfs_itrace_exit(a)
316#define vn_trace_hold(a,b,c,d) 323#define xfs_itrace_hold(a, b, c, d)
317#define vn_trace_ref(a,b,c,d) 324#define xfs_itrace_ref(a)
318#define vn_trace_rele(a,b,c,d) 325#define xfs_itrace_rele(a, b, c, d)
319#endif 326#endif
320 327
321#endif /* __XFS_VNODE_H__ */ 328#endif /* __XFS_VNODE_H__ */