cgroups: use task_lock() for access tsk->cgroups safe in cgroup_clone()
[deliverable/linux.git] / kernel / stacktrace.c
CommitLineData
8637c099
IM
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>
9212ddb5 9#include <linux/kernel.h>
8594698e 10#include <linux/module.h>
8637c099
IM
11#include <linux/kallsyms.h>
12#include <linux/stacktrace.h>
13
14void print_stack_trace(struct stack_trace *trace, int spaces)
15{
a5a242dc 16 int i;
8637c099 17
bfeeeeb9
JB
18 if (WARN_ON(!trace->entries))
19 return;
20
8637c099 21 for (i = 0; i < trace->nr_entries; i++) {
a5a242dc
VN
22 printk("%*c", 1 + spaces, ' ');
23 print_ip_sym(trace->entries[i]);
8637c099
IM
24 }
25}
8594698e 26EXPORT_SYMBOL_GPL(print_stack_trace);
8637c099 27
9212ddb5
IM
28/*
29 * Architectures that do not implement save_stack_trace_tsk get this
30 * weak alias and a once-per-bootup warning (whenever this facility
31 * is utilized - for example by procfs):
32 */
33__weak void
34save_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}
This page took 0.257149 seconds and 5 git commands to generate.