From 228f14f2cbf481e0ec0bd0c7f947383cfa2d5167 Mon Sep 17 00:00:00 2001 From: Yunlong Song Date: Mon, 23 Mar 2015 11:50:05 +0800 Subject: perf tools: Remove (null) value of "Sort order" for perf mem report When '--sort' is not set, 'perf mem report" will print a null pointer as the output value of sort order, so fix it. Example: Before this patch: $ perf mem report # To display the perf.data header info, please use --header/--header-only options. # # Samples: 18 of event 'cpu/mem-loads/pp' # Total weight : 188 # Sort order : (null) # ... After this patch: $ perf mem report # To display the perf.data header info, please use --header/--header-only options. # # Samples: 18 of event 'cpu/mem-loads/pp' # Total weight : 188 # Sort order : local_weight,mem,sym,dso,symbol_daddr,dso_daddr,snoop,tlb,locked # ... Signed-off-by: Yunlong Song Acked-by: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Wang Nan Link: http://lkml.kernel.org/r/1427082605-12881-1-git-send-email-yunlong.song@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/sort.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/perf/util/sort.h') diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 9c01b83..846036a 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -44,6 +44,7 @@ extern struct sort_entry sort_dso_to; extern struct sort_entry sort_sym_from; extern struct sort_entry sort_sym_to; extern enum sort_type sort__first_dimension; +extern const char default_mem_sort_order[]; struct he_stat { u64 period; -- cgit v1.1