views:

37

answers:

1

Hello, I am trying to profile my software (in Linux) with oprofile. My software consists of both userspace and kernel module. First my doubt is what does the --separate=kernel option do? What will be the difference when running without that option? I did try to see it but couldn't find any difference. Could you please post an example?

Can't i profile a kernel module without the --seperate=kernel option?

Thanks, Bala

+2  A: 

In oprofile when used with option --seperate=kernel, it seperates the kernel and kernel modules per application. --seperate='library' seperates the samples for the dynamically linked object per application basis.

kernel, dynamically linked object are just not specific to the application we want to profile alone. But at the same time our application spends considerable amount of time in them. So --seperate allows one to get the samples from the point of view of the application we are interested in profiling. It can also give samples based on individual threads also.

Kernel can be profiled by providing --vmlinux option to opcontrol.
Ex:- opcontrol --vmlinux=/boot/vmlinux-2.6.27.23-0.1-preempt
--seperate is additional option that allows us to see the samples at different resolutions.

pv