linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Strogin <stefan.strogin@gmail.com>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Stefan Strogin <stefan.strogin@gmail.com>,
	Stefan Strogin <s.strogin@partner.samsung.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	aneesh.kumar@linux.vnet.ibm.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sasha Levin <sasha.levin@oracle.com>,
	Dmitry Safonov <d.safonov@partner.samsung.com>,
	Pintu Kumar <pintu.k@samsung.com>,
	Laura Abbott <lauraa@codeaurora.org>,
	Dyasly Sergey <s.dyasly@samsung.com>,
	Vyacheslav Tyrtov <v.tyrtov@samsung.com>,
	Aleksei Mateosian <a.mateosian@samsung.com>,
	gioh.kim@lge.com
Subject: [PATCH] mm-cma-add-trace-events-for-cma-allocations-and-freeings-fix
Date: Thu, 02 Apr 2015 16:13:17 +0300	[thread overview]
Message-ID: <1427980397-21832-1-git-send-email-stefan.strogin@gmail.com> (raw)
In-Reply-To: <551D3E73.9070405@partner.samsung.com>

Trace 'align' too in cma_alloc trace event.

Signed-off-by: Stefan Strogin <stefan.strogin@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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2015-04-02 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 13:31 [PATCH] mm: cma: add trace events for CMA allocations and freeings Stefan Strogin
2015-04-02  7:33 ` Joonsoo Kim
2015-04-02 13:04   ` Stefan Strogin
2015-04-02 13:13     ` Stefan Strogin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427980397-21832-1-git-send-email-stefan.strogin@gmail.com \
    --to=stefan.strogin@gmail.com \
    --cc=a.mateosian@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=d.safonov@partner.samsung.com \
    --cc=gioh.kim@lge.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=lauraa@codeaurora.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mina86@mina86.com \
    --cc=mingo@redhat.com \
    --cc=pintu.k@samsung.com \
    --cc=rostedt@goodmis.org \
    --cc=s.dyasly@samsung.com \
    --cc=s.strogin@partner.samsung.com \
    --cc=sasha.levin@oracle.com \
    --cc=v.tyrtov@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).