aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/trace/events/writeback.h33
1 files changed, 25 insertions, 8 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 5a14ead59696..880dd7437172 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -23,15 +23,32 @@
23 {I_REFERENCED, "I_REFERENCED"} \ 23 {I_REFERENCED, "I_REFERENCED"} \
24 ) 24 )
25 25
26/* enums need to be exported to user space */
27#undef EM
28#undef EMe
29#define EM(a,b) TRACE_DEFINE_ENUM(a);
30#define EMe(a,b) TRACE_DEFINE_ENUM(a);
31
26#define WB_WORK_REASON \ 32#define WB_WORK_REASON \
27 {WB_REASON_BACKGROUND, "background"}, \ 33 EM( WB_REASON_BACKGROUND, "background") \
28 {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ 34 EM( WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages") \
29 {WB_REASON_SYNC, "sync"}, \ 35 EM( WB_REASON_SYNC, "sync") \
30 {WB_REASON_PERIODIC, "periodic"}, \ 36 EM( WB_REASON_PERIODIC, "periodic") \
31 {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ 37 EM( WB_REASON_LAPTOP_TIMER, "laptop_timer") \
32 {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ 38 EM( WB_REASON_FREE_MORE_MEM, "free_more_memory") \
33 {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ 39 EM( WB_REASON_FS_FREE_SPACE, "fs_free_space") \
34 {WB_REASON_FORKER_THREAD, "forker_thread"} 40 EMe(WB_REASON_FORKER_THREAD, "forker_thread")
41
42WB_WORK_REASON
43
44/*
45 * Now redefine the EM() and EMe() macros to map the enums to the strings
46 * that will be printed in the output.
47 */
48#undef EM
49#undef EMe
50#define EM(a,b) { a, b },
51#define EMe(a,b) { a, b }
35 52
36struct wb_writeback_work; 53struct wb_writeback_work;
37 54