Re: [PATCH v3 1/3] perf dso: Use libbfd to read build_id and .gnu_debuglink section

2020-09-04 Thread Remi Bernon
On 2020-09-03 18:51, Arnaldo Carvalho de Melo wrote: Em Wed, Sep 02, 2020 at 09:25:19PM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Aug 21, 2020 at 06:52:36PM +0200, Remi Bernon escreveu: Wine generates PE binaries for most of its modules and perf is unable to parse these files to get

[PATCH v3 3/3] perf tests: Add test for PE binary format support

2020-08-21 Thread Remi Bernon
This adds a precompiled file in PE binary format, with split debug file, and tries to read its build_id and .gnu_debuglink sections, as well as looking up the main symbol from the debug file. This should succeed if libbfd is supported. Signed-off-by: Remi Bernon Cc: Alexander Shishkin Cc

[PATCH v3 1/3] perf dso: Use libbfd to read build_id and .gnu_debuglink section

2020-08-21 Thread Remi Bernon
Wine generates PE binaries for most of its modules and perf is unable to parse these files to get build_id or .gnu_debuglink section. Using libbfd when available, instead of libelf, makes it possible to resolve debug file location regardless of the dso binary format. Signed-off-by: Remi Bernon

[PATCH v3 2/3] perf symbols: Try reading the symbol table with libbfd

2020-08-21 Thread Remi Bernon
running under Wine. Because libbfd doesn't provide symbol size (probably because of some backends not supporting it), we compute it by first sorting the symbols by addresses and then considering that they are sequential in a given section. Signed-off-by: Remi Bernon Cc: Alexander Shishkin Cc: Ar

Re: [PATCH v2 2/3] perf symbols: Try reading the symbol table with libbfd

2020-08-04 Thread Remi Bernon
On 2020-08-04 22:32, Jiri Olsa wrote: On Tue, Aug 04, 2020 at 10:57:35AM +0200, Remi Bernon wrote: SNIP + +int dso__load_bfd_symbols(struct dso *dso, const char *debugfile) +{ + int err = -1; + long symbols_size, symbols_count; + asection *section; + asymbol **symbols

[PATCH v2 1/3] perf dso: Use libbfd to read build_id and .gnu_debuglink section

2020-08-04 Thread Remi Bernon
Wine generates PE binaries for most of its modules and perf is unable to parse these to get build_id or .gnu_debuglink section. Using libbfd when available, instead of libelf, makes it possible to resolve debug file location regardless of the dso binary format. Signed-off-by: Remi Bernon Cc

[PATCH v2 3/3] perf tests: Add test for PE binary format support

2020-08-04 Thread Remi Bernon
This adds a precompiled file in PE binary format, with split debug file, and tries to read its build_id and .gnu_debuglink sections, as well as looking up the main symbol from the debug file. This should succeed if libbfd is supported. Signed-off-by: Remi Bernon Cc: Alexander Shishkin Cc

[PATCH v2 2/3] perf symbols: Try reading the symbol table with libbfd

2020-08-04 Thread Remi Bernon
running under Wine. Because libbfd doesn't provide symbol size (probably because of some backends not supporting it), we compute it by first sorting the symbols by addresses and then we consider that they are sequential in a given section. Signed-off-by: Remi Bernon Cc: Alexander Shishki

[PATCH 3/3] perf tests: Add test for PE binary format support

2020-06-24 Thread Remi Bernon
This adds a precompiled file in PE binary format, with split debug file, and tries to read its build_id and .gnu_debuglink sections, as well as looking up the main symbol from the debug file. This should succeed if libbfd is supported. Signed-off-by: Remi Bernon Cc: Alexander Shishkin Cc

[PATCH 1/3] perf dso: Use libbfd to read build_id and .gnu_debuglink section

2020-06-24 Thread Remi Bernon
Wine generates PE binaries for most of its modules and perf is unable to parse these files to get build_id or .gnu_debuglink section. Using libbfd when available, instead of libelf, makes it possible to resolve debug file location regardless of the dso binary format. Signed-off-by: Remi Bernon

[PATCH 2/3] perf symbols: Try reading the symbol table with libbfd

2020-06-24 Thread Remi Bernon
given section. Signed-off-by: Remi Bernon Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Jacek Caban --- tools/perf/util/symbol.c | 129 +++ tools/perf/util/sym