diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2011-12-08 16:53:54 -0600 |
---|---|---|
committer | Wu Fengguang <fengguang.wu@intel.com> | 2011-12-18 14:20:17 +0800 |
commit | b3bba872ddb0320a7ecb54decae53c13ceb2ed4c (patch) | |
tree | ed47c72d9193d40173e319663d4e1eb1c60a7d15 /include/trace | |
parent | 384703b8e6cd4c8ef08512e596024e028c91c339 (diff) | |
download | linux-3.10-b3bba872ddb0320a7ecb54decae53c13ceb2ed4c.tar.gz linux-3.10-b3bba872ddb0320a7ecb54decae53c13ceb2ed4c.tar.bz2 linux-3.10-b3bba872ddb0320a7ecb54decae53c13ceb2ed4c.zip |
writeback: show writeback reason with __print_symbolic
This makes the binary trace understandable by trace-cmd.
CC: Dave Chinner <david@fromorbit.com>
CC: Curt Wohlgemuth <curtw@google.com>
CC: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/writeback.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index b99caa8b780..99d1d0decf8 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h @@ -21,6 +21,16 @@ {I_REFERENCED, "I_REFERENCED"} \ ) +#define WB_WORK_REASON \ + {WB_REASON_BACKGROUND, "background"}, \ + {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ + {WB_REASON_SYNC, "sync"}, \ + {WB_REASON_PERIODIC, "periodic"}, \ + {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ + {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ + {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ + {WB_REASON_FORKER_THREAD, "forker_thread"} + struct wb_writeback_work; DECLARE_EVENT_CLASS(writeback_work_class, @@ -55,7 +65,7 @@ DECLARE_EVENT_CLASS(writeback_work_class, __entry->for_kupdate, __entry->range_cyclic, __entry->for_background, - wb_reason_name[__entry->reason] + __print_symbolic(__entry->reason, WB_WORK_REASON) ) ); #define DEFINE_WRITEBACK_WORK_EVENT(name) \ @@ -184,7 +194,8 @@ TRACE_EVENT(writeback_queue_io, __entry->older, /* older_than_this in jiffies */ __entry->age, /* older_than_this in relative milliseconds */ __entry->moved, - wb_reason_name[__entry->reason]) + __print_symbolic(__entry->reason, WB_WORK_REASON) + ) ); TRACE_EVENT(global_dirty_state, |