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.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index 7253d0c1c32f..bbfc1bb1660b 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -243,7 +243,8 @@ struct kmemtrace_user_event_alloc {
243}; 243};
244 244
245static enum print_line_t 245static enum print_line_t
246kmemtrace_print_alloc(struct trace_iterator *iter, int flags) 246kmemtrace_print_alloc(struct trace_iterator *iter, int flags,
247 struct trace_event *event)
247{ 248{
248 struct trace_seq *s = &iter->seq; 249 struct trace_seq *s = &iter->seq;
249 struct kmemtrace_alloc_entry *entry; 250 struct kmemtrace_alloc_entry *entry;
@@ -263,7 +264,8 @@ kmemtrace_print_alloc(struct trace_iterator *iter, int flags)
263} 264}
264 265
265static enum print_line_t 266static enum print_line_t
266kmemtrace_print_free(struct trace_iterator *iter, int flags) 267kmemtrace_print_free(struct trace_iterator *iter, int flags,
268 struct trace_event *event)
267{ 269{
268 struct trace_seq *s = &iter->seq; 270 struct trace_seq *s = &iter->seq;
269 struct kmemtrace_free_entry *entry; 271 struct kmemtrace_free_entry *entry;
@@ -281,7 +283,8 @@ kmemtrace_print_free(struct trace_iterator *iter, int flags)
281} 283}
282 284
283static enum print_line_t 285static enum print_line_t
284kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags) 286kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags,
287 struct trace_event *event)
285{ 288{
286 struct trace_seq *s = &iter->seq; 289 struct trace_seq *s = &iter->seq;
287 struct kmemtrace_alloc_entry *entry; 290 struct kmemtrace_alloc_entry *entry;
@@ -315,7 +318,8 @@ kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags)
315} 318}
316 319
317static enum print_line_t 320static enum print_line_t
318kmemtrace_print_free_user(struct trace_iterator *iter, int flags) 321kmemtrace_print_free_user(struct trace_iterator *iter, int flags,
322 struct trace_event *event)
319{ 323{
320 struct trace_seq *s = &iter->seq; 324 struct trace_seq *s = &iter->seq;
321 struct kmemtrace_free_entry *entry; 325 struct kmemtrace_free_entry *entry;
@@ -469,18 +473,26 @@ static enum print_line_t kmemtrace_print_line(struct trace_iterator *iter)
469 } 473 }
470} 474}
471 475
472static struct trace_event kmem_trace_alloc = { 476static struct trace_event_functions kmem_trace_alloc_funcs = {
473 .type = TRACE_KMEM_ALLOC,
474 .trace = kmemtrace_print_alloc, 477 .trace = kmemtrace_print_alloc,
475 .binary = kmemtrace_print_alloc_user, 478 .binary = kmemtrace_print_alloc_user,
476}; 479};
477 480
478static struct trace_event kmem_trace_free = { 481static struct trace_event kmem_trace_alloc = {
479 .type = TRACE_KMEM_FREE, 482 .type = TRACE_KMEM_ALLOC,
483 .funcs = &kmem_trace_alloc_funcs,
484};
485
486static struct trace_event_functions kmem_trace_free_funcs = {
480 .trace = kmemtrace_print_free, 487 .trace = kmemtrace_print_free,
481 .binary = kmemtrace_print_free_user, 488 .binary = kmemtrace_print_free_user,
482}; 489};
483 490
491static struct trace_event kmem_trace_free = {
492 .type = TRACE_KMEM_FREE,
493 .funcs = &kmem_trace_free_funcs,
494};
495
484static struct tracer kmem_tracer __read_mostly = { 496static struct tracer kmem_tracer __read_mostly = {
485 .name = "kmemtrace", 497 .name = "kmemtrace",
486 .init = kmem_trace_init, 498 .init = kmem_trace_init,