linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	 Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,  Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	 Kan Liang <kan.liang@linux.intel.com>,
	Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
	 Changbin Du <changbin.du@huawei.com>,
	Tiezhu Yang <yangtiezhu@loongson.cn>,
	 linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v7 0/4] dso/dsos memory savings and clean up
Date: Mon,  6 May 2024 11:01:00 -0700	[thread overview]
Message-ID: <20240506180104.485674-1-irogers@google.com> (raw)

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


             reply	other threads:[~2024-05-06 18:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 18:01 Ian Rogers [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240506180104.485674-1-irogers@google.com \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=changbin.du@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=yangtiezhu@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).