linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	kernel-team@lge.com, Masami Hiramatsu <mhiramat@kernel.org>,
	Andi Kleen <andi@firstfloor.org>
Subject: [PATCHSET/RFC 0/9] perf tools: Support out-of-tree modules
Date: Fri, 23 Jun 2017 14:48:18 +0900	[thread overview]
Message-ID: <20170623054827.3828-1-namhyung@kernel.org> (raw)

Hello,

Currently perf loads modules only in the canonical directory
(/lib/modules/`uname -r`/).  But in some situation users want to use
local or out-of-tree modules which are not placed in the directory.

One example is developing kernel in a qemu environment.  In this case,
guest doesn't see vmlinux or modules but one can load a module in some
directory which was copied separately.  During the development, the
module can be unloaded, fixed and reloaded more than once.

I notice that perf uses symbols in /proc/kallsyms (and /proc/kcore)
and it sometimes shows different result with a same data file.  This
was due to a same module being loaded at a different address or a
reworked module being loaded at a same address.

I think it needs to use build-id cache if possible.  To do that we
need to add an option to search modules and to save them in the
build-id cache automatically.

The code is available on 'perf/kmod-dir-v1' branch at

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

Thanks,
Namhyung


Namhyung Kim (9):
  perf symbols: Use absolute address to fixup map address
  perf tools: Remove duplicate code
  perf symbols: Discard symbols in kallsyms for loaded modules
  perf symbols: Load kernel module symbols ASAP
  perf symbols: Fixup the end address of kernel map properly
  perf symbols: Use already loaded module dso when loading kcore
  perf tools: Add symbol_conf.use_kcore
  perf record: Not use kcore by default
  perf record: Add --module-dir option

 tools/perf/Documentation/perf-record.txt |  6 ++++
 tools/perf/builtin-record.c              |  7 ++++
 tools/perf/perf-with-kcore.sh            |  1 +
 tools/perf/util/machine.c                | 33 ++++++++---------
 tools/perf/util/map.c                    |  4 +--
 tools/perf/util/symbol.c                 | 61 +++++++++++++++++---------------
 tools/perf/util/symbol.h                 |  6 ++--
 7 files changed, 69 insertions(+), 49 deletions(-)

-- 
2.13.1

             reply	other threads:[~2017-06-23  5:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23  5:48 Namhyung Kim [this message]
2017-06-23  5:48 ` [PATCH/RFC 1/9] perf symbols: Use absolute address to fixup map address Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 2/9] perf tools: Remove duplicate code Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 3/9] perf symbols: Discard symbols in kallsyms for loaded modules Namhyung Kim
2017-06-23 13:51   ` Arnaldo Carvalho de Melo
2017-06-25 13:47     ` Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 4/9] perf symbols: Load kernel module symbols ASAP Namhyung Kim
2017-06-23 14:26   ` Arnaldo Carvalho de Melo
2017-06-25 14:17     ` Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 5/9] perf symbols: Fixup the end address of kernel map properly Namhyung Kim
2017-06-23 14:27   ` Arnaldo Carvalho de Melo
2017-06-25 14:34     ` Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 6/9] perf symbols: Use already loaded module dso when loading kcore Namhyung Kim
2017-06-23 13:55   ` Arnaldo Carvalho de Melo
2017-06-25 13:54     ` Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 7/9] perf tools: Add symbol_conf.use_kcore Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 8/9] perf record: Not use kcore by default Namhyung Kim
2017-06-23  5:48 ` [PATCH/RFC 9/9] perf record: Add --module-dir option Namhyung Kim
2017-06-23 14:45   ` Arnaldo Carvalho de Melo
2017-06-25 14:43     ` 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=20170623054827.3828-1-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.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;
as well as URLs for NNTP newsgroup(s).