Thanks a lot Maynard. Your suggestions worked and I was able to get my shared library profiling done.

Regards,
Sumeet

On Thu, Jul 24, 2008 at 1:31 AM, Maynard Johnson <maynardj@us.ibm.com> wrote:
sumeet gandhare wrote:
> Hi Maynard,
>
> Thanks for your reply. I tried setting the --verbose = all option in
> opreport but when I scan the file for the name of my shared library I dont
> see it in the output. Does it mean that my shared library is not getting
> used and hence not getting profiled? This cannot happen as there is code in
> my shared library which accesses an API to get Storage LUN related
> information from the HBA card Driver. And I am able to see all the LUNs
> visible to the HBA card from the client application.
>
> Please could you suggest anything I could do to for this issue.
>
I see that you are using image filtering with both opcontrol and
opreport (specifying '/root/sumeet/pegasus/bin/cimserver').   I wonder
if there's some kind of problem that's causing the library samples
associated with cimserver to be filtered out.  First, cat the file
/root/.oprofile/daemonrc and save the output somewhere in case we need
to look at it later.  This file caches setup info.  Next, delete that
file and re-run your commands below, but without specifying the
'/root/sumeet/pegasus/bin/cimserver' image.  If still no output, maybe
there really aren't any samples for the library. Does the library code
make some calls into the kernel?  You're running with --no-vmlinux, so
you won't see kernel time associated with your app.

-Maynard

P.S.  Added the oprofile-list back to cc list.
> Thanks and Regards,
> Sumeet
>
> On Wed, Jul 23, 2008 at 11:41 PM, Maynard Johnson <maynardj@us.ibm.com>
> wrote:
>
>
>> Sumeet.Gandhare@Emulex.Com wrote:
>>
>>> Hi,
>>>
>>> I am trying to use oprofile to profile a user space application which
>>>
>> dynamically loads shared libraries. From the opreport/opannotate output I am
>> not able to see any profile information regarding the shared libraries
>> function which I actually wish to profile. Though my application is working
>> correctly I am not able to see the profile information for the functions in
>> the shared library...
>>
>> Try using the --versbose=all with opreport, and redirect the output to a
>> file. Scan the output for the name of your library and see if the
>> messages lead you to the cause of the problem.
>>
>> -Maynard
>>
>>> This is a daemon server process which responds to request from the client
>>>
>> .. The client requests are routed to a module in a dynamically loaded shared
>> library.
>>
>>> Please could you let me know what special things I need to do get the
>>>
>> profile done. Please note that I have built cimserver process (which is
>> being profiled) and the dlls with debug information.
>>
>>> opcontrol -i /root/sumeet/pegasus/bin/cimserver
>>> opcontrol -separate=lib
>>> opcontrol -no-vmlinux
>>> opcontrol --event=CPU_CLK_UNHALTED:50000
>>>
>>> opcontrol --start
>>>
>>> /root/sumeet/pegasus/bin/cimserver
>>>
>>> (invoke cimcli to get the storage volume related informatino from the
>>>
>> cimserver .. THis would in turn invoke the code from the shared library!)
>>
>>> opcontrol --dump
>>>
>>> opcontrol --stop
>>> opcontrol --shutdown
>>>
>>> opreport -l /root/sumeet/pegasus/bin/cimserver
>>>
>>>
>>> Thanks and Regards,
>>> Sumeet R. Gandhare
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>
>> challenge
>>
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>>
>> prizes
>>
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>
>> world
>>
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> oprofile-list mailing list
>>> oprofile-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>>>
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> oprofile-list mailing list
>> oprofile-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>>
>>
>
>