2 * Copyright (C) 2008 Eduard - Gabriel Munteanu
4 * This file is released under GPL version 2.
7 #ifndef _LINUX_KMEMTRACE_H
8 #define _LINUX_KMEMTRACE_H
12 #include <linux/tracepoint.h>
13 #include <linux/types.h>
15 #ifdef CONFIG_KMEMTRACE
16 extern void kmemtrace_init(void);
18 static inline void kmemtrace_init(void)
23 DECLARE_TRACE(kmalloc,
24 TP_PROTO(unsigned long call_site,
29 TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags));
30 DECLARE_TRACE(kmem_cache_alloc,
31 TP_PROTO(unsigned long call_site,
36 TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags));
37 DECLARE_TRACE(kmalloc_node,
38 TP_PROTO(unsigned long call_site,
44 TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node));
45 DECLARE_TRACE(kmem_cache_alloc_node,
46 TP_PROTO(unsigned long call_site,
52 TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node));
54 TP_PROTO(unsigned long call_site, const void *ptr),
55 TP_ARGS(call_site, ptr));
56 DECLARE_TRACE(kmem_cache_free,
57 TP_PROTO(unsigned long call_site, const void *ptr),
58 TP_ARGS(call_site, ptr));
60 #endif /* __KERNEL__ */
62 #endif /* _LINUX_KMEMTRACE_H */