From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Minchan Kim <minchan@kernel.org>,
Joonsoo Kim <js1304@gmail.com>
Subject: Re: [PATCH 4/6] perf kmem: Analyze page allocator events also
Date: Fri, 13 Mar 2015 00:11:47 +0900 [thread overview]
Message-ID: <20150312151147.GB1398@danjae> (raw)
In-Reply-To: <20150312110127.GD8369@krava.redhat.com>
Hi Jiri,
On Thu, Mar 12, 2015 at 12:01:27PM +0100, Jiri Olsa wrote:
> On Thu, Mar 12, 2015 at 04:32:49PM +0900, Namhyung Kim wrote:
>
> SNIP
>
> > +static int parse_slab_opt(const struct option *opt __maybe_unused,
> > + const char *arg __maybe_unused,
> > + int unset __maybe_unused)
> > +{
> > + kmem_slab = (kmem_page + 1);
> > + return 0;
> > +}
> > +
> > +static int parse_page_opt(const struct option *opt __maybe_unused,
> > + const char *arg __maybe_unused,
> > + int unset __maybe_unused)
> > +{
> > + kmem_page = (kmem_slab + 1);
> > + return 0;
> > +}
>
> hum, just curious.. why not just assign 1, I'm missing the magic ;-)
Well, basically I just followed the existing convention. :)
Anyway it controls the effect of -s/--sort option. The single -s
option will be used to set sort keys for both of --alloc and --caller
stat. So it needs to known currently selected mode at option parsing
time. I extended it to page/slab selection also.
For example,
# perf kmem --page --alloc -s bytes --slab --caller -s hit
The first -s option will set sort keys for page/alloc stat and the
second -s option will set sort keys for slab/caller stat. So the -s
option should be preceded by at least one of the mode selection
options (i.e. --page/slab/alloc/caller). I'll add it to the man page
also.
Thanks,
Namhyung
next prev parent reply other threads:[~2015-03-12 15:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 7:32 [RFC/PATCHSET 0/6] perf kmem: Implement page allocation analysis (v1) Namhyung Kim
2015-03-12 7:32 ` [PATCH 1/6] perf kmem: Fix segfault when invalid sort key is given Namhyung Kim
2015-03-14 7:06 ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-12 7:32 ` [PATCH 2/6] perf kmem: Allow -v option Namhyung Kim
2015-03-14 7:06 ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-12 7:32 ` [PATCH 3/6] perf kmem: Fix alignment of slab result table Namhyung Kim
2015-03-14 7:07 ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-03-12 7:32 ` [PATCH 4/6] perf kmem: Analyze page allocator events also Namhyung Kim
2015-03-12 11:01 ` Jiri Olsa
2015-03-12 15:11 ` Namhyung Kim [this message]
2015-03-12 7:32 ` [PATCH 5/6] perf kmem: Implement stat --page --caller Namhyung Kim
2015-03-12 7:32 ` [PATCH 6/6] perf kmem: Support sort keys on page analysis Namhyung Kim
2015-03-12 10:41 ` [RFC/PATCHSET 0/6] perf kmem: Implement page allocation analysis (v1) Ingo Molnar
2015-03-12 14:58 ` Namhyung Kim
2015-03-12 15:54 ` Ingo Molnar
2015-03-13 8:19 ` Namhyung Kim
2015-03-13 12:44 ` Ingo Molnar
2015-03-16 2:06 ` Namhyung Kim
2015-03-16 2:10 ` Namhyung Kim
2015-03-16 8:26 ` Ingo Molnar
2015-03-16 8:35 ` Namhyung Kim
2015-03-16 8:43 ` Ingo Molnar
2015-03-12 19:07 ` Arnaldo Carvalho de Melo
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=20150312151147.GB1398@danjae \
--to=namhyung@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mingo@kernel.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;
as well as URLs for NNTP newsgroup(s).