Bug fixes
[cbs-scheduler.git] / include / trace / kmemtrace.h
blob28ee69f9cd46d73159c362729ceb1e50c0d3cd10
1 /*
2 * Copyright (C) 2008 Eduard - Gabriel Munteanu
4 * This file is released under GPL version 2.
5 */
7 #ifndef _LINUX_KMEMTRACE_H
8 #define _LINUX_KMEMTRACE_H
10 #ifdef __KERNEL__
12 #include <linux/tracepoint.h>
13 #include <linux/types.h>
15 #ifdef CONFIG_KMEMTRACE
16 extern void kmemtrace_init(void);
17 #else
18 static inline void kmemtrace_init(void)
21 #endif
23 DECLARE_TRACE(kmalloc,
24 TP_PROTO(unsigned long call_site,
25 const void *ptr,
26 size_t bytes_req,
27 size_t bytes_alloc,
28 gfp_t gfp_flags),
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,
32 const void *ptr,
33 size_t bytes_req,
34 size_t bytes_alloc,
35 gfp_t gfp_flags),
36 TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags));
37 DECLARE_TRACE(kmalloc_node,
38 TP_PROTO(unsigned long call_site,
39 const void *ptr,
40 size_t bytes_req,
41 size_t bytes_alloc,
42 gfp_t gfp_flags,
43 int node),
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,
47 const void *ptr,
48 size_t bytes_req,
49 size_t bytes_alloc,
50 gfp_t gfp_flags,
51 int node),
52 TP_ARGS(call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node));
53 DECLARE_TRACE(kfree,
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 */