diff options
| author | Jin Yao <[email protected]> | 2019-11-07 07:47:13 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-11-07 12:08:03 +0000 |
| commit | 0bdf181fe0e5b6f6d5764ff482d7ae4707f8986b (patch) | |
| tree | 7892de5a8a6a469f13a0b5650434a4d094e6cfee /tools/perf/builtin-diff.c | |
| parent | perf tests: Fix out of bounds memory access (diff) | |
| download | kernel-0bdf181fe0e5b6f6d5764ff482d7ae4707f8986b.tar.gz kernel-0bdf181fe0e5b6f6d5764ff482d7ae4707f8986b.zip | |
perf diff: Don't use hack to skip column length calculation
Previously we use a nasty hack to skip the hists__calc_col_len for block
since this function is not very suitable for block column length
calculation.
This patch removes the hack code and add a check at the entry of
hists__calc_col_len to skip for block case.
Signed-off-by: Jin Yao <[email protected]>
Reviewed-by: Jiri Olsa <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-diff.c')
| -rw-r--r-- | tools/perf/builtin-diff.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 5281629c27b1..faf99a81ad3e 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -765,13 +765,6 @@ static void block_hists_match(struct hists *hists_base, } } -static int filter_cb(struct hist_entry *he, void *arg __maybe_unused) -{ - /* Skip the calculation of column length in output_resort */ - he->filtered = true; - return 0; -} - static void hists__precompute(struct hists *hists) { struct rb_root_cached *root; @@ -820,8 +813,8 @@ static void hists__precompute(struct hists *hists) if (bh->valid && pair_bh->valid) { block_hists_match(&bh->block_hists, &pair_bh->block_hists); - hists__output_resort_cb(&pair_bh->block_hists, - NULL, filter_cb); + hists__output_resort(&pair_bh->block_hists, + NULL); } break; default: |
