]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
perf tools: Introduce hpp_dimension__add_output function
authorJiri Olsa <jolsa@kernel.org>
Tue, 6 Oct 2015 12:25:11 +0000 (14:25 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 6 Oct 2015 21:04:59 +0000 (18:04 -0300)
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
tools/perf/util/sort.h

index 8521e3c89b8d5ef6f0a553e87c9821d33da15789..2d8ccd4d9e1b7bd5231d35c2afaaec9078c86573 100644 (file)
@@ -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;
index 33b3d30e18d391c97459fa76d6fb065a8fcde722..31228851e397770d6b7567be00e7feb27435c8c0 100644 (file)
@@ -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 */