Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux

for linus: writeback reason binary tracing format fix

* tag 'writeback' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
writeback: show writeback reason with __print_symbolic

+13 -13
-11
fs/fs-writeback.c
··· 47 47 struct completion *done; /* set if the caller waits */ 48 48 }; 49 49 50 - const char *wb_reason_name[] = { 51 - [WB_REASON_BACKGROUND] = "background", 52 - [WB_REASON_TRY_TO_FREE_PAGES] = "try_to_free_pages", 53 - [WB_REASON_SYNC] = "sync", 54 - [WB_REASON_PERIODIC] = "periodic", 55 - [WB_REASON_LAPTOP_TIMER] = "laptop_timer", 56 - [WB_REASON_FREE_MORE_MEM] = "free_more_memory", 57 - [WB_REASON_FS_FREE_SPACE] = "fs_free_space", 58 - [WB_REASON_FORKER_THREAD] = "forker_thread" 59 - }; 60 - 61 50 /* 62 51 * Include the creation of the trace points after defining the 63 52 * wb_writeback_work structure so that the definition remains local to this
+13 -2
include/trace/events/writeback.h
··· 21 21 {I_REFERENCED, "I_REFERENCED"} \ 22 22 ) 23 23 24 + #define WB_WORK_REASON \ 25 + {WB_REASON_BACKGROUND, "background"}, \ 26 + {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ 27 + {WB_REASON_SYNC, "sync"}, \ 28 + {WB_REASON_PERIODIC, "periodic"}, \ 29 + {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ 30 + {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ 31 + {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ 32 + {WB_REASON_FORKER_THREAD, "forker_thread"} 33 + 24 34 struct wb_writeback_work; 25 35 26 36 DECLARE_EVENT_CLASS(writeback_work_class, ··· 65 55 __entry->for_kupdate, 66 56 __entry->range_cyclic, 67 57 __entry->for_background, 68 - wb_reason_name[__entry->reason] 58 + __print_symbolic(__entry->reason, WB_WORK_REASON) 69 59 ) 70 60 ); 71 61 #define DEFINE_WRITEBACK_WORK_EVENT(name) \ ··· 194 184 __entry->older, /* older_than_this in jiffies */ 195 185 __entry->age, /* older_than_this in relative milliseconds */ 196 186 __entry->moved, 197 - wb_reason_name[__entry->reason]) 187 + __print_symbolic(__entry->reason, WB_WORK_REASON) 188 + ) 198 189 ); 199 190 200 191 TRACE_EVENT(global_dirty_state,