I was using perf
on a profiling work. But I got some problems:
I compiled the problem with -fno-omit-frame-pointer
... and -g
, but still got this problem.
Can anyone help to have a look? How to fix these two problems?
The perf output is:
9.28% gserver gserver [.] 0x000000000013bb20
2.36% gserver libpthread-2.19.so [.] pthread_mutex_lock
|
--- pthread_mutex_lock
|
|--28.31%-- 0x0
| |
| |--38.16%-- 0x3
| |
| |--37.72%-- 0x0
| | |
| | |--90.05%-- 0x25
| | | |
| | | |--53.41%-- 0x100000001
| | | | std::_Sp_counted_ptr<Buffer*, (__gnu_cxx::_Lock_policy)2>::~_Sp_counted_ptr()
| | | | 0x1f0fc35de58948
It doesn't matter, because those are in library code, which you didn't build, and you can't fix.
You can see it's spending 2.63% of its time in a mutex_lock, meaning it's waiting for something.
That's insignificant.
I assume you're looking for significant stuff. I use this technique .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.