linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Try to avoid some qsorts
@ 2024-07-03 17:21 Ian Rogers
  2024-07-03 17:21 ` [PATCH v1 1/2] perf comm str: Avoid sort during insert Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ian Rogers @ 2024-07-03 17:21 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Athira Rajeev,
	linux-perf-users, linux-kernel, Steinar Gunderson, Matt Fleming

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/20240521165109.708593-1-irogers@google.com/

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(-)

-- 
2.45.2.803.g4e1b14247a-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-04 19:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 17:21 [PATCH v1 0/2] Try to avoid some qsorts Ian Rogers
2024-07-03 17:21 ` [PATCH v1 1/2] perf comm str: Avoid sort during insert Ian Rogers
2024-07-03 17:35   ` Matt Fleming
2024-07-03 17:21 ` [PATCH v1 2/2] perf dsos: When adding a dso into sorted dsos maintain the sort order Ian Rogers
2024-07-03 21:46   ` Namhyung Kim
2024-07-04 19:57 ` [PATCH v1 0/2] Try to avoid some qsorts Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).