for linus: writeback reason binary tracing format fix

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJO9EbVAAoJECvKgwp+S8JaUG0P/RDICTvG5b6/YD1wwh4cHBTF
 xu4av5o+Okablr282vLt1d9N4nLP6A4Jp2XOxNoLdyUVMtwRNCMjO62vcBetKmqU
 9GJTKh3H72/amqNrfvf9E0Fl3rOv2U71x7k4KTwKVdUvITXEL/U0Vsl8a9WVNUZ0
 mZERzf0vrOCSN6gEzh4iNzMuZpKRSnNNP4iUilkwcD9cXPk85hFCNZx/nyMhKtcF
 9XzhSJgg1wJAwmBc9bdhkEm7jKYvxmslb4nMdQHoQNDGpEjwRbS7jQ/iHuD2AhPH
 DFTQ8LOhxxaTOiDjHJav0z/FRw+q6ZYbrkbLVt2qTOxfMxvHJdlfu7vTglq4PK9n
 Bo02K9zZisCM76uCUTHcp1aMjzU9tsx9tYipBz8YXNPoEuhYn/1F3tbt7FkCGBck
 wwTCe/J0+IKHWiXSAkZMj5PiSeMwliMpF7INdkLExkinwNu719dS6pTZDs/o8CMD
 M/0/M8jYnWOmylYDAbhKyEzAAHbAm0YGuUG7IVGP0H5YJucfmRGJzQMNaBTUUsP7
 pXdFA02rUTodCrSHqXscmA0Lb9ypsFnmAYMbb+YF5UNOW9zcQ9b2J23wmna7prIv
 FNKVAgDEjWk/SpN0mG3zZk7ixUagkbo9DfalZCBZsveZPktq1KZor1KaOIFzkUuB
 DUdtr4+GjhfDqFWywZ9+
 =dOhj
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2011-12-23 20:25:36 -08:00
commit 6d451c578c
2 changed files with 13 additions and 13 deletions

View file

@ -47,17 +47,6 @@ struct wb_writeback_work {
struct completion *done; /* set if the caller waits */
};
const char *wb_reason_name[] = {
[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"
};
/*
* Include the creation of the trace points after defining the
* wb_writeback_work structure so that the definition remains local to this

View file

@ -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,