kmemtrace: use tracepoints
kmemtrace now uses tracepoints instead of markers. We no longer need to use format specifiers to pass arguments. Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> [ folded: Use the new TP_PROTO and TP_ARGS to fix the build. ] [ folded: fix build when CONFIG_KMEMTRACE is disabled. ] [ folded: define tracepoints when CONFIG_TRACEPOINTS is enabled. ] Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> LKML-Reference: <ae61c0f37156db8ec8dc0d5778018edde60a92e3.1237813499.git.eduard.munteanu@linux360.ro> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
ac44021fcc
commit
ca2b84cb3c
16
mm/util.c
16
mm/util.c
@@ -4,6 +4,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/tracepoint.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/**
|
||||
@@ -236,3 +237,18 @@ int __attribute__((weak)) get_user_pages_fast(unsigned long start,
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_user_pages_fast);
|
||||
|
||||
/* Tracepoints definitions. */
|
||||
DEFINE_TRACE(kmalloc);
|
||||
DEFINE_TRACE(kmem_cache_alloc);
|
||||
DEFINE_TRACE(kmalloc_node);
|
||||
DEFINE_TRACE(kmem_cache_alloc_node);
|
||||
DEFINE_TRACE(kfree);
|
||||
DEFINE_TRACE(kmem_cache_free);
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL(kmalloc);
|
||||
EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc);
|
||||
EXPORT_TRACEPOINT_SYMBOL(kmalloc_node);
|
||||
EXPORT_TRACEPOINT_SYMBOL(kmem_cache_alloc_node);
|
||||
EXPORT_TRACEPOINT_SYMBOL(kfree);
|
||||
EXPORT_TRACEPOINT_SYMBOL(kmem_cache_free);
|
||||
|
Reference in New Issue
Block a user