perf hist: Support block formats with compare/sort/display
authorJin Yao <yao.jin@linux.intel.com>
Thu, 7 Nov 2019 07:47:16 +0000 (15:47 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 7 Nov 2019 13:14:05 +0000 (10:14 -0300)
commitb65a7d372b1a55db6fb48a5b3c48941eb68716cb
tree223ffa25506c6fffccb97281d25109cbc0d0cf37
parent7841f40aed933dd3838f8d9f2dfcf286c352b7ee
perf hist: Support block formats with compare/sort/display

This patch provides helper routines to support new columns for block
info output.

The new columns are:

  Sampled Cycles%
  Sampled Cycles
  Avg Cycles%
  Avg Cycles
  [Program Block Range]
  Shared Object

 v5:
 ---
 1. Move more block related functions from builtin-report.c to
    block-info.c

 2. Set ms (map+sym) in block hist_entry. Because this info
    is needed for reporting the block range (i.e. source line)

Committer notes:

Remove unused set_fmt() function, some build were not completing with:

  util/block-info.c:396:20: error: unused function 'set_fmt' [-Werror,-Wunused-function]
  static inline void set_fmt(struct block_fmt *block_fmt,
                     ^
  1 error generated.

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20191107074719.26139-5-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/block-info.c
tools/perf/util/block-info.h
tools/perf/util/hist.c