diff options
Diffstat (limited to 'kernel/trace/kmemtrace.c')
-rw-r--r-- | kernel/trace/kmemtrace.c | 28 |
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 | ||
245 | static enum print_line_t | 245 | static enum print_line_t |
246 | kmemtrace_print_alloc(struct trace_iterator *iter, int flags) | 246 | kmemtrace_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 | ||
265 | static enum print_line_t | 266 | static enum print_line_t |
266 | kmemtrace_print_free(struct trace_iterator *iter, int flags) | 267 | kmemtrace_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 | ||
283 | static enum print_line_t | 285 | static enum print_line_t |
284 | kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags) | 286 | kmemtrace_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 | ||
317 | static enum print_line_t | 320 | static enum print_line_t |
318 | kmemtrace_print_free_user(struct trace_iterator *iter, int flags) | 321 | kmemtrace_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 | ||
472 | static struct trace_event kmem_trace_alloc = { | 476 | static 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 | ||
478 | static struct trace_event kmem_trace_free = { | 481 | static struct trace_event kmem_trace_alloc = { |
479 | .type = TRACE_KMEM_FREE, | 482 | .type = TRACE_KMEM_ALLOC, |
483 | .funcs = &kmem_trace_alloc_funcs, | ||
484 | }; | ||
485 | |||
486 | static 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 | ||
491 | static struct trace_event kmem_trace_free = { | ||
492 | .type = TRACE_KMEM_FREE, | ||
493 | .funcs = &kmem_trace_free_funcs, | ||
494 | }; | ||
495 | |||
484 | static struct tracer kmem_tracer __read_mostly = { | 496 | static struct tracer kmem_tracer __read_mostly = { |
485 | .name = "kmemtrace", | 497 | .name = "kmemtrace", |
486 | .init = kmem_trace_init, | 498 | .init = kmem_trace_init, |