aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/kmemtrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/kmemtrace.c')
-rw-r--r--kernel/trace/kmemtrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index 7a0aa0e260db..9419ad10541b 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -42,6 +42,7 @@ static inline void kmemtrace_alloc(enum kmemtrace_type_id type_id,
42 gfp_t gfp_flags, 42 gfp_t gfp_flags,
43 int node) 43 int node)
44{ 44{
45 struct ftrace_event_call *call = &event_kmem_alloc;
45 struct trace_array *tr = kmemtrace_array; 46 struct trace_array *tr = kmemtrace_array;
46 struct kmemtrace_alloc_entry *entry; 47 struct kmemtrace_alloc_entry *entry;
47 struct ring_buffer_event *event; 48 struct ring_buffer_event *event;
@@ -62,6 +63,8 @@ static inline void kmemtrace_alloc(enum kmemtrace_type_id type_id,
62 entry->gfp_flags = gfp_flags; 63 entry->gfp_flags = gfp_flags;
63 entry->node = node; 64 entry->node = node;
64 65
66 filter_check_discard(call, entry, event);
67
65 ring_buffer_unlock_commit(tr->buffer, event); 68 ring_buffer_unlock_commit(tr->buffer, event);
66 69
67 trace_wake_up(); 70 trace_wake_up();
@@ -71,6 +74,7 @@ static inline void kmemtrace_free(enum kmemtrace_type_id type_id,
71 unsigned long call_site, 74 unsigned long call_site,
72 const void *ptr) 75 const void *ptr)
73{ 76{
77 struct ftrace_event_call *call = &event_kmem_free;
74 struct trace_array *tr = kmemtrace_array; 78 struct trace_array *tr = kmemtrace_array;
75 struct kmemtrace_free_entry *entry; 79 struct kmemtrace_free_entry *entry;
76 struct ring_buffer_event *event; 80 struct ring_buffer_event *event;
@@ -86,6 +90,8 @@ static inline void kmemtrace_free(enum kmemtrace_type_id type_id,
86 entry->call_site = call_site; 90 entry->call_site = call_site;
87 entry->ptr = ptr; 91 entry->ptr = ptr;
88 92
93 filter_check_discard(call, entry, event);
94
89 ring_buffer_unlock_commit(tr->buffer, event); 95 ring_buffer_unlock_commit(tr->buffer, event);
90 96
91 trace_wake_up(); 97 trace_wake_up();