[Openmcl-devel] Profiling System Calls

Gary Byers gb at clozure.com
Fri Jul 3 21:41:48 PDT 2009


Just to follow up on this a bit:

apparently, a 'vmlinuz' kernel image is produced from a 'vmlinux' by
doing something like:

1) stripping the symbols
2) compressing the result
3) prepending a little bit of code which reads the compressed image and
    decompresses it.

So even if we undid the 2nd and 3rd steps there's no good way to
undo the 1st.

On a Fedora 10 system running 2.6.27.5-117.fc10.x86_64, doing:

shell> sudo debuginfo-install kernel

downloaded and installed a lot of other debugging info for the kernel
I was running, along with an uncompressed kernel in

/usr/lib/debug/lib/modules/2.6.27.5-117.fc10.x86_64/vmlinux

If all else fails and you can't find another way of installing a
pre-build uncompressed in your distribution, the process of building
the kernel from source will almost certainly create a 'vmlinux' as an
intermediate step.


On Fri, 3 Jul 2009, Gary Byers wrote:

> 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
>>
>>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list