]> git.baikalelectronics.ru Git - kernel.git/commit
mm: get rid of unnecessary overhead of trace_mm_page_alloc_extfrag()
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tue, 12 Nov 2013 23:08:19 +0000 (15:08 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:10 +0000 (12:09 +0900)
commitd70b1758639b127138b91d40d318abb1c3921103
tree396299d23b3bf478770d4030000851ebd29223cf
parentc5240bb4d7fc4e94d6df77ecb9a90e072d05b042
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/trace/events/kmem.h
mm/page_alloc.c