Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's __nss_passwd_lookup() call that I see in profiler output about?

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.

like image 477
Michael Spector Avatar asked Nov 08 '22 03:11

Michael Spector


1 Answers

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).

like image 135
Aliaksei Kandratsenka Avatar answered Nov 14 '22 22:11

Aliaksei Kandratsenka