]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-cma-add-trace-events-for-cma-allocations-and-freeings-fix
authorStefan Strogin <stefan.strogin@gmail.com>
Tue, 7 Apr 2015 23:44:36 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:36 +0000 (09:44 +1000)
Trace 'align' too in cma_alloc trace event.

Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Nazarewicz <mpn@google.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Thierry Reding <treding@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/trace/events/cma.h
mm/cma.c

index e01b35d4eda4d03485913a2f4672b4995d13e6a4..d7cd961720a73e63b48d58dfab6747b96a885385 100644 (file)
 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,
index e9410b7c34f236fbb4fb8cee9c58c14a418d143a..3a7a67b933942f5232091094f5d719d59bda13ab 100644 (file)
--- 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;