Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ function name too long for perf

Tags:

c++

std

perf

There's a function that takes 81% of my runtime according to perf. Unfortunately perf doesn't show the whole function name, only the following:

std::__detail::_Map_base<piece, std::pair<piece const, int>, std::allocator<std::pair<piece const, int> >, std::__detail::_Select1st, std::equa

after std::equa I can't scroll any more to the right. How can I find out the whole function name to know which function it is? I am doing quite a few things with that map in the parent function, so it could be multiple things.

like image 898
Max Matti Avatar asked Mar 12 '26 07:03

Max Matti


1 Answers

If you use the --stdio argument or simply pipe the output to a file you'll get full width lines with perf report. The pipe to a file trick (or just | cat if you still want it on stdout) works for many other utilities as well.

like image 162
BeeOnRope Avatar answered Mar 14 '26 21:03

BeeOnRope



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!