lkml.org 
[lkml]   [2008]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add kernel support for oprofile callgraphs on AVR32
"Voss, Nikolaus" <N.Voss@weinmann.de> wrote:
> Hi,
>
> > Hmm. This appears to be the third backtracer added to avr32, the first
> > two being dump_stack() and friends in arch/avr32/kernel/process.c, and
> > save_stack_trace() in arch/avr32/kernel/stacktrace.c.
> >
> > Would be nice if some of this could be consolidated.
>
> I considered using one of them, in fact I also have a version with an
> extended stacktrace.c. But due to the small size of the kernel stacktracer
> (only a few lines), I found it cleaner to create a separate version. The
> overall size is smaller and it cannot potentially mess up other things.
> Cf. e.g. the x86 tracer which is of the generic type, but comparatively big
> and hard to follow through the places.

Good point.

> > > + /* Assume we have frame pointers in user mode process */
> >
> > What happens if we don't? I assume it will stop when it detects that
> > the frame pointer isn't monotonically increasing or when it gets a
> > fault?
>
> Right. This might lead to false information in oprofile, this case is
> described in the oprofile docs.

Ok.

I've applied it to the avr32 tree along with a couple of trivial
checkpatch fixes. There's one remaining warning:

WARNING: externs should be avoided in .c files
#125: FILE: arch/avr32/oprofile/op_model_avr32.c:25:
+void avr32_backtrace(struct pt_regs * const regs, unsigned int depth);

total: 0 errors, 1 warnings, 102 lines checked

We should probably add a header file somewhere, but I'm too lazy to do
it right now.

Haavard


\
 
 \ /
  Last update: 2008-09-03 13:05    [from the cache]
©2003-2011 Jasper Spaans