15 Jun, 2011

1 commit

  • Swap the 1st and 2nd parameters of save_stack_trace_regs()
    as same as the parameters of save_stack_trace_tsk().

    Signed-off-by: Masami Hiramatsu
    Cc: yrl.pp-manager.tt@hitachi.com
    Cc: Frederic Weisbecker
    Cc: Peter Zijlstra
    Cc: Namhyung Kim
    Link: http://lkml.kernel.org/r/20110608070921.17777.31103.stgit@fedora15
    Signed-off-by: Steven Rostedt

    Masami Hiramatsu
     

18 Nov, 2010

1 commit

  • The various stack tracing routines take a 'bp' argument in which the
    caller is supposed to provide the base pointer to use, or 0 if doesn't
    have one. Since bp is garbage whenever CONFIG_FRAME_POINTER is not
    defined, this means all callers in principle should either always pass
    0, or be conditional on CONFIG_FRAME_POINTER.

    However, there are only really three use cases for stack tracing:

    (a) Trace the current task, including IRQ stack if any
    (b) Trace the current task, but skip IRQ stack
    (c) Trace some other task

    In all cases, if CONFIG_FRAME_POINTER is not defined, bp should just
    be 0. If it _is_ defined, then

    - in case (a) bp should be gotten directly from the CPU's register, so
    the caller should pass NULL for regs,

    - in case (b) the caller should should pass the IRQ registers to
    dump_trace(),

    - in case (c) bp should be gotten from the top of the task's stack, so
    the caller should pass NULL for regs.

    Hence, the bp argument is not necessary because the combination of
    task and regs is sufficient to determine an appropriate value for bp.

    This patch introduces a new inline function stack_frame(task, regs)
    that computes the desired bp. This function is then called from the
    two versions of dump_stack().

    Signed-off-by: Soren Sandmann
    Acked-by: Steven Rostedt
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: H. Peter Anvin
    Cc: Peter Zijlstra
    Cc: Arjan van de Ven ,
    Cc: Frederic Weisbecker ,
    Cc: Arnaldo Carvalho de Melo ,
    LKML-Reference: >
    Signed-off-by: Frederic Weisbecker

    Soeren Sandmann Pedersen
     

13 Jun, 2009

2 commits


23 Nov, 2008

3 commits


04 Oct, 2008

1 commit

  • include/linux/stacktrace.h:13: warning:
    'struct task_struct' declared inside parameter list

    (This might be a hard error on sparc64, which uses this header and has
    -Werror)

    Reported-by: "Randy.Dunlap"
    Acked-by: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

26 Jan, 2008

1 commit


20 Jul, 2007

1 commit


09 May, 2007

1 commit

  • Simplify the stacktrace code:

    - remove the unused task argument to save_stack_trace, it's always
    current
    - remove the all_contexts flag, it's alwasy 0

    Signed-off-by: Christoph Hellwig
    Cc: Paul Mundt
    Cc: Ralf Baechle
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Andi Kleen
    Cc: Akinobu Mita
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

26 Sep, 2006

1 commit


04 Jul, 2006

1 commit