5

I'm using gperftools to profile a C++ application, which was compiled using GCC 5.4.0 (with -O3).

The code is highly optimized, so I don't see a lot of branches in the output, but there's a branch called __nss_passwd_lookup(), which takes significant amount of time:

enter image description here

My only guess is that it's related to memory allocation somehow.

Operating system: Ubuntu 16.04 x86_64, Kernel: 4.8.

Michael Spector
  • 36,723
  • 6
  • 60
  • 88

1 Answers1

1

Some assembly functions in glibc occasionally have this issue (e.g. memcpy or memset). Consider installing libc6-dbg package. Also please try golang version of pprof tool (go get github.com/google/pprof).