How to use sprof?

独自空忆成欢 提交于 2019-12-03 08:13:29

From the emails found here and here, I've extracted the following notes:

Given an application my_app', which links against a shared objectmy_sobj', and has been compiled with the '-g' compile flag:

#set the environment variable LD_PROFILE to the name of the shared obj
export LD_PROFILE=my_obj
#run your application
my_app
#this should create a file /var/tmp/my_sobj.profile
#now run sprof
sprof my_sobj my_sobj.profile

This gives profile information for the shared library, not for my_app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!