Commit-ID: 676a628ddd84753eaba571146e081f98d9a4c757 Gitweb: http://git.kernel.org/tip/676a628ddd84753eaba571146e081f98d9a4c757 Author: Pekka Enberg <penberg@xxxxxxxxxxxxxx> AuthorDate: Tue, 24 Mar 2009 15:40:17 +0200 Committer: Ingo Molnar <mingo@xxxxxxx> CommitDate: Tue, 24 Mar 2009 14:59:05 +0100 kmemtrace: define tracepoints when CONFIG_TRACEPOINTS is enabled Impact: fix build If CONFIG_KMEMTRACE is disabled but CONFIG_TRACEPOINTS is enabled, we need to define the tracepoints; otherwise linkage fails: LD .tmp_vmlinux1 arch/x86/kernel/built-in.o: In function `sys_ioperm': (.text+0x3743): undefined reference to `__tracepoint_kmalloc' arch/x86/kernel/built-in.o: In function `sys_ioperm': (.text+0x3784): undefined reference to `__tracepoint_kmalloc' arch/x86/kernel/built-in.o: In function `cache_sysfs_init': intel_cacheinfo.c:(.cpuinit.text+0x5f3): undefined reference to `__tracepoint_kmalloc' intel_cacheinfo.c:(.cpuinit.text+0x768): undefined reference to `__tracepoint_kmalloc' arch/x86/mm/built-in.o: In function `reserve_memtype': (.text+0x2fb3): undefined reference to `__tracepoint_kmalloc' Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Cc: Eduard - Gabriel Munteanu <eduard.munteanu@xxxxxxxxxxx> LKML-Reference: <1237902017.25315.90.camel@penberg-laptop> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> --- kernel/trace/kmemtrace.c | 15 --------------- mm/util.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c index 53b9c7c..5011f4d 100644 --- a/kernel/trace/kmemtrace.c +++ b/kernel/trace/kmemtrace.c @@ -17,21 +17,6 @@ #include "trace_output.h" #include "trace.h" -/* 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); - /* Select an alternative, minimalistic output than the original one */ #define TRACE_KMEM_OPT_MINIMAL 0x1 diff --git a/mm/util.c b/mm/util.c index 37eaccd..8d4b900 100644 --- a/mm/util.c +++ b/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> /** @@ -206,3 +207,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); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html