Trace 'align' too in cma_alloc trace event.

Signed-off-by: Stefan Strogin <stefan.stro...@gmail.com>
---
 include/trace/events/cma.h | 11 +++++++----
 mm/cma.c                   |  2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/trace/events/cma.h b/include/trace/events/cma.h
index e01b35d..d7cd961 100644
--- a/include/trace/events/cma.h
+++ b/include/trace/events/cma.h
@@ -10,26 +10,29 @@
 TRACE_EVENT(cma_alloc,
 
        TP_PROTO(unsigned long pfn, const struct page *page,
-                unsigned int count),
+                unsigned int count, unsigned int align),
 
-       TP_ARGS(pfn, page, count),
+       TP_ARGS(pfn, page, count, align),
 
        TP_STRUCT__entry(
                __field(unsigned long, pfn)
                __field(const struct page *, page)
                __field(unsigned int, count)
+               __field(unsigned int, align)
        ),
 
        TP_fast_assign(
                __entry->pfn = pfn;
                __entry->page = page;
                __entry->count = count;
+               __entry->align = align;
        ),
 
-       TP_printk("pfn=%lx page=%p count=%u",
+       TP_printk("pfn=%lx page=%p count=%u align=%u",
                  __entry->pfn,
                  __entry->page,
-                 __entry->count)
+                 __entry->count,
+                 __entry->align)
 );
 
 TRACE_EVENT(cma_release,
diff --git a/mm/cma.c b/mm/cma.c
index e9410b7c..3a7a67b 100644
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -416,7 +416,7 @@ struct page *cma_alloc(struct cma *cma, unsigned int count, 
unsigned int align)
                start = bitmap_no + mask + 1;
        }
 
-       trace_cma_alloc(page ? pfn : -1UL, page, count);
+       trace_cma_alloc(page ? pfn : -1UL, page, count, align);
 
        pr_debug("%s(): returned %p\n", __func__, page);
        return page;
-- 
2.1.0

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