From: "Kirill A. Shutemov" <kirill.shute...@linux.intel.com>

Dump page order to trace to be able to distinguish between small page
and huge page in page cache.

Signed-off-by: Kirill A. Shutemov <kirill.shute...@linux.intel.com>
---
 include/trace/events/filemap.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/filemap.h b/include/trace/events/filemap.h
index 0421f49..7e14b13 100644
--- a/include/trace/events/filemap.h
+++ b/include/trace/events/filemap.h
@@ -21,6 +21,7 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
                __field(struct page *, page)
                __field(unsigned long, i_ino)
                __field(unsigned long, index)
+               __field(int, order)
                __field(dev_t, s_dev)
        ),
 
@@ -28,18 +29,20 @@ DECLARE_EVENT_CLASS(mm_filemap_op_page_cache,
                __entry->page = page;
                __entry->i_ino = page->mapping->host->i_ino;
                __entry->index = page->index;
+               __entry->order = compound_order(page);
                if (page->mapping->host->i_sb)
                        __entry->s_dev = page->mapping->host->i_sb->s_dev;
                else
                        __entry->s_dev = page->mapping->host->i_rdev;
        ),
 
-       TP_printk("dev %d:%d ino %lx page=%p pfn=%lu ofs=%lu",
+       TP_printk("dev %d:%d ino %lx page=%p pfn=%lu ofs=%lu order=%d",
                MAJOR(__entry->s_dev), MINOR(__entry->s_dev),
                __entry->i_ino,
                __entry->page,
                page_to_pfn(__entry->page),
-               __entry->index << PAGE_SHIFT)
+               __entry->index << PAGE_SHIFT,
+               __entry->order)
 );
 
 DEFINE_EVENT(mm_filemap_op_page_cache, mm_filemap_delete_from_page_cache,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to