Skip to content

perf tools: Fix scalability problem on callchain merging

Namhyung Kim lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3perf callchain: Convert children list to rbtreetools/perf/util/callchain.c tools/perf/util/callchain.h+116 -407 replies
2/3perf ui/progress: Add new helper functions for progress bartools/perf/ui/progress.c tools/perf/ui/progress.h tools/perf/util/session.c+37 -130 replies
3/3perf tools: Show progress on histogram collapsingtools/perf/builtin-annotate.c tools/perf/builtin-diff.c tools/perf/builtin-report.c +4 more+20 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] perf tools: Fix scalability problem on callchain merging

Hello,

Linus reported that perf report was stuck in after "processing time ordered events". It turned out that merging/collapsing the callchain takes most of time to look up a matching callchain. Since it did a linear search for the lookup, it took more than 95% of time during the processing huge file that contains callchains.

This patchset tries to fix the problem by

1. converting children list to a rbtree
2. add UI progress window to inform user

With this patch, processing time of 400MB perf.data file went down from 380s to 20s.

Thanks,
Namhyung

Namhyung Kim (3):
perf callchain: Convert children list to rbtree perf ui/progress: Add new helper functions for progress bar perf tools: Show progress on histogram collapsing

 tools/perf/builtin-annotate.c |   2 +-
 tools/perf/builtin-diff.c     |   2 +-
 tools/perf/builtin-report.c   |  10 ++-
 tools/perf/builtin-top.c      |   4 +-
 tools/perf/tests/hists_link.c |   2 +-
 tools/perf/ui/progress.c      |  18 +++++
 tools/perf/ui/progress.h      |  10 +++
 tools/perf/util/callchain.c   | 151 ++++++++++++++++++++++++++++++++----------
 tools/perf/util/callchain.h   |   5 +-
 tools/perf/util/hist.c        |   5 +-
 tools/perf/util/hist.h        |   3 +-
 tools/perf/util/session.c     |  22 +++---
 12 files changed, 173 insertions(+), 61 deletions(-)
Signature · 1 line
1.7.11.7