Commit 828f3b0d authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix log tracing code so it is independent of DEBUG like other traces.

SGI Modid: 2.5.x-xfs:slinx:160178a
parent 61e41fb1
...@@ -159,6 +159,7 @@ xfs_buftarg_t *xlog_target; ...@@ -159,6 +159,7 @@ xfs_buftarg_t *xlog_target;
#endif #endif
#if defined(XFS_LOG_TRACE) #if defined(XFS_LOG_TRACE)
void void
xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string) xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string)
{ {
...@@ -184,31 +185,6 @@ xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string) ...@@ -184,31 +185,6 @@ xlog_trace_loggrant(xlog_t *log, xlog_ticket_t *tic, xfs_caddr_t string)
(void *)((unsigned long)16)); (void *)((unsigned long)16));
} }
void
xlog_trace_tic(xlog_t *log, xlog_ticket_t *tic)
{
if (! log->l_trace)
log->l_trace = ktrace_alloc(256, KM_SLEEP);
ktrace_enter(log->l_trace,
(void *)tic,
(void *)((unsigned long)tic->t_curr_res),
(void *)((unsigned long)tic->t_unit_res),
(void *)((unsigned long)tic->t_ocnt),
(void *)((unsigned long)tic->t_cnt),
(void *)((unsigned long)tic->t_flags),
(void *)((unsigned long)7),
(void *)((unsigned long)8),
(void *)((unsigned long)9),
(void *)((unsigned long)10),
(void *)((unsigned long)11),
(void *)((unsigned long)12),
(void *)((unsigned long)13),
(void *)((unsigned long)14),
(void *)((unsigned long)15),
(void *)((unsigned long)16));
}
void void
xlog_trace_iclog(xlog_in_core_t *iclog, uint state) xlog_trace_iclog(xlog_in_core_t *iclog, uint state)
{ {
...@@ -1578,7 +1554,7 @@ xlog_unalloc_log(xlog_t *log) ...@@ -1578,7 +1554,7 @@ xlog_unalloc_log(xlog_t *log)
sv_destroy(&iclog->ic_forcesema); sv_destroy(&iclog->ic_forcesema);
sv_destroy(&iclog->ic_writesema); sv_destroy(&iclog->ic_writesema);
xfs_buf_free(iclog->ic_bp); xfs_buf_free(iclog->ic_bp);
#ifdef DEBUG #ifdef XFS_LOG_TRACE
if (iclog->ic_trace != NULL) { if (iclog->ic_trace != NULL) {
ktrace_free(iclog->ic_trace); ktrace_free(iclog->ic_trace);
} }
...@@ -1609,7 +1585,7 @@ xlog_unalloc_log(xlog_t *log) ...@@ -1609,7 +1585,7 @@ xlog_unalloc_log(xlog_t *log)
} }
} }
xfs_buf_free(log->l_xbuf); xfs_buf_free(log->l_xbuf);
#ifdef DEBUG #ifdef XFS_LOG_TRACE
if (log->l_trace != NULL) { if (log->l_trace != NULL) {
ktrace_free(log->l_trace); ktrace_free(log->l_trace);
} }
......
...@@ -32,14 +32,6 @@ ...@@ -32,14 +32,6 @@
#ifndef __XFS_LOG_PRIV_H__ #ifndef __XFS_LOG_PRIV_H__
#define __XFS_LOG_PRIV_H__ #define __XFS_LOG_PRIV_H__
#if defined(XFS_ALL_TRACE)
#define XFS_LOG_TRACE
#endif
#if !defined(DEBUG)
#undef XFS_LOG_TRACE
#endif
struct xfs_buf; struct xfs_buf;
struct ktrace; struct ktrace;
struct log; struct log;
...@@ -109,6 +101,7 @@ int xlog_btolrbb(int b); ...@@ -109,6 +101,7 @@ int xlog_btolrbb(int b);
#ifdef __KERNEL__ #ifdef __KERNEL__
/* /*
* get client id from packed copy. * get client id from packed copy.
* *
...@@ -434,7 +427,7 @@ typedef struct xlog_iclog_fields { ...@@ -434,7 +427,7 @@ typedef struct xlog_iclog_fields {
struct log *ic_log; struct log *ic_log;
xfs_log_callback_t *ic_callback; xfs_log_callback_t *ic_callback;
xfs_log_callback_t **ic_callback_tail; xfs_log_callback_t **ic_callback_tail;
#ifdef DEBUG #ifdef XFS_LOG_TRACE
struct ktrace *ic_trace; struct ktrace *ic_trace;
#endif #endif
int ic_size; int ic_size;
...@@ -531,7 +524,7 @@ typedef struct log { ...@@ -531,7 +524,7 @@ typedef struct log {
int l_grant_write_bytes; int l_grant_write_bytes;
/* The following fields don't need locking */ /* The following fields don't need locking */
#ifdef DEBUG #ifdef XFS_LOG_TRACE
struct ktrace *l_trace; struct ktrace *l_trace;
struct ktrace *l_grant_trace; struct ktrace *l_grant_trace;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment