Skip to content

Try to avoid some qsorts

Ian Rogers linux-perf-users lkml 1 version Applied

Status from this message: Applied to perf-tools-next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2perf comm str: Avoid sort during inserttools/perf/util/comm.c+18 -111 reply
2/2perf dsos: When adding a dso into sorted dsos maintain the sort ordertools/perf/util/dsos.c+21 -51 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchMatt FlemingNamhyung Kim
1/2T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/2] Try to avoid some qsorts

Reference count checking doesn't work well with rbtree due to the need for counts on each child and parent edge. As such the reference count checking changes removed rbtree and replaced them with sorted arrays. There have been instances where sorting has been shown to be a regression:
https://lore.kernel.org/lkml/[email protected]/

These patches address a further 2 cases in comm and dsos, avoiding a sort when the array is already sorted at the cost of an O(n) memmove.

Ian Rogers (2):
perf comm str: Avoid sort during insert
perf dsos: When adding a dso into sorted dsos maintain the sort order

 tools/perf/util/comm.c | 29 ++++++++++++++++++-----------
 tools/perf/util/dsos.c | 26 +++++++++++++++++++++-----
 2 files changed, 39 insertions(+), 16 deletions(-)
Signature · 1 line
2.45.2.803.g4e1b14247a-goog