Re: Some problems with Oprofile

William Cohen <[email protected]>
Newsgroups gmane.linux.oprofile
Message-ID <[email protected]>
On 01/07/2016 03:25 AM, 李肖肖 wrote:
> Hello:
>        My name is Li Xiaoxiao. I am using the Oprofile recently. But I met some problems with it. My environment is Ubuntu14.04, and the Kernel is 3.13.2. The example I see on the internet, is a single cpp file using gcc and generated an executable file, such as ./test. Could the Oprofile measure a opensource software, such as openvswitch on linux? 
>        the result I see is the cpu usage of different modules in kernel. Can I use the Oprofile to see the usage of each funtion in openvswitch? And during the openvswitch running time, could I see the time spend in kernel or the time in usersapce?
>        Looking forward to your reply!
>                                                                      !   & nbsp;                                                --Li Xiaoxiao       
> 
> 
> 
> 
> 

Hi,

OProfile has two modes of operation: sampling and counting. The sampling done by operf makes the assumption that the number of samples collected for a region of code is proportional to the total number of events (or time) spent in that region.  This doesn't give exact times or counts for regions of code.  Thus, this information is not really useful for determining latencies.  The counting provides counts over the life of a program, but not for a for individual functions.

If you are looking at getting information about latencies for specific operations in the kernel, you might take a look at SystemTap (https://sourceware.org/systemtap/). There are some example scripts (https://sourceware.org/systemtap/examples/keyword-index.html) that look at latency issues such as general/callgraph.stp.  These might be suitable depending on the needed timing resolution and allowed overhead.

-Will

------------------------------------------------------------------------------
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.