diff options
author | Jiri Olsa <[email protected]> | 2016-09-22 17:36:43 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-10-19 13:18:31 -0300 |
commit | 5f2eca833cc244c6872e83fb4a5faaae1c0a87b7 (patch) | |
tree | 9fe29cb9b9cd25825b815dbfd5c141608483faa3 | |
parent | 8d3f938dc757549dd75d1b4df4f7faf92dc5dfc3 (diff) |
perf c2c report: Fallback to standard dimensions
Fallback to standard dimensions in case we don't find the dimension
within c2c ones.
Signed-off-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Joe Mario <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/builtin-c2c.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 6b58b537bc9d..a3481f86e2ae 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -213,8 +213,10 @@ static int c2c_hists__init_output(struct perf_hpp_list *hpp_list, char *name) { struct c2c_fmt *c2c_fmt = get_format(name); - if (!c2c_fmt) - return -1; + if (!c2c_fmt) { + reset_dimensions(); + return output_field_add(hpp_list, name); + } perf_hpp_list__column_register(hpp_list, &c2c_fmt->fmt); return 0; @@ -224,8 +226,10 @@ static int c2c_hists__init_sort(struct perf_hpp_list *hpp_list, char *name) { struct c2c_fmt *c2c_fmt = get_format(name); - if (!c2c_fmt) - return -1; + if (!c2c_fmt) { + reset_dimensions(); + return sort_dimension__add(hpp_list, name, NULL, 0); + } perf_hpp_list__register_sort_field(hpp_list, &c2c_fmt->fmt); return 0; |