[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1108037: linux-perf: perf report --demangle only works on some(?) symbols



Control: tag -1 moreinfo

On Thu, 19 Jun 2025 16:09:24 +0200 =?utf-8?B?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz> wrote:
> Package: linux-perf
> Version: 6.1.140-1
> Version: 6.12.30-1
> Version: 6.12.32-1
> Severity: normal
> 
> Dear Maintainer,
> 
> I'm attaching a tarball that, when extracted in the home directory,
> should demonstrate the issue.
> 
> Running perf report -g --demangle shows
>   Samples: 278K of event 'cycles:u', Event count (approx.): 183133005676
>     Children      Self  Command  Shared Object         Symbol
>   +   98.44%     0.00%  bench    bench                 [.] main
>   +   89.76%     0.00%  bench    bench                 [.] _ZN5Botan11Cipher_Mode6updateITkNS_8concepts21resizable_byte_bufferESt6vectorIhNS_16secure_allocatorIhEEEEEvRT_m
[...]

None of bfd_demangle() from libbfd, cplus_demangle() from libiberty,
abi::__cxx_demangle() from libstdc++ are able to demangle this symbol. 
(We currently configure perf to use abi::__cxx_demangle.)

The llvm-cxxfilt command demangles it to "void
Botan::Cipher_Mode::update<std::vector<unsigned char,
Botan::secure_allocator<unsigned char>>>(std::vector<unsigned char,
Botan::secure_allocator<unsigned char>>&, unsigned long)" but it seems
to be ignoring part of the symbol, specifically 
"Botan::concepts::resizable_byte_buffer".

If I delete the "Tk" from the mangled symbol then they all agree it
should be demangled to "void
Botan::Cipher_Mode::update<std::vector<unsigned char,
Botan::secure_allocator<unsigned char>>>(std::vector<unsigned char,
Botan::secure_allocator<unsigned char>>&, unsigned long)".

What does the actual declaration of this function look like, and what
toolchain are you using to compile it?

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: