It'll be used for hierarchy output mode to indent entries properly.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1456326830-30456-9-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
void perf_hpp_list__register_sort_field(struct perf_hpp_list *list,
struct perf_hpp_fmt *format)
{
+ if (perf_hpp__is_sort_entry(format) || perf_hpp__is_dynamic_entry(format))
+ list->nr_sort_keys++;
+
list_add_tail(&format->sort_list, &list->sorts);
}
struct perf_hpp_list {
struct list_head fields;
struct list_head sorts;
+ int nr_sort_keys;
};
extern struct perf_hpp_list perf_hpp_list;