mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>, Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-perf-users@vger.kernel.org
Subject: [PATCH 0/4] perf tools: Fix MMAP2 build-ID synthesis in namespaces (v1)
Date: Fri, 16 Sep 2022 10:58:58 -0700	[thread overview]
Message-ID: <20220916175902.1155177-1-namhyung@kernel.org> (raw)

Hello,

The perf record --buildid-mmap enables PERF_RECORD_MISC_MMAP_BUILD_ID
which includes a build-ID of the DSO.  It requires to read the info from the
file when synthesizing.  But I found some issues in the current code that it
didn't check duplicate files and didn't handle namespaces.

I think chroot is not a concern since perf will see it from the outside so
that it can see the full path.

The code is available at 'perf/mmap2-buildid-fix-v1' branch on

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung


Namhyung Kim (4):
  perf tools: Move dsos functions to util/dsos.c
  perf tools: Add perf_event__synthesize_{start,stop}()
  perf record: Save DSO build-ID for synthesizing
  perf tools: Honor namespace when synthesizing build-id

 tools/perf/builtin-inject.c        |  3 ++
 tools/perf/builtin-record.c        |  3 ++
 tools/perf/builtin-stat.c          |  2 +
 tools/perf/builtin-top.c           |  4 ++
 tools/perf/util/auxtrace.c         |  2 +
 tools/perf/util/dsos.c             | 29 +++++++++++++
 tools/perf/util/dsos.h             |  3 ++
 tools/perf/util/machine.c          | 29 -------------
 tools/perf/util/synthetic-events.c | 65 ++++++++++++++++++++++++++----
 tools/perf/util/synthetic-events.h |  3 ++
 10 files changed, 107 insertions(+), 36 deletions(-)


base-commit: 62e64c9d2fd12839c02f1b3e8b873e7cb34e8720
-- 
2.37.3.968.ga6b4b080e4-goog


             reply	other threads:[~2022-09-16 17:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 17:58 Namhyung Kim [this message]
2022-09-16 17:58 ` [PATCH 1/4] perf tools: Move dsos functions to util/dsos.c Namhyung Kim
2022-09-20 13:51   ` Adrian Hunter
2022-09-20 17:49     ` Namhyung Kim
2022-09-16 17:59 ` [PATCH 2/4] perf tools: Add perf_event__synthesize_{start,stop}() Namhyung Kim
2022-09-20 13:50   ` Adrian Hunter
2022-09-20 18:17     ` Namhyung Kim
2022-09-16 17:59 ` [PATCH 3/4] perf record: Save DSO build-ID for synthesizing Namhyung Kim
2022-09-20 13:59   ` Adrian Hunter
2022-09-20 18:30     ` Namhyung Kim
2022-09-21  7:26       ` Adrian Hunter
2022-09-21 10:11         ` Adrian Hunter
2022-09-16 17:59 ` [PATCH 4/4] perf tools: Honor namespace when synthesizing build-id Namhyung Kim
2022-09-20 13:36   ` Adrian Hunter
2022-09-20 18:31     ` Namhyung Kim

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=20220916175902.1155177-1-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®