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 <peterz@infradead.org>,
Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Andi Kleen <andi@firstfloor.org>,
Stephane Eranian <eranian@google.com>,
Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH v6 16/25] perf ui/stdio: Implement hierarchy output mode
Date: Sun, 21 Feb 2016 17:43:56 +0900 [thread overview]
Message-ID: <20160221084356.GC32589@danjae.kornet> (raw)
In-Reply-To: <20160220231856.GB17925@krava.homerouter.cpe>
On Sun, Feb 21, 2016 at 12:18:56AM +0100, Jiri Olsa wrote:
> On Tue, Feb 16, 2016 at 11:08:34PM +0900, Namhyung Kim wrote:
>
> SNIP
>
> > +static int hist_entry__hierarchy_fprintf(struct hist_entry *he,
> > + struct perf_hpp *hpp,
> > + int nr_sort_key, struct hists *hists,
> > + FILE *fp)
> > +{
> > + const char *sep = symbol_conf.field_sep;
> > + struct perf_hpp_fmt *fmt;
> > + char *buf = hpp->buf;
> > + int ret, printed = 0;
> > + bool first = true;
> > +
> > + if (symbol_conf.exclude_other && !he->parent)
> > + return 0;
> > +
> > + ret = scnprintf(hpp->buf, hpp->size, "%*s", he->depth * HIERARCHY_INDENT, "");
> > + advance_hpp(hpp, ret);
> > +
> > + hists__for_each_format(he->hists, fmt) {
> > + if (perf_hpp__is_sort_entry(fmt) || perf_hpp__is_dynamic_entry(fmt))
> > + break;
> > +
> > + /*
> > + * If there's no field_sep, we still need
> > + * to display initial ' '.
> > + */
> > + if (!sep || !first) {
> > + ret = scnprintf(hpp->buf, hpp->size, "%s", sep ?: " ");
> > + advance_hpp(hpp, ret);
> > + } else
> > + first = false;
> > +
> > + if (perf_hpp__use_color() && fmt->color)
> > + ret = fmt->color(fmt, hpp, he);
> > + else
> > + ret = fmt->entry(fmt, hpp, he);
> > +
> > + advance_hpp(hpp, ret);
>
> there's new hist_entry__snprintf_alignment function for
> proper alignment now used in hist_entry__hierarchy_fprintf
>
> you might wat to use it in here as well
Ah missed that, will change.
Btw it seems it's not strictly needed here since the hierarchy mode
makes each column as the last though. But I agree that it's a general
change and can be applied here as well.
Thanks,
Namhyung
next prev parent reply other threads:[~2016-02-21 18:09 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 14:08 [PATCHSET 00/25] perf tools: Add support for hierachy view (v6) Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 01/25] perf hists browser: Fix percentage update on key press Namhyung Kim
2016-02-16 20:06 ` Arnaldo Carvalho de Melo
2016-02-16 20:53 ` Arnaldo Carvalho de Melo
2016-02-16 23:39 ` Namhyung Kim
2016-02-17 13:41 ` Arnaldo Carvalho de Melo
2016-02-20 11:39 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 02/25] perf callchain: Check return value of add_child() Namhyung Kim
2016-02-20 11:39 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 03/25] perf callchain: Check return value of fill_node() Namhyung Kim
2016-02-20 11:39 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 04/25] perf callchain: Add enum match_result for match_chain() Namhyung Kim
2016-02-20 11:40 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 05/25] perf callchain: Check return value of split_add_child() Namhyung Kim
2016-02-20 11:40 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 06/25] perf callchain: Check return value of append_chain_children() Namhyung Kim
2016-02-20 11:40 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 07/25] perf hists: Return error from hists__collapse_resort() Namhyung Kim
2016-02-20 11:41 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 08/25] perf report: Check error during report__collapse_hists() Namhyung Kim
2016-02-20 11:41 ` [tip:perf/core] " tip-bot for Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 09/25] perf hists: Basic support of hierarchical report view Namhyung Kim
2016-02-20 23:18 ` Jiri Olsa
2016-02-21 8:32 ` Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 10/25] perf hists: Resort hist entries with hierarchy Namhyung Kim
2016-02-20 23:19 ` Jiri Olsa
2016-02-21 8:36 ` Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 11/25] perf hists: Add helper functions for hierarchy mode Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 12/25] perf hists: Introduce hist_entry__filter() Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 13/25] perf hists: Support filtering in hierarchy mode Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 14/25] perf hists: Resort after filtering hierarchy Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 15/25] perf hists: Count number of sort keys Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 16/25] perf ui/stdio: Implement hierarchy output mode Namhyung Kim
2016-02-20 23:18 ` Jiri Olsa
2016-02-21 8:43 ` Namhyung Kim [this message]
2016-02-16 14:08 ` [PATCH v6 17/25] perf ui/stdio: Align column header for hierarchy output Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 18/25] perf hists browser: Count number of hierarchy entries Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 19/25] perf hists browser: Support collapsing/expanding whole entries in hierarchy Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 20/25] perf hists browser: Implement hierarchy output Namhyung Kim
2016-02-20 23:19 ` Jiri Olsa
2016-02-16 14:08 ` [PATCH v6 21/25] perf hists browser: Align column header in hierarchy mode Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 22/25] perf ui/gtk: Implement hierarchy output mode Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 23/25] perf report: Add --hierarchy option Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 24/25] perf hists: Support decaying in hierarchy mode Namhyung Kim
2016-02-16 14:08 ` [PATCH v6 25/25] perf top: Add --hierarchy option Namhyung Kim
2016-02-20 23:19 ` Jiri Olsa
2016-02-21 9:19 ` Namhyung Kim
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=20160221084356.GC32589@danjae.kornet \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.