linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 0/4] dso/dsos memory savings and clean up
@ 2024-05-06 18:01 Ian Rogers
  2024-05-06 18:01 ` [PATCH v7 1/4] perf map: Add missing dso__put in map__new Ian Rogers
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Ian Rogers @ 2024-05-06 18:01 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, Changbin Du,
	Tiezhu Yang, linux-perf-users, linux-kernel

Hopefully the final 4 more patches from:
https://lore.kernel.org/lkml/20240202061532.1939474-1-irogers@google.com/
a near half year old adventure in trying to lower perf's dynamic
memory use. These final changes fix reference count issues, some
introduced by making find returned a getted (+1) reference counted
DSO. The last patch lowers the overhead using container_of rather than
a pointer except when reference count checking - asserts maintain the
validity of this.

v5. Rebase, adding use of accessors to dso as necessary. Previous
    versions were all rebases or dropping merged patches.

v6. Rebase, move dsos__purge NULL assignment to dso->dsos to above
    dso__put to avoid a warning reported by Arnaldo. This was part of
    patch 5 in the v5 series.

v7. Rebase dropping 5 merged patches. Break apart the fixes per
    file. Tweak to the map dso logic as the else path was missing a
    dso__get.

Ian Rogers (4):
  perf map: Add missing dso__put in map__new
  perf symbol-elf: Ensure dso__put in machine__process_ksymbol_register
  perf symbol-elf: dso__load_sym_internal reference count fixes
  perf dso: Use container_of to avoid a pointer in dso_data

 tools/perf/tests/dso-data.c  | 60 +++++++++++++++++-------------------
 tools/perf/util/dso.c        | 16 +++++++++-
 tools/perf/util/dso.h        |  2 ++
 tools/perf/util/machine.c    |  6 ++--
 tools/perf/util/map.c        |  1 +
 tools/perf/util/symbol-elf.c | 51 +++++++++++++++---------------
 6 files changed, 75 insertions(+), 61 deletions(-)

-- 
2.45.0.rc1.225.g2a3ae87e7f-goog


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

end of thread, other threads:[~2024-05-06 20:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-06 18:01 [PATCH v7 0/4] dso/dsos memory savings and clean up Ian Rogers
2024-05-06 18:01 ` [PATCH v7 1/4] perf map: Add missing dso__put in map__new Ian Rogers
2024-05-06 18:36   ` Arnaldo Carvalho de Melo
2024-05-06 18:01 ` [PATCH v7 2/4] perf symbol-elf: Ensure dso__put in machine__process_ksymbol_register Ian Rogers
2024-05-06 18:01 ` [PATCH v7 3/4] perf symbol-elf: dso__load_sym_internal reference count fixes Ian Rogers
2024-05-06 18:01 ` [PATCH v7 4/4] perf dso: Use container_of to avoid a pointer in dso_data Ian Rogers
2024-05-06 20:36 ` [PATCH v7 0/4] dso/dsos memory savings and clean up Arnaldo Carvalho de Melo

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