]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tue, 5 Nov 2013 05:55:55 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:55 +0000 (16:55 +1100)
commita4293542fcda355c71ac8fcdad093dc70dafb791
tree1632ae302c971fed0611bbdf45967c3d82419f06
parentaae15391bdc3c8a219ccba5d6f4eeb9cefdb9e92
mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()

In general, every tracepoint should be zero overhead if it is disabled.
However, trace_mm_page_alloc_extfrag() is one of exception.  It evaluate
"new_type == start_migratetype" even if tracepoint is disabled.

However, the code can be moved into tracepoint's TP_fast_assign() and
TP_fast_assign exist exactly such purpose.  This patch does it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/trace/events/kmem.h
mm/page_alloc.c