[Openmcl-devel] Profiling System Calls

Gary Byers gb at clozure.com
Fri Jul 3 12:13:54 PDT 2009


Time that TIME reports as "sytem mode" CPU time is spent in the OS
kernel.

On Linux systems, the kernel is often (mostly) compressed (loaded
from a file whose name often contains 'vmlinuz'); the name of an
uncompressed kernel often contains the string 'vmlinux' instead.

Most Linux distributions ship with compressed (vmlinuz) kernels.
In some cases, the corresponding uncompressed kernel - which
should contain exactly the same code but just be a much larger
file - may be available as part of a 'kernel debug' package.

oprofile and its tools need to be able to read symbol information
directly from a mapped executable ('ELF') file.  In theory, it could
decompress the running Linux kernel in order to be able to read symbol
information from the (compressed) kernel executable file, but it's
never actually done so.  At one point, some oprofile developers were
talking about constructing this symbol info from a "System.map" file
that corresponds to the running kernel, but I don't know if this is
implemented in released versions of oprofile (or if it will be.)

When you start oprofile (with 'opcontrol --start'), you typically
have to either pass it the pathname of an uncompressed vmlinux file
that matches the kernel you're running or provide the --no-vmlinux
argument (to say that you don't have such a file.)

If you have an uncompressed kernel and passed it to 'opcontrol', then
'opreport' can provide detailed information about time spent in Linux
kernel functions.  If you don't, then 'opreport' summaries will likely
just show a lot of time spent in 'no-vmlinux' (or however it identifies
time spent in the OS kernel when it can't find symbolic names for kernel
functions.)


On Fri, 3 Jul 2009, Volkan YAZICI wrote:

> Hi,
>
> I have a program where TIME reports that the %90 of the runtime is spent
> in system calls. When I try to profile the program via oreport as
> instructed in the manual, oreport doesn't include system calls. I
> suspect this is because we didn't prepend the system call symbols to the
> binary. Can anybody help me to profile system calls as well?
>
>
> Regards.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list