Analyzing Kernel call traces.

Peter Teoh htmldeveloper at gmail.com
Sat May 18 00:24:38 EDT 2013


On Wed, May 8, 2013 at 3:16 PM, Shraddha Kamat <sh2008ka at gmail.com> wrote:

> Any good tutorial for analyzing kernel call traces ? I want to
> know what is the meaning of everything that appears in the call
> trace and get to the exact cause of the problem.
>

sorry , u mean "backtrace" call trace?   or kernel oops?

http://www.linuxforu.com/2011/01/understanding-a-kernel-oops/

and here is another trace:

http://elinux.org/Kernel_Function_Trace

which depends on the instrumentation method:

http://elinux.org/images/6/68/Kfiboot-9.lst

http://elinux.org/Kernel_Instrumentation

http://elinux.org/Instrumentation_API

many of these traces, simply depends on the concept of call frames, or a
range of memory  addresses allocated on the stack used by the functions.

above page also mentioned the use of gcc -pg, and not mentioned are other
features of gcc (man gcc):

           -finstrument-functions
           -finstrument-functions-exclude-function-list=sym,sym,...
           -finstrument-functions-exclude-file-list=file,file,...

Beware though, sometimes compilation will explicitly remove the use of
frame pointer:

-fomit-frame-pointer

without the "ebp" and "esp" to demarcate the start and end of a frame,
there is no way to know the beginning and end of a call frame, and
therefore "stack trace", or "call trace" will not be accurately shown.
Other possibilities are that the function names are declared with "static"
as well, and u will end up with numerical offset from the nearest function
with name.

-- 
Regards,
Peter Teoh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130518/2a496fc5/attachment-0001.html 


More information about the Kernelnewbies mailing list