The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/kernel/stacktrace.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    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 
   14 void 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 }
   26 EXPORT_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 by procfs):
   32  */
   33 __weak void
   34 save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace)
   35 {
   36         WARN_ONCE(1, KERN_INFO "save_stack_trace_tsk() not implemented yet.\n");
   37 }
   38 
   39 __weak void
   40 save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
   41 {
   42         WARN_ONCE(1, KERN_INFO "save_stack_trace_regs() not implemented yet.\n");
   43 }

Cache object: bef199a3cf0db24e1f8c0e4afe830678


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.