aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2014-08-12 04:33:17 -0400
committerChris Mason <clm@fb.com>2014-09-17 16:37:51 -0400
commitb38a62586fed4ce058dc8d40deaa1b85cafc7fb3 (patch)
treea836ac1d5d51051cad3ce345891125af1593d858 /include/trace
parentd3982100baeb9bed8cf931545fb0522268f526e5 (diff)
Btrfs: add work_struct information for workqueue tracepoint
Kernel workqueue's tracepoints print the address of work_struct, while btrfs workqueue's tracepoints print the address of btrfs_work. We need a connection between this two, for example when debuging, we usually grep an address in the trace output. So it'd be better to also print work_struct in btrfs workqueue's tracepoint. Please note that we can only add this into those tracepoints whose work is still available in memory because we need to reference the work. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/btrfs.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index b8774b3f88d7..e3f3d10c6647 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -997,6 +997,7 @@ DECLARE_EVENT_CLASS(btrfs__work,
997 __field( void *, func ) 997 __field( void *, func )
998 __field( void *, ordered_func ) 998 __field( void *, ordered_func )
999 __field( void *, ordered_free ) 999 __field( void *, ordered_free )
1000 __field( void *, normal_work )
1000 ), 1001 ),
1001 1002
1002 TP_fast_assign( 1003 TP_fast_assign(
@@ -1005,11 +1006,13 @@ DECLARE_EVENT_CLASS(btrfs__work,
1005 __entry->func = work->func; 1006 __entry->func = work->func;
1006 __entry->ordered_func = work->ordered_func; 1007 __entry->ordered_func = work->ordered_func;
1007 __entry->ordered_free = work->ordered_free; 1008 __entry->ordered_free = work->ordered_free;
1009 __entry->normal_work = &work->normal_work;
1008 ), 1010 ),
1009 1011
1010 TP_printk("work=%p, wq=%p, func=%p, ordered_func=%p, ordered_free=%p", 1012 TP_printk("work=%p (normal_work=%p), wq=%p, func=%p, ordered_func=%p,"
1011 __entry->work, __entry->wq, __entry->func, 1013 " ordered_free=%p",
1012 __entry->ordered_func, __entry->ordered_free) 1014 __entry->work, __entry->normal_work, __entry->wq,
1015 __entry->func, __entry->ordered_func, __entry->ordered_free)
1013); 1016);
1014 1017
1015/* For situiations that the work is freed */ 1018/* For situiations that the work is freed */