Dear developers.
Thank you in advances for reading my question.
I am trying to make and install my own kernel & android platform image
to support oprofiler for acamemic research.
With some meterials & other developers' help,
I completed my own kernel & android platform image.
But unfortunately, oprofiler doesn't work well.
Exactly it look like working but it doesn't received any samples.
The symptom is like that:
========================================================================================
# opcontrol --shutdown
# opcontrol --reset
# opcontrol --setup
# opcontrol --vmlinux=/data/vmlinux --kernel-range=0xc004e000,0xc0774000
--event=CPU_CYCLES:100000
Starting oprofiled...
Using 2.6+ OProfile kernel interface.
Reading module info.
Using log file /data/oprofile/samples/oprofiled.log
Ready
#
# opcontrol --status
Session directory: /data/oprofile
Counter 0:
name: CPU_CYCLES
count: 100000
Counter 1 disabled
Counter 2 disabled
Counter 3 disabled
Counter 4 disabled
oprofiled pid: 1327
profiler is not running
cpu1 0 samples received
cpu1 0 samples lost overflow
cpu1 0 samples invalid eip
cpu1 0 backtrace aborted
cpu0 0 samples received
cpu0 0 samples lost overflow
cpu0 0 samples invalid eip
cpu0 0 backtrace aborted
#
#
root@android:/ # opcontrol --start
root@android:/ # opcontrol --status
Driver directory: /dev/oprofile
Session directory: /data/oprofile
Counter 0:
name: CPU_CYCLES
count: 100000
Counter 1 disabled
Counter 2 disabled
Counter 3 disabled
Counter 4 disabled
oprofiled pid: 1327
profiler is running
cpu1 0 samples received
cpu1 0 samples lost overflow
cpu1 0 samples invalid eip
cpu1 0 backtrace aborted
cpu0 0 samples received
cpu0 0 samples lost overflow
cpu0 0 samples invalid eip
cpu0 0 backtrace aborted
========================================================================================
As you can see, after executing 'opcontrol --start', 'profiler is running'
is shown.
But any samples is received from device.
After executing 'opcontrol --stop', then I checked the
'/data/oprofile/samples/oprofiled.log'
but there is no data except starting time.
Frankly speaking, I can't find any reason about this problem.
Please let me know the reason and the possible solution for this problem.
For more deep understanding of you, I explain the sequece of build process.
The red part is different from normal building sequence.
===================================================================================
Device: Galaxy Nexus (maguro)
Kernel: android-omap-tuna-3.0
Platform: android-4.0.3_r1
[kernel build]
git clone https://android.googlesource.com/kernel/omap
cd omap
git checkout origin/android-omap-tuna-3.0
# install prebuilt gcc toolchain
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make tuna_defconfig
# edit .config file to add the below.
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HW_PERF_EVENTS=y
CONFIG_PERF_EVENTS=y
CONFIG_PERF_COUNTERS=y
make -j8
cp arch/arm/boot/zImage <android_platform>/platform/device/samsung/tuna
[android platform build]
repo init -u https://android.googlesource.com/platform/manifest -b
android-4.0.3_r1
repo sync
# run extract-imgtec-maguro.sh & extract-samsung-maguro.sh in android root
source directory
# edit external/oprofile/opcontrol/Android.mk to add 'LOCAL_CFLAGS +=
-DWITH_ARM_V7_A'
# reference:
https://wiki.mozilla.org/Mobile/Fennec/Android/Profiling#Using_oprofile_on_Galaxy_Nexus
. build/envsetup.sh
make clobber
lunch full_maguro-eng
make CC=gcc-4.4 CXX=g++-4.4 -j8
===================================================================================
Thank you in advances.
Derick SJ Woo.
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-kernel