lkml.org 
[lkml]   [2009]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH -v4 9/9] tracing: add function graph tracer support for MIPS
    Steven Rostedt wrote:
    > On Wed, 2009-10-21 at 10:07 -0700, David Daney wrote:
    >
    >> I have not used -pg, so I don't know for sure, I think all it does is
    >> add the calls to _mcount. Someone could investigate
    >> -fno-omit-frame-pointer, with that you may be able to use:
    >
    > Note, -pg assumes -fno-omit-frame-pointer, since -fomit-frame-pointer
    > and -pg are incompatible.
    >
    >> move s8,sp
    >>
    >> To identify function prologs, but it would still be ad hoc, as modern
    >> versions of GCC will reorder instructions in the prolog for better
    >> scheduling.
    >
    > I'll have to search the ABI documentation about calling _mcount in MIPS.
    > There are assumptions with _mcount that are made. It may very well be
    > safe to assume that the move s8,sp will always be there before an mcount
    > call.
    >

    Although I am quite interested in ftrace for MIPS, I a haven't spent the
    effort to try to figure out how many levels of backtrace we need to be
    generating here.

    If you only need the caller's address, that is passed in register 'at'.
    If you need more than that, then things get tricky. I would do one of
    two things:

    1) Use the mechanism used by the OOPS dump.

    2) Implement back traces based on DWARF2 unwinding data that is
    generated by the compiler.

    David Daney


    \
     
     \ /
      Last update: 2009-10-21 19:53    [W:0.023 / U:30.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site