aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2011-08-29 11:52:23 -0400
committerWu Fengguang <fengguang.wu@intel.com>2011-08-30 20:48:15 -0400
commitc8ad620638f97bdb7c8ef8cc788f08a04b14eadc (patch)
tree9541b23f41a8240c6377658adeb580d04fa7a3e0 /include/trace
parent9e79e3e9dd9672b37ac9412e9a926714306551fe (diff)
writeback: show raw dirtied_when in trace writeback_single_inode
Save inode->dirtied_when in the raw trace output for reliable scripting, and to also show in formatted output the relative age in seconds for easy human reading. CC: Jan Kara <jack@suse.cz> Acked-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/writeback.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h
index 6bca4cc0063c..5f172703eb4f 100644
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -298,7 +298,7 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template,
298 __array(char, name, 32) 298 __array(char, name, 32)
299 __field(unsigned long, ino) 299 __field(unsigned long, ino)
300 __field(unsigned long, state) 300 __field(unsigned long, state)
301 __field(unsigned long, age) 301 __field(unsigned long, dirtied_when)
302 __field(unsigned long, writeback_index) 302 __field(unsigned long, writeback_index)
303 __field(long, nr_to_write) 303 __field(long, nr_to_write)
304 __field(unsigned long, wrote) 304 __field(unsigned long, wrote)
@@ -309,19 +309,19 @@ DECLARE_EVENT_CLASS(writeback_single_inode_template,
309 dev_name(inode->i_mapping->backing_dev_info->dev), 32); 309 dev_name(inode->i_mapping->backing_dev_info->dev), 32);
310 __entry->ino = inode->i_ino; 310 __entry->ino = inode->i_ino;
311 __entry->state = inode->i_state; 311 __entry->state = inode->i_state;
312 __entry->age = (jiffies - inode->dirtied_when) * 312 __entry->dirtied_when = inode->dirtied_when;
313 1000 / HZ;
314 __entry->writeback_index = inode->i_mapping->writeback_index; 313 __entry->writeback_index = inode->i_mapping->writeback_index;
315 __entry->nr_to_write = nr_to_write; 314 __entry->nr_to_write = nr_to_write;
316 __entry->wrote = nr_to_write - wbc->nr_to_write; 315 __entry->wrote = nr_to_write - wbc->nr_to_write;
317 ), 316 ),
318 317
319 TP_printk("bdi %s: ino=%lu state=%s age=%lu " 318 TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu "
320 "index=%lu to_write=%ld wrote=%lu", 319 "index=%lu to_write=%ld wrote=%lu",
321 __entry->name, 320 __entry->name,
322 __entry->ino, 321 __entry->ino,
323 show_inode_state(__entry->state), 322 show_inode_state(__entry->state),
324 __entry->age, 323 __entry->dirtied_when,
324 (jiffies - __entry->dirtied_when) / HZ,
325 __entry->writeback_index, 325 __entry->writeback_index,
326 __entry->nr_to_write, 326 __entry->nr_to_write,
327 __entry->wrote 327 __entry->wrote