Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #88051 > unrolled thread
| Started by | наб <nabijaczleweli@nabijaczleweli.xyz> |
|---|---|
| First post | 2025-06-19 16:20 +0200 |
| Last post | 2025-09-18 05:40 +0200 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.debian.kernel
Bug#1108037: linux-perf: perf report --demangle only works on some(?) symbols наб <nabijaczleweli@nabijaczleweli.xyz> - 2025-06-19 16:20 +0200
Bug#1108037: linux-perf: perf report --demangle only works on some(?) symbols Ben Hutchings <ben@decadent.org.uk> - 2025-07-09 18:20 +0200
Bug#1108037: linux-perf: perf report --demangle only works on some(?) symbols наб <nabijaczleweli@nabijaczleweli.xyz> - 2025-07-09 19:20 +0200
Bug#1108037: linux-perf: perf report --demangle only works on some(?) symbols Ben Hutchings <ben@decadent.org.uk> - 2025-07-11 00:30 +0200
Processed: Re: linux-perf: perf report --demangle only works on some(?) symbols "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-07-09 18:20 +0200
Processed: Re: linux-perf: perf report --demangle only works on some(?) symbols "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-07-09 19:20 +0200
Bug#1108037: 惊人的5大长寿定律,看懂了能让你一辈子不生病 Wilfred Ha <ytong8632@gmail.com> - 2025-09-18 05:40 +0200
| From | наб <nabijaczleweli@nabijaczleweli.xyz> |
|---|---|
| Date | 2025-06-19 16:20 +0200 |
| Subject | Bug#1108037: linux-perf: perf report --demangle only works on some(?) symbols |
| Message-ID | <KZohr-bGau-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
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
+ 89.76% 0.00% bench bench [.] Botan::Cipher_Mode::process(std::span<unsigned char, 18446744073709551615ul>)
+ 54.86% 0.00% bench bench [.] Botan::CBC_Encryption::finish_msg(std::vector<unsigned char, Botan::secure_allocator<unsigned char> >&, unsigned lo
+ 46.47% 0.16% bench bench [.] Botan::CBC_Encryption::process_msg(unsigned char*, unsigned long)
+ 43.29% 0.00% bench bench [.] Botan::CBC_Decryption::finish_msg(std::vector<unsigned char, Botan::secure_allocator<unsigned char> >&, unsigned lo
+ 43.28% 0.19% bench bench [.] Botan::CBC_Decryption::process_msg(unsigned char*, unsigned long)
+ 40.66% 0.07% bench bench [.] Botan::BlockCipher::encrypt(unsigned char*) const
+ 40.61% 2.70% bench bench [.] Botan::Twofish::encrypt_n(unsigned char const*, unsigned char*, unsigned long) const
+ 40.35% 0.00% bench [unknown] [k] 0000000000000000
+ 38.64% 2.30% bench bench [.] Botan::Twofish::decrypt_n(unsigned char const*, unsigned char*, unsigned long) const
+ 21.28% 12.28% bench bench [.] Botan::(anonymous namespace)::TF_E(unsigned int, unsigned int, unsigned int&, unsigned int&, unsigned int, unsigned
+ 20.93% 12.36% bench bench [.] Botan::(anonymous namespace)::TF_D(unsigned int, unsigned int, unsigned int&, unsigned int&, unsigned int, unsigned
+ 14.96% 11.71% bench bench [.] std::vector<unsigned int, Botan::secure_allocator<unsigned int> >::operator[](unsigned long) const
+ 9.29% 0.15% bench bench [.] Botan::xor_buf(unsigned char*, unsigned char const*, unsigned long)
+ 8.39% 0.00% bench bench [.] Botan::PKCS7_Padding::add_padding(std::vector<unsigned char, Botan::secure_allocator<unsigned char> >&, unsigned lo
+ 8.39% 0.00% bench bench [.] std::vector<unsigned char, Botan::secure_allocator<unsigned char> >::resize(unsigned long)
+ 8.39% 0.00% bench bench [.] std::vector<unsigned char, Botan::secure_allocator<unsigned char> >::_M_default_append(unsigned long)
+ 8.33% 0.00% bench bench [.] std::vector<unsigned char, Botan::secure_allocator<unsigned char> >::_S_relocate(unsigned char*, unsigned char*, un
+ 8.33% 0.00% bench bench [.] unsigned char* std::__relocate_a<unsigned char*, unsigned char*, Botan::secure_allocator<unsigned char> >(unsigned
+ 8.33% 0.90% bench bench [.] unsigned char* std::__relocate_a_1<unsigned char*, unsigned char*, Botan::secure_allocator<unsigned char> >(unsigne
+ 8.19% 3.06% bench bench [.] _ZN5Botan7xor_bufITkNS_6ranges23contiguous_output_rangeIhEESt4spanIhLm18446744073709551615EETkNS1_16contiguous_rang
+ 7.56% 1.01% bench bench [.] void std::__relocate_object_a<unsigned char, unsigned char, Botan::secure_allocator<unsigned char> >(unsigned char*
+ 7.34% 0.04% bench bench [.] auto Botan::load_le<Botan::detail::AutoDetect, unsigned char const*&, unsigned int&, unsigned int&, unsigned int&,
+ 7.29% 0.07% bench bench [.] _ZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJjjjjEQaaaagtsZT1_Li0
+ 7.25% 0.05% bench bench [.] auto Botan::load_le<Botan::detail::AutoDetect, unsigned char const*&, unsigned int&, unsigned int&, unsigned int&,
+ 7.20% 0.06% bench bench [.] _ZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETpTkNS0_20unsigned_integralishEJjjjjjjjjEQaaaagtsZT1
+ 7.18% 0.05% bench bench [.] auto Botan::store_le<Botan::detail::AutoDetect, unsigned char*&, unsigned int&, unsigned int&, unsigned int&, unsig
+ 7.13% 0.07% bench bench [.] _ZN5Botan6detail9store_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS0_20unsigned_integralishEjTpTkNS0_20unsigned_in
+ 7.11% 0.39% bench bench [.] _ZN5Botan6detail8load_anyILNS0_10EndiannessE1ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEESt4sp
+ 7.02% 0.26% bench bench [.] _ZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEESt4spanIKhLm16EETp
+ 7.01% 0.18% bench bench [.] _ZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEESt4spanIKhLm32EETp
+ 6.88% 0.21% bench bench [.] _ZN5Botan6detail9store_anyILNS0_10EndiannessE1EjTkNS_6ranges23contiguous_output_rangeIhEESt4spanIhLm16EETpTkNS0_20u
+ 6.82% 0.42% bench bench [.] _ZZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEESt4spanIKhLm32EET
+ 6.71% 0.40% bench bench [.] _ZZN5Botan6detail8load_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS_6ranges16contiguous_rangeIhEESt4spanIKhLm16EET
+ 6.66% 0.07% bench bench [.] auto Botan::store_le<Botan::detail::AutoDetect, unsigned char*&, unsigned int&, unsigned int&, unsigned int&, unsig
+ 6.60% 0.32% bench bench [.] _ZZN5Botan6detail9store_anyILNS0_10EndiannessE1EjTkNS_6ranges23contiguous_output_rangeIhEESt4spanIhLm16EETpTkNS0_20
+ 6.60% 0.05% bench bench [.] _ZN5Botan6detail9store_anyILNS0_10EndiannessE1ENS0_10AutoDetectETkNS0_20unsigned_integralishEjTpTkNS0_20unsigned_in
+ 6.57% 0.41% bench bench [.] _ZN5Botan6detail9store_anyILNS0_10EndiannessE1ETkNS0_20unsigned_integralishEjTkNS_6ranges23contiguous_output_rangeI
+ 6.47% 0.23% bench bench [.] _ZN5Botan6detail9store_anyILNS0_10EndiannessE1EjTkNS_6ranges23contiguous_output_rangeIhEESt4spanIhLm32EETpTkNS0_20u
+ 6.28% 0.25% bench bench [.] _ZZN5Botan6detail8load_anyILNS0_10EndiannessE1ETkNS0_20unsigned_integralishEjTkNS_6ranges16contiguous_rangeIhEESt4s
+ 6.20% 0.30% bench bench [.] _ZZN5Botan6detail9store_anyILNS0_10EndiannessE1EjTkNS_6ranges23contiguous_output_rangeIhEESt4spanIhLm32EETpTkNS0_20
+ 6.03% 0.30% bench bench [.] _ZN5Botan13typecast_copyIjTkNS_6ranges16contiguous_rangeERSt4spanIKhLm4EEQaaaasr3stdE26is_default_constructible_vIT
+ 5.78% 0.36% bench bench [.] _ZN5Botan13typecast_copyIjTkNS_6ranges16contiguous_rangeERSt4spanIKhLm4EEQaaaasr3stdE23is_trivially_copyable_vINSt8
+ 5.64% 0.38% bench bench [.] _ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERSt4spanIhLm4EEjQaaaasr3stdE23is_trivially_copyable_
+ 4.40% 0.00% bench [unknown] [k] 0x7e7e5a48fcfcb490
+ 3.88% 0.91% bench bench [.] decltype (_S_construct({parm#1}, {parm#2}, (std::forward<unsigned char>)({parm#3}))) std::allocator_traits<Botan::s
+ 3.69% 0.65% bench bench [.] _ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeERSt4spanIhLm4EETkNS1_16contiguous_rangeES2_IKjLm1EEQ
+ 3.68% 0.70% bench bench [.] _ZN5Botan13typecast_copyITkNS_6ranges23contiguous_output_rangeESt4spanIjLm1EETkNS1_16contiguous_rangeERS2_IKhLm4EEQ
+ 2.98% 0.90% bench bench [.] std::enable_if<__and_<std::__and_<std::__not_<std::allocator_traits<Botan::secure_allocator<unsigned char> >::__con
+ 2.79% 0.78% bench bench [.] void std::allocator_traits<Botan::secure_allocator<unsigned char> >::destroy<unsigned char>(Botan::secure_allocator
Cannot load tips.txt file, please install perf!
and obviously many of these have not been demangled.
Best,
-- System Information:
Debian Release: 12.11
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.1.0-27-amd64 (SMP w/24 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages linux-perf depends on:
ii libbabeltrace1 1.5.11-1+b2
ii libc6 2.36-9+deb12u10
ii libcap2 1:2.66-4+deb12u1
ii libdw1 0.188-2.1
ii libelf1 0.188-2.1
ii liblzma5 5.4.1-1
ii libnuma1 2.0.16-1
ii libopencsd1 1.3.3-1
ii libperl5.36 5.36.0-7+deb12u2
ii libpython3.11 3.11.2-6+deb12u6
ii libslang2 2.3.3-3
ii libunwind8 1.6.2-3
ii libzstd1 1.5.4+dfsg2-5
ii perl 5.36.0-7+deb12u2
ii python3 3.11.2-1+b1
ii zlib1g 1:1.2.13.dfsg-1
linux-perf recommends no packages.
Versions of packages linux-perf suggests:
pn linux-doc-6.1 <none>
-- no debconf information
[toc] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2025-07-09 18:20 +0200 |
| Message-ID | <L6FGx-goMl-1@gated-at.bofh.it> |
| In reply to | #88051 |
[Multipart message — attachments visible in raw view] — view raw
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.
[toc] | [prev] | [next] | [standalone]
| From | наб <nabijaczleweli@nabijaczleweli.xyz> |
|---|---|
| Date | 2025-07-09 19:20 +0200 |
| Message-ID | <L6GCB-gptb-11@gated-at.bofh.it> |
| In reply to | #88293 |
[Multipart message — attachments visible in raw view] — view raw
Control: tag -1 - moreinfo
On Wed, Jul 09, 2025 at 06:15:10PM +0200, Ben Hutchings wrote:
> What does the actual declaration of this function look like, and what
> toolchain are you using to compile it?
I get this out of src:botan3 3.7.1+dfsg-2 src/lib/modes/cbc/cbc.cpp
when building with clang trunk (21.0.0 (++20250519112653+d0ee35851bb9-1~exp1~20250519112844.1459))
(from http://apt.llvm.org/bookworm/)
when configuring as ./configure.py --minimized-build --enable-modules cbc,twofish
then building with make build/obj/lib/modes_cbc.o
The construction looks like
class secure_allocator { /* ... */ };
using secure_vector = std::vector<T, secure_allocator<T>>;
class BOTAN_PUBLIC_API(2, 0) Cipher_Mode : public SymmetricAlgorithm {
template <concepts::resizable_byte_buffer T>
void update(T& buffer, size_t offset = 0) {
// ...
}
}
class CBC_Mode : public Cipher_Mode {}
class CBC_Encryption : public CBC_Mode {
private:
void finish_msg(secure_vector<uint8_t>& final_block, size_t offset = 0) override;
}
void CBC_Encryption::finish_msg(secure_vector<uint8_t>& buffer, size_t offset) {
// ...
update(buffer, offset);
}
(there's some other callers but they all use the same update overload).
> On Thu, 19 Jun 2025 16:09:24 +0200 =?utf-8?B?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz> wrote:
> > + 89.76% 0.00% bench bench [.] _ZN5Botan11Cipher_Mode6updateITkNS_8concepts21resizable_byte_bufferESt6vectorIhNS_16secure_allocatorIhEEEEEvRT_m
> 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".
So the full declaration will be something like
template<concepts::resizable_byte_buffer = std::vector<unsigned char, Botan::secure_allocator<unsigned char>>> // except as an instantiation, not a default
void Botan::Cipher_Mode::update(std::vector<unsigned char, Botan::secure_allocator<unsigned char>>, unsigned long);
so llvm-cxxfilt gets it mostly right.
I don't really see why the concept bit is in there either,
it feels like it ought to be immaterial?
> 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)".
This must mean that's "The koncept" as an extension, then, clearly?
Maybe this wants to get forwarded to LLVM more-so than anything else.
Building with bookworm GCC doesn't give give me any symbols
matching /update/ except for an update_granularity.
[toc] | [prev] | [next] | [standalone]
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Date | 2025-07-11 00:30 +0200 |
| Message-ID | <L77W9-gHyW-3@gated-at.bofh.it> |
| In reply to | #88297 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, 2025-07-09 at 19:16 +0200, наб wrote: > Control: tag -1 - moreinfo > > On Wed, Jul 09, 2025 at 06:15:10PM +0200, Ben Hutchings wrote: > > What does the actual declaration of this function look like, and what > > toolchain are you using to compile it? [...] > So the full declaration will be something like > template<concepts::resizable_byte_buffer = std::vector<unsigned char, Botan::secure_allocator<unsigned char>>> // except as an instantiation, not a default > void Botan::Cipher_Mode::update(std::vector<unsigned char, Botan::secure_allocator<unsigned char>>, unsigned long); > so llvm-cxxfilt gets it mostly right. > > I don't really see why the concept bit is in there either, > it feels like it ought to be immaterial? > > > 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)". > > This must mean that's "The koncept" as an extension, then, clearly? > Maybe this wants to get forwarded to LLVM more-so than anything else. [...] You forwarded this to <https://github.com/llvm/llvm-project/issues/147790> and the response was that this extension was propsoed in <https://github.com/itanium-cxx-abi/cxx-abi/issues/24> (opened in 2017!). - The "Tk" sequence seems to be first mentioned by zygoloid on Mar 31, 2023 - g++ started generating this in <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c3f281a0c1ca50e4df5049923aa2f5d1c3c39ff6> (September 2023) - libiberty imported that change in <https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=e2a26339456487e80344a8c3bd0f10711ff28567> (January 2024) So it seems like the GNU tools also use this sequence, but perhaps they have diverged from LLVM on the precise syntax... Ben. -- Ben Hutchings Never attribute to conspiracy what can adequately be explained by stupidity.
[toc] | [prev] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2025-07-09 18:20 +0200 |
| Subject | Processed: Re: linux-perf: perf report --demangle only works on some(?) symbols |
| Message-ID | <L6FGy-goMl-13@gated-at.bofh.it> |
| In reply to | #88051 |
Processing control commands: > tag -1 moreinfo Bug #1108037 [linux-perf] linux-perf: perf report --demangle only works on some(?) symbols Added tag(s) moreinfo. -- 1108037: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108037 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | "Debian Bug Tracking System" <owner@bugs.debian.org> |
|---|---|
| Date | 2025-07-09 19:20 +0200 |
| Subject | Processed: Re: linux-perf: perf report --demangle only works on some(?) symbols |
| Message-ID | <L6GCB-gptb-19@gated-at.bofh.it> |
| In reply to | #88051 |
Processing control commands: > tag -1 - moreinfo Bug #1108037 [linux-perf] linux-perf: perf report --demangle only works on some(?) symbols Removed tag(s) moreinfo. -- 1108037: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108037 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
[toc] | [prev] | [next] | [standalone]
| From | Wilfred Ha <ytong8632@gmail.com> |
|---|---|
| Date | 2025-09-18 05:40 +0200 |
| Subject | Bug#1108037: 惊人的5大长寿定律,看懂了能让你一辈子不生病 |
| Message-ID | <LwdEZ-gcNR-11@gated-at.bofh.it> |
| In reply to | #88051 |
[Multipart message — attachments visible in raw view] — view raw
*你好吗?* 就让我们携手踏入探索长寿奥秘的旅程,洞悉那些令人惊叹的长寿法则。一旦领悟其精髓,或许能让你的一生远离病痛,轻松步入健康长寿的康庄大道。 以下是文章的主要内容: 一、均衡膳食:构筑长寿的坚实基石 二、适量运动:铸就长寿的坚实屏障 三、心理健康:解锁长寿的心灵密码 四、优质环境:助力长寿的绿色港湾 五、顺应节律:遵循自然的长寿智慧 这些信息十分珍贵,请务必查看完整内容! *https://simpleurl.link/5-jing-ren-de-zhang-shou-ding-lu* <https://simpleurl.link/5-jing-ren-de-zhang-shou-ding-lu> 祝好! --- 追寻真相,是对良知最好的尊重
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web