mm: cma: add trace events for CMA alloc perf testing

Add cma and migrate trace events to enable CMA allocation
performance to be measured via ftrace.

Change-Id: I1e471e9e21f1a14ce2ed167d8515ccb5f83eb88c
Signed-off-by: Liam Mark <[email protected]>
Signed-off-by: Patrick Daly <[email protected]>
Signed-off-by: Sudarshan Rajagopalan <[email protected]>
Signed-off-by: Isaac J. Manjarres <[email protected]>
This commit is contained in:
Liam Mark 2015-11-25 14:37:54 -08:00 • committed by Gerrit - the friendly Code Review server
commit 485b41f036
4 changed files with 93 additions and 1 deletions

View file

@ -1409,6 +1409,8 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
int swapwrite = current->flags & PF_SWAPWRITE;
int rc;
trace_mm_migrate_pages_start(mode, reason);
if (!swapwrite)
current->flags |= PF_SWAPWRITE;