Hi Maynard,

Please find my response below. Thanks for your help.


[Q]:What version of oprofile are you using?  Have you tried the latest that's available -- oprofile-0.9.7-RC2?

[A]: We have got a kernel image where the oprofile driver is already ported. For the android version, it is showing 

./prebuilt/linux-x86_64/oprofile/bin/opreport: oprofile 0.9.5 compiled on Sep 12 2009 22:35:37


Do you suggest building the oprofile version oprofile-0.9.7-RC2 for android ? I cannot change the kernel driver, hope there is no dependency

[Q]: why do you need to use --session-dir?  I take it you specified the same session-dir when you started oprofile, right?

> --merge=all -d -p $OUT

[A]: I have specified session-dir to tell opreport where I have pulled the oprofile data from the target in the host pc which is running android.

I have run the following command in my android root directory to pull the oprofile data from the device

release$ adb pull /data/oprofile .

So the oprofile data is pulled from the device in my current directory  in the host pc and when I run opreport I pass the same directory as session-dir.

The session-dir set in oprofiled is the directory present in the device which is /data/oprofile which is different from what is set for opreport since opreport is executed in the host pc and not in the device.


I have used the merge=all option because I got the following message when I run opreport
====================================
Overflow stats not available
line is # ARM V7 PMNC possible unit masks./prebuilt/linux-x86_64/oprofile/bin/opreport error: Already displaying results for parameter tgid with values:
tgid:0,tgid:1,tgid:3,tgid:5,tgid:7, and 162 more,
which conflicts with parameter tid.
Suggestion: specify tgid: or --merge tgid
===================================

Since I want to do thread profiling and since there are several threads in the profile data which has the same tgid, so I used the merge option. I had run the oprofiled command with option --separate-thread=1 --separate-lib=1 --separate-kernel=1

Instead of --merge=all I can also run the following command:

./prebuilt/linux-x86_64/oprofile/bin/opreport --session-dir=. --merge tgid

which works fine.


--bdg


On Thu, Jul 7, 2011 at 12:35 AM, Maynard Johnson <maynardj@us.ibm.com> wrote:
biswarup dasgupta wrote:
> Hi,
>
> I am trying to run opreport command in Android 2.3.3 inside VMware and the

What version of oprofile are you using?  Have you tried the latest that's available -- oprofile-0.9.7-RC2?

> command always crashes when I give the symbol path as seen below:
>
> ==================================================================================
> *release$* ./prebuilt/linux-x86_64/oprofile/bin/opreport --session-dir=.

Just out of curiosity . . . why do you need to use --session-dir?  I take it you specified the same session-dir when you started oprofile, right?

> --merge=all -d -p $OUT

Why "--merge=all"?  What separation parameters are you running with?  Generally, I find it most helpful to run with "--separate=lib,kernel".  But then using "--merge=all" would negate the benefit.

> Overflow stats not available
> line is # ARM V7 PMNC possible unit maskswarning:
> /data/data/com.lifevibes.mediashow/files/libvideoeditor_jni.so could not be
> found.
> warning: /dev/ashmem/dalvik-jit-code-cache (deleted) could not be found.
> warning: /no-vmlinux could not be found.
> warning: /system/bin/akmd could not be found.
> warning: /system/lib/egl/libEGL_adreno200.so could not be found.
> warning: /system/lib/egl/libGLESv1_CM_adreno200.so could not be found.
> warning: /system/lib/egl/libGLESv2_adreno200.so could not be found.
> warning: /system/lib/egl/libq3dtools_adreno200.so could not be found.
> warning: /system/lib/libgsl.so could not be found.
> warning: /system/lib/libhtc_ril.so could not be found.
> CPU: ARM V7 PMNC, speed 0 MHz (estimated)
> Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of 0x00
> (No unit mask) count 1500
> *Segmentation fault*

Have you tried running opreport under gdb to get a backtrace when the seg fault occurs?  If you're using a distro-provided oprofile, it's likely that opreport is stripped.  If so, then build/install oprofile-0.9.7-rc2.  If you get the same error, then get a backtrace.

>
> ==================================================================================
>
> I have the oprofile data and if I don't specify the -p option then I can see
> the profile distribution library-wise.
>
> But I want to see where in the library the actual time is spent so I specify
> the symbol path.

Just to be clear about how the "-p" is used . . . opreport will only look in the location specified by the "-p" option if it does not find the binary it's looking for in the expected place.  If it finds a stripped binary in, say, /usr/bin, it will use that binary and *not* look in your specified image-path location.

-Maynard

> However, it always crashes when the path $OUT is given. In my setup, the
> value of $OUT is release/out/target/product/<product_name>/symbols
>
> I have created a soft-link of the arm-eabi version of objdump inside my
> release folder and have also added the release folder at the start of my
> $PATH variable. Still the crash is there.
>
> Can anyone provide any help ?
>
> Thanks in advance
>
> Regards,
> bdg
>
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
>
>
>
> _______________________________________________
> oprofile-list mailing list
> oprofile-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oprofile-list