Re: [PATCH v3 3/5] perf report: Sort by sampled cycles percent per block for stdio

From: Jin, Yao
Date: Wed Oct 23 2019 - 09:11:46 EST




On 10/23/2019 7:36 PM, Jiri Olsa wrote:
On Tue, Oct 22, 2019 at 04:07:08PM +0800, Jin Yao wrote:

SNIP

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index 43d1d410854a..eb286700a8a9 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -492,6 +492,10 @@ struct sort_entry sort_sym_ipc_null = {
.se_width_idx = HISTC_SYMBOL_IPC,
};
+struct sort_entry sort_block_cycles = {
+ .se_cmp = sort__sym_cmp,
+};

so this is here only for you to be able to write '-s total_cycles'
and has no other functonality right?


Yes, that's right.

I think we'd be better with report boolean option instad, like
'perf report --total-cycles', because your code does the column
display by itself.. and we could get rid of this -s confusion


Yes, I agree. Thanks for this suggestion!

Thanks
Jin Yao

jirka