Max Matti
Max Matti

Reputation: 433

C++ function name too long for 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.

Upvotes: 12

Views: 2897

Answers (1)

BeeOnRope
BeeOnRope

Reputation: 64915

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.

Upvotes: 14

Related Questions