Commit beeaaeb3 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

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: default avatarJiri Olsa <jolsa@kernel.org>
Acked-by: default avatarNamhyung 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 0974d2c9
...@@ -1577,6 +1577,12 @@ static int __hpp_dimension__add_output(struct hpp_dimension *hd) ...@@ -1577,6 +1577,12 @@ static int __hpp_dimension__add_output(struct hpp_dimension *hd)
return 0; 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) int sort_dimension__add(const char *tok)
{ {
unsigned int i; unsigned int i;
......
...@@ -234,4 +234,6 @@ void perf_hpp__set_elide(int idx, bool elide); ...@@ -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); int report_parse_ignore_callees_opt(const struct option *opt, const char *arg, int unset);
bool is_strict_order(const char *order); bool is_strict_order(const char *order);
int hpp_dimension__add_output(unsigned col);
#endif /* __PERF_SORT_H */ #endif /* __PERF_SORT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment