Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754034AbZGBMz0 (ORCPT ); Thu, 2 Jul 2009 08:55:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752957AbZGBMzQ (ORCPT ); Thu, 2 Jul 2009 08:55:16 -0400 Received: from hrndva-omtalb.mail.rr.com ([71.74.56.123]:62056 "EHLO hrndva-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752045AbZGBMzP (ORCPT ); Thu, 2 Jul 2009 08:55:15 -0400 Date: Thu, 2 Jul 2009 08:55:16 -0400 (EDT) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Li Zefan cc: Ingo Molnar , Frederic Weisbecker , Pekka Enberg , Eduard - Gabriel Munteanu , LKML Subject: Re: [PATCH] kmemtrace: print binary output only if 'bin' option is set In-Reply-To: <4A4C4FEA.6010109@cn.fujitsu.com> Message-ID: References: <4A4C4FEA.6010109@cn.fujitsu.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1460 Lines: 39 On Thu, 2 Jul 2009, Li Zefan wrote: > --- > kernel/trace/kmemtrace.c | 119 ++++++++++++++++++++++++++++++++++------------ > 1 files changed, 89 insertions(+), 30 deletions(-) > > diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c > index 1edaa95..9a58f37 100644 > --- a/kernel/trace/kmemtrace.c > +++ b/kernel/trace/kmemtrace.c > @@ -239,12 +239,51 @@ struct kmemtrace_user_event_alloc { > }; > > static enum print_line_t > -kmemtrace_print_alloc_user(struct trace_iterator *iter, > - struct kmemtrace_alloc_entry *entry) > +kmemtrace_print_alloc_user(struct trace_iterator *iter, int flags) > +{ > + struct trace_seq *s = &iter->seq; > + struct kmemtrace_alloc_entry *entry; > + int ret; > + > + trace_assign_type(entry, iter->ent); > + > + ret = trace_seq_printf(s, "type_id %d call_site %lu ptr %lu " > + "bytes_req %lu bytes_alloc %lu gfp_flags %lu node %d\n", > + entry->type_id, entry->call_site, (unsigned long)entry->ptr, > + (unsigned long)entry->bytes_req, (unsigned long)entry->bytes_alloc, > + (unsigned long)entry->gfp_flags, entry->node); Could we make the call_site %pF ? That way we can see the name of the function and not just the address. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/