Re: [RFC 0/5] perf tools: Minimalistic build without libelfdependency

From: Ingo Molnar
Date: Mon May 14 2012 - 05:22:09 EST



* Namhyung Kim <namhyung.kim@xxxxxxx> wrote:

> Hi,
>
> NOTE: This is a RFC patchset and it contains a lot of rough edges
> and ugly codes.
>
> Current build procedure of perf tools requires a couple of external
> libraries. Although most of them are optional, elfutils' libelf is
> mandatory for resolving symbols and build-id of the binaries being
> profiled. For some reason, it makes embedded guys' life harder who
> want to build and run perf tools on their boards.

Yeah, and this is a very useful patchset from that perspective.

> This patch set tries to fix the problem by letting the perf could
> be built without libelf. The initial intent was just providing
> perf record command to gather performance events interested on the
> system and copies the data to development box to be used by perf
> report for analysis.
>
> However it's changed to have most of perf commands as is because
> perf can resolve kernel symbols without libelf and many of perf
> commands deal (mostly) with kernel events - so no need to restrict
> capability of perf tools. Therefore, the end result is not so
> minimalistic in fact and only thing it cannot do is "perf probe".
>
> And then I realized that the perf record needs to know about the
> build-id's anyway :(. So I implemented a poor man's version of elf
> parser only for parsing the build-id info.
>
> To build a minimal perf tools, pass MINIMAL=1 to make. The perf
> report will not display symbol names:

Could we make this automatic when the required elf libraries are
not present?

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/