static enum print_line_t kmemtrace_print_line(struct trace_iterator *iter) { struct trace_entry *entry = iter->ent; switch (entry->type) { case TRACE_KMEM_ALLOC: { struct kmemtrace_alloc_entry *field; trace_assign_type(field, entry); if (kmem_tracer_flags.val & TRACE_KMEM_OPT_MINIMAL) return kmemtrace_print_alloc_compress(iter, field); else return kmemtrace_print_alloc_user(iter, field); } case TRACE_KMEM_FREE: { struct kmemtrace_free_entry *field; trace_assign_type(field, entry); if (kmem_tracer_flags.val & TRACE_KMEM_OPT_MINIMAL) return kmemtrace_print_free_compress(iter, field); else return kmemtrace_print_free_user(iter, field); } default: return TRACE_TYPE_UNHANDLED; } }
static enum print_line_t kmemtrace_print_line(struct trace_iterator *iter) { struct trace_entry *entry = iter->ent; if (!(kmem_tracer_flags.val & TRACE_KMEM_OPT_MINIMAL)) return TRACE_TYPE_UNHANDLED; switch (entry->type) { case TRACE_KMEM_ALLOC: return kmemtrace_print_alloc_compress(iter); case TRACE_KMEM_FREE: return kmemtrace_print_free_compress(iter); default: return TRACE_TYPE_UNHANDLED; } }