oprofile

페이지 정보

작성자 조희승 댓글 0건 조회 8,274회 작성일 12-08-17 15:14

본문

최근엔 operf가 생김


-- operf.sh
if [ "$1" == "" ]
then
    echo "operf.sh [output file prefix]"
    exit
fi

rm -rf oprofile_data


operf --system-wide --vmlinux=/usr/src/linux/vmlinux

opreport -l -t 0.1 -p /usr/src/linux,/lib/modules/3.10.0/extra/flashcache > $1_`date +%Y%m%d_%H%M%S`.opreport




---------------


http://www.ibm.com/developerworks/kr/library/l-pow-oprofile/

tool compile시 에러들은 아래서
http://huizistar.wordpress.com/2011/04/10/oprofile-0-9-6-ubuntu/




돌리기

modprobe oprofile

#opcontrol --vmlinux=/usr/src/linux-source-2.6.32/vmlinux

opcontrol --no-vmlinux

opcontrol --reset
opcontrol --setup --event="CPU_CLK_UNHALTED:6000:0:1:1"

opcontrol --start
./multiply
opcontrol --dump
opcontrol --stop
opcontrol -h



결과보기

opreport -l bwa

opannotate --source ./multiply


이벤트 관련

디폴트로 되어있는 이벤트는 CPU_CLK_UNHALTED

--setup --event="CPU_CLK_UNHALTED:6000:0:1:1"
count, unit mask, kernel-space counting, user-space counting,

Last Level Cache 미스 체크

opcontrol --setup --event=LLC_MISSES:6000


구체적인 이벤트는 아래에서......

http://oprofile.sourceforge.net/docs/

최신 cpu는 Intel architectural perfmon 를 참고



결과볼때,

opreport

-l : 함수이름

-t 1 : 1%이상만 보기

-s image : image들의 총합

-n : 헤더 표시안함


그냥 app별 총합을 볼때는

opreport -t 0.1 -s image


함수이름 볼때는

opreport -t 0.1 -l

댓글목록

등록된 댓글이 없습니다.