Skip to content

dso/dsos memory savings and clean up

Ian Rogers linux-perf-users lkml 7 versions – Applied

Status from this message: Thanks, applied to perf-tools-next,

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 2 repliesApplied
  2. v67 patches 3 repliesSuperseded
  3. v57 patches 5 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v47 patches1 replySuperseded
v312 patches5 repliesSuperseded
v213 patches5 repliesApplied
v113 patches0 repliesSuperseded

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/4perf map: Add missing dso__put in map__newtools/perf/util/map.c+1 -01 reply
2/4perf symbol-elf: Ensure dso__put in machine__process_ksymbol_registertools/perf/util/machine.c+3 -30 replies
3/4perf symbol-elf: dso__load_sym_internal reference count fixestools/perf/util/symbol-elf.c+25 -260 replies
4/4perf dso: Use container_of to avoid a pointer in dso_datatools/perf/tests/dso-data.c tools/perf/util/dso.c tools/perf/util/dso.h+46 -320 replies

Reviews trailers per patch

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

Read the v7 thread

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

Hopefully the final 4 more patches from:
https://lore.kernel.org/lkml/[email protected]/
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(-)
Signature · 1 line
2.45.0.rc1.225.g2a3ae87e7f-goog