From: Ingo Molnar <mingo@elte.hu>
To: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: Li Zefan <lizf@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] kmemtrace: print binary output only if 'bin' option is set
Date: Fri, 3 Jul 2009 11:55:47 +0200 [thread overview]
Message-ID: <20090703095547.GE21141@elte.hu> (raw)
In-Reply-To: <20090703095456.GA3505@localhost>
* Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro> wrote:
> On Fri, Jul 03, 2009 at 05:34:24PM +0800, Li Zefan wrote:
> > Currently by default the output of kmemtrace is binary format instead
> > of human-readable output.
> >
> > This patch makes the following changes:
> > - We'll see human-readable output by default
> > - We'll see binary output if 'bin' option is set
> >
> > Note: you may probably need to explicitly disable context-info binary
> > output:
> >
> > # echo 0 > options/context-info
> > # echo 1 > options/bin
> > # cat trace_pipe
> >
> > v2:
> > - use %pF to print call_site
> >
> > Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> > Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
> > Acked-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
> > ---
> > kernel/trace/kmemtrace.c | 120 ++++++++++++++++++++++++++++++++++-----------
> > 1 files changed, 90 insertions(+), 30 deletions(-)
> >
> > diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
> > index 1edaa95..74903b6 100644
> > --- a/kernel/trace/kmemtrace.c
> > +++ b/kernel/trace/kmemtrace.c
> > @@ -239,12 +239,52 @@ 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 %pF ptr %lu "
> > + "bytes_req %lu bytes_alloc %lu gfp_flags %lu node %d\n",
> > + entry->type_id, (void *)entry->call_site, (unsigned long)entry->ptr,
> > + (unsigned long)entry->bytes_req, (unsigned long)entry->bytes_alloc,
> > + (unsigned long)entry->gfp_flags, entry->node);
> > +
> > + if (!ret)
> > + return TRACE_TYPE_PARTIAL_LINE;
> > + return TRACE_TYPE_HANDLED;
> > +}
>
> [snip]
>
> kmemtrace_print_alloc_user() is meant for kmemtrace-user, that's
> what the naming is meant to convey. Also,
> kmemtrace_print_alloc_user_bin is kinda long. Could you leave the
> former as it was and come up with another name for the non-binary
> variant?
should i hold off on this patch for now?
Ingo
next prev parent reply other threads:[~2009-07-03 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-03 9:34 Li Zefan
2009-07-03 9:43 ` Ingo Molnar
2009-07-03 9:54 ` Eduard - Gabriel Munteanu
2009-07-03 9:55 ` Ingo Molnar [this message]
2009-07-03 10:21 ` [tip:tracing/core] kmemtrace: Print " tip-bot for Li Zefan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090703095547.GE21141@elte.hu \
--to=mingo@elte.hu \
--cc=eduard.munteanu@linux360.ro \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=penberg@cs.helsinki.fi \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome