Android?????????????????

????Android??????????β????JAVA?????????TraceView????????NDK????????????so??TraceView?????????????????Google????????OProfile!

????Oprofile ??Linux????????????????????????????????????????????????????????????????(?????????????????????????????????????)????????????????????????????ù??????????????????????????????????????????????;L2?????????????;?????????ж????????

????Oprofile????????£?

????l ???????±?????????????????????????????????????(-g option to gclearcase/" target="_blank" >cc)??????????

????l ???????в????????顣

????l ??????????????????????д???(?????ж????????)

????l ?????????С??Oprofile??????1%-8%????????(???????????)

????l ????????2.2??2.4??2.6??????????????SMP?????

????l ???????CPU?????????X86??arm??AVR32??mips??powerpc??

????Oprofile???????Andorid???????????????????

????1.???????

????2.???Oprofile?????Arm????

?????????????????????

???????Oprofile???

????????????????????£?

????arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

?????????????£?

????popt-1.14.tar.gz

????binutils-2.21.tar.gz

????oprofile-0.9.6.tar.gz

????$ tar xvfz arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C ~/

???????~/.bashrc?????

????export PATH=${PATH}:/home/louieli/arm-2010.09/bin

????$ tar zxvf popt-1.14.tar.gz

????$ cd popt-1.14

????$ ac_cv_va_copy=yes ./configure --with-kernel-support --host=arm-none-linux-gnueabi --prefix=/home/louieli/work/popt

????$ make

????$ make install

????$ tar zxvf binutils-2.21.tar.gz

????$ cd binutils-2.21/

????$ ./configure --with-kernel-support --host=arm-none-linux-gnueabi --prefix=/home/louieli/work/binutils --enable-shared

????$ make LDFLAGS="-all-static"

?????????????cc1: warnings being treated as errors??????????????Makefile???????-Werror???

????$ make install

????$ tar zxvf oprofile-0.9.6.tar.gz

????$ cd oprofile-0.9.6/

????$ ./configure --with-kernel-support --host=arm-none-linux-gnueabi --prefix=/home/louieli/work/oprofile/ --with-extra-libs=/home/louieli/work/popt/lib/ --with-extra-includes=/home/louieli/work/popt/include/ --with-binutils=/home/louieli/work/binutils

????$ make LDFLAGS="-all-static -L/home/louieli/work/binutils/lib -Xlinker -R -Xlinker /home/louieli/work/binutils/lib -L/home/louieli/work/popt/lib/"

????$ make install

??????file ????????????????oprofile????????????????android????????????????

????install.sh: Bourne-Again shell script text executable

????opannotate: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????oparchive: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????opcontrol: a /system/bin/sh script text executable

????opgprof: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????ophelp: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????opimport: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????opjitconv: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????opreport: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped

????oprofiled: ELF 32-bit LSB executable?? ARM?? version 1 (SYSV)?? statically linked?? for GNU/Linux 2.6.16?? not stripped