linux/kernel/stacktrace.c
<<
>>
Prefs
   1/*
   2 * kernel/stacktrace.c
   3 *
   4 * Stack trace management functions
   5 *
   6 *  Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
   7 */
   8#include <linux/sched.h>
   9#include <linux/kernel.h>
  10#include <linux/export.h>
  11#include <linux/kallsyms.h>
  12#include <linux/stacktrace.h>
  13
  14void print_stack_trace(struct stack_trace *trace, int spaces)
  15{
  16        int i;
  17
  18        if (WARN_ON(!trace->entries))
  19                return;
  20
  21        for (i = 0; i < trace->nr_entries; i++) {
  22                printk("%*c", 1 + spaces, ' ');
  23                print_ip_sym(trace->entries[i]);
  24        }
  25}
  26EXPORT_SYMBOL_GPL(print_stack_trace);
  27
  28/*
  29 * Architectures that do not implement save_stack_trace_tsk or
  30 * save_stack_trace_regs get this weak alias and a once-per-bootup warning
  31 * (whenever this facility is utilized - for example btracetrosfs14ran>
3 22 * kerpan>
   23prin__ ali      3 24spacestack_trace_tsk or<(struct traceask_ct spacor<(str, ct stack_trace *trace, in href="kernel/stacktrace.c#L19" 3d="L25" 3lass="line" name="L25">3 25{
3 26        int ref="+code=WARN_ON" clCEass="sref">WARN_ONCE(stru1, ref="+code=WARNKENWARNKEN"%estack_trace_tsk or<() implement sav foyet.\nt;, 1 a href="kernel/stacktrace.c#L27" 3d="L27" 3lass="line" name="L27">3 273 283 29prin__ ali      4 30spacestack_trace_tsk  get(struct spacpt  get *spac get *stack_trace *trace, in href="kernel/stacktrace.c#L19" 4d="L31" 4lass="line" name="L31">4 314 22WARN_ONCE(stru1, ref="+code=WARNKENWARNKEN"%estack_trace_tsk  get() implement sav foyet.\nt;, 1 a href="kernel/stacktrace.c#L27" 4d="L3" c4lass="line" name="L3"> 4 23   24
    

v>

The/spiginal LXR softingracetthe/ref="kernhttp://sourceexage.net/projress/lxr">LXR ent"unis *lxr@x/sta.no * lxr.x/sta.no kindly hosv focetref="kernhttp://www.redpill-x/spro.no">Redpill L/spro AS *&q a onobooas siper 1995. v>