From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 2/3] perf tools: Introduce hpp_dimension__add_output function
Date: Tue, 6 Oct 2015 14:25:11 +0200 [thread overview]
Message-ID: <1444134312-29136-3-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1444134312-29136-1-git-send-email-jolsa@kernel.org>
This function will allow to register output column from ui
code and respect taken sort/output dimensions.
Link: http://lkml.kernel.org/n/tip-mzlrgdrqs2tciq65bp8ys8jz@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/util/sort.c | 6 ++++++
tools/perf/util/sort.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 8521e3c89b8d..2d8ccd4d9e1b 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -1577,6 +1577,12 @@ static int __hpp_dimension__add_output(struct hpp_dimension *hd)
return 0;
}
+int hpp_dimension__add_output(unsigned col)
+{
+ BUG_ON(col >= PERF_HPP__MAX_INDEX);
+ return __hpp_dimension__add_output(&hpp_sort_dimensions[col]);
+}
+
int sort_dimension__add(const char *tok)
{
unsigned int i;
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 33b3d30e18d3..31228851e397 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -234,4 +234,6 @@ void perf_hpp__set_elide(int idx, bool elide);
int report_parse_ignore_callees_opt(const struct option *opt, const char *arg, int unset);
bool is_strict_order(const char *order);
+
+int hpp_dimension__add_output(unsigned col);
#endif /* __PERF_SORT_H */
--
2.4.3
next prev parent reply other threads:[~2015-10-06 12:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 12:25 [RFC 0/3] perf tools: Make perf_hpp__init respect output dimensions Jiri Olsa
2015-10-06 12:25 ` [PATCH 1/3] perf tools: Get rid of superfluos call to reset_dimensions Jiri Olsa
2015-10-08 9:45 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-10-06 12:25 ` Jiri Olsa [this message]
2015-10-08 9:46 ` [tip:perf/core] perf tools: Introduce hpp_dimension__add_output function tip-bot for Jiri Olsa
2015-10-06 12:25 ` [PATCH 3/3] perf tools: Use hpp_dimension__add_output to register hpp columns Jiri Olsa
2015-10-06 13:37 ` Arnaldo Carvalho de Melo
2015-10-08 9:46 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-10-06 14:04 ` [RFC 0/3] perf tools: Make perf_hpp__init respect output dimensions Namhyung Kim
2015-10-06 14:28 ` 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=1444134312-29136-3-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@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 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.