예를 들어 설명해주십시오. 이메일에서sprof를 사용하는 방법?
6
A
답변
6
는 here 및 here, 나는 다음과 같은 메모를 추출했습니다 발견
응용 프로그램 my_app', which links against a shared object
my_sobj을 감안할 때 ', 그리고 컴파일 된'컴파일 '-g 플래그 :
#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
이것은 my_app가 아닌 공유 라이브러리에 대한 프로파일 정보를 제공합니다.
참조 http://stackoverflow.com/questions/1838989/gprof-how-to-generate-call-graph-for-functions-in-shared-library - 연결된 -/4959168 # 49591 68 – Dan