From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: tglx@linutronix.de, hpa@zytor.com, a.p.zijlstra@chello.nl,
namhyung@kernel.org, jolsa@kernel.org, dsahern@gmail.com,
mingo@kernel.org, acme@redhat.com, linux-kernel@vger.kernel.org
Subject: [tip:perf/core] perf tools: Introduce hpp_dimension__add_output function
Date: Thu, 8 Oct 2015 02:46:09 -0700 [thread overview]
Message-ID: <tip-beeaaeb3684d97e89548c1b6b6275329214014df@git.kernel.org> (raw)
In-Reply-To: <1444134312-29136-3-git-send-email-jolsa@kernel.org>
Commit-ID: beeaaeb3684d97e89548c1b6b6275329214014df
Gitweb: http://git.kernel.org/tip/beeaaeb3684d97e89548c1b6b6275329214014df
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Tue, 6 Oct 2015 14:25:11 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 6 Oct 2015 18:04:59 -0300
perf tools: Introduce hpp_dimension__add_output function
This function will allow to register output column from ui code and
respect taken sort/output dimensions.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1444134312-29136-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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 8521e3c..2d8ccd4 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 33b3d30..3122885 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 */
next prev parent reply other threads:[~2015-10-08 9:46 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 ` [PATCH 2/3] perf tools: Introduce hpp_dimension__add_output function Jiri Olsa
2015-10-08 9:46 ` tip-bot for Jiri Olsa [this message]
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=tip-beeaaeb3684d97e89548c1b6b6275329214014df@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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.