tracing/events: Convert format output to seq_file
authorSteven Rostedt <srostedt@redhat.com>
Thu, 3 Jun 2010 19:21:34 +0000 (15:21 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 12 Aug 2010 20:59:29 +0000 (16:59 -0400)
commit2a37a3df57c44e947271758a1aa4bea7bff9feab
tree89d3e35a1c29f021d7ca0c468a391ec35f0db34b
parent465c6cca2668a2db2a4ffce3dca5714017873f2b
tracing/events: Convert format output to seq_file

Two new events were added that broke the current format output.

Both from the SCSI system: scsi_dispatch_cmd_done and scsi_dispatch_cmd_timeout

The reason is that their print_fmt exceeded a page size. Since the output
of the format used simple_read_from_buffer and trace_seq, it was limited
to a page size in output.

This patch converts the printing of the format of an event into seq_file,
which allows greater than a page size to be shown.

I diffed all event formats comparing the output with and without this
patch. All matched except for the above two, which showed just:

  FORMAT TOO BIG

without this patch, but now properly displays the output with this patch.

v2: Remove updating *pos in seq start function.
   [ Thanks to Li Zefan for pointing that out ]

Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_events.c