Commit 9f27889f authored by Carlos Maiolino's avatar Carlos Maiolino Committed by Dave Chinner

xfs: Add caller function output to xfs_log_force tracepoint

I had sent this patch yesterday, but for some reason it didn't reach
xfs list, sending again.

Output the caller of xfs_log_force might be useful when tracing log
checkpoint problems without the need to build kernel with DEBUG.
Signed-off-by: default avatarCarlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
parent f55532a0
...@@ -3378,7 +3378,7 @@ xfs_log_force( ...@@ -3378,7 +3378,7 @@ xfs_log_force(
{ {
int error; int error;
trace_xfs_log_force(mp, 0); trace_xfs_log_force(mp, 0, _RET_IP_);
error = _xfs_log_force(mp, flags, NULL); error = _xfs_log_force(mp, flags, NULL);
if (error) if (error)
xfs_warn(mp, "%s: error %d returned.", __func__, error); xfs_warn(mp, "%s: error %d returned.", __func__, error);
...@@ -3527,7 +3527,7 @@ xfs_log_force_lsn( ...@@ -3527,7 +3527,7 @@ xfs_log_force_lsn(
{ {
int error; int error;
trace_xfs_log_force(mp, lsn); trace_xfs_log_force(mp, lsn, _RET_IP_);
error = _xfs_log_force_lsn(mp, lsn, flags, NULL); error = _xfs_log_force_lsn(mp, lsn, flags, NULL);
if (error) if (error)
xfs_warn(mp, "%s: error %d returned.", __func__, error); xfs_warn(mp, "%s: error %d returned.", __func__, error);
......
...@@ -1053,19 +1053,21 @@ DECLARE_EVENT_CLASS(xfs_log_item_class, ...@@ -1053,19 +1053,21 @@ DECLARE_EVENT_CLASS(xfs_log_item_class,
) )
TRACE_EVENT(xfs_log_force, TRACE_EVENT(xfs_log_force,
TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn), TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn, unsigned long caller_ip),
TP_ARGS(mp, lsn), TP_ARGS(mp, lsn, caller_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
__field(xfs_lsn_t, lsn) __field(xfs_lsn_t, lsn)
__field(unsigned long, caller_ip)
), ),
TP_fast_assign( TP_fast_assign(
__entry->dev = mp->m_super->s_dev; __entry->dev = mp->m_super->s_dev;
__entry->lsn = lsn; __entry->lsn = lsn;
__entry->caller_ip = caller_ip;
), ),
TP_printk("dev %d:%d lsn 0x%llx", TP_printk("dev %d:%d lsn 0x%llx caller %ps",
MAJOR(__entry->dev), MINOR(__entry->dev), MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->lsn) __entry->lsn, (void *)__entry->caller_ip)
) )
#define DEFINE_LOG_ITEM_EVENT(name) \ #define DEFINE_LOG_ITEM_EVENT(name) \
......
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