[PATCH v7 0/4] dso/dsos memory savings and clean up

Ian Rogers posted 4 patches 1 week, 6 days ago
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(-)
[PATCH v7 0/4] dso/dsos memory savings and clean up
Posted by Ian Rogers 1 week, 6 days ago
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
Re: [PATCH v7 0/4] dso/dsos memory savings and clean up
Posted by Arnaldo Carvalho de Melo 1 week, 5 days ago
On Mon, May 06, 2024 at 11:01:00AM -0700, Ian Rogers wrote:
> 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.

Thanks, applied to perf-tools-next,

- Arnaldo

- Arnaldo