cregit-Linux how code gets into the kernel

Release 4.15 kernel/stacktrace.c

Directory: kernel
/*
 * kernel/stacktrace.c
 *
 * Stack trace management functions
 *
 *  Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
 */
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/kallsyms.h>
#include <linux/stacktrace.h>


void print_stack_trace(struct stack_trace *trace, int spaces) { int i; if (WARN_ON(!trace->entries)) return; for (i = 0; i < trace->nr_entries; i++) printk("%*c%pS\n", 1 + spaces, ' ', (void *)trace->entries[i]); }

Contributors

PersonTokensPropCommitsCommitProp
Ingo Molnar3554.69%125.00%
Vegard Nossum1218.75%125.00%
Johannes Berg1117.19%125.00%
Omar Sandoval69.38%125.00%
Total64100.00%4100.00%

EXPORT_SYMBOL_GPL(print_stack_trace);
int snprint_stack_trace(char *buf, size_t size, struct stack_trace *trace, int spaces) { int i; int generated; int total = 0; if (WARN_ON(!trace->entries)) return 0; for (i = 0; i < trace->nr_entries; i++) { generated = snprintf(buf, size, "%*c%pS\n", 1 + spaces, ' ', (void *)trace->entries[i]); total += generated; /* Assume that generated isn't a negative number */ if (generated >= size) { buf += size; size = 0; } else { buf += generated; size -= generated; } } return total; }

Contributors

PersonTokensPropCommitsCommitProp
JoonSoo Kim11794.35%150.00%
Omar Sandoval75.65%150.00%
Total124100.00%2100.00%

EXPORT_SYMBOL_GPL(snprint_stack_trace); /* * Architectures that do not implement save_stack_trace_*() * get these weak aliases and once-per-bootup warnings * (whenever this facility is utilized - for example by procfs): */
__weak void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) { WARN_ONCE(1, KERN_INFO "save_stack_trace_tsk() not implemented yet.\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Ingo Molnar24100.00%1100.00%
Total24100.00%1100.00%


__weak void save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace) { WARN_ONCE(1, KERN_INFO "save_stack_trace_regs() not implemented yet.\n"); }

Contributors

PersonTokensPropCommitsCommitProp
Masami Hiramatsu24100.00%1100.00%
Total24100.00%1100.00%


__weak int save_stack_trace_tsk_reliable(struct task_struct *tsk, struct stack_trace *trace) { WARN_ONCE(1, KERN_INFO "save_stack_tsk_reliable() not implemented yet.\n"); return -ENOSYS; }

Contributors

PersonTokensPropCommitsCommitProp
Josh Poimboeuf28100.00%1100.00%
Total28100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
JoonSoo Kim12241.92%110.00%
Ingo Molnar7927.15%330.00%
Josh Poimboeuf299.97%110.00%
Masami Hiramatsu248.25%110.00%
Omar Sandoval134.47%110.00%
Vegard Nossum124.12%110.00%
Johannes Berg113.78%110.00%
Paul Gortmaker10.34%110.00%
Total291100.00%10100.00%
Directory: kernel
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.