From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> 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.shutemov@xxxxxxxxxxxxxxx> --- 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, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>