From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755889AbbJHJqb (ORCPT ); Thu, 8 Oct 2015 05:46:31 -0400 Received: from terminus.zytor.com ([198.137.202.10]:45888 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755776AbbJHJq3 (ORCPT ); Thu, 8 Oct 2015 05:46:29 -0400 Date: Thu, 8 Oct 2015 02:46:09 -0700 From: tip-bot for Jiri Olsa Message-ID: 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 Reply-To: linux-kernel@vger.kernel.org, acme@redhat.com, mingo@kernel.org, jolsa@kernel.org, dsahern@gmail.com, a.p.zijlstra@chello.nl, namhyung@kernel.org, tglx@linutronix.de, hpa@zytor.com In-Reply-To: <1444134312-29136-3-git-send-email-jolsa@kernel.org> References: <1444134312-29136-3-git-send-email-jolsa@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Introduce hpp_dimension__add_output function Git-Commit-ID: beeaaeb3684d97e89548c1b6b6275329214014df X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: beeaaeb3684d97e89548c1b6b6275329214014df Gitweb: http://git.kernel.org/tip/beeaaeb3684d97e89548c1b6b6275329214014df Author: Jiri Olsa AuthorDate: Tue, 6 Oct 2015 14:25:11 +0200 Committer: Arnaldo Carvalho de Melo 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 Acked-by: Namhyung Kim Cc: David Ahern Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1444134312-29136-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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 */